001package org.apache.fulcrum.security; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022/** 023 * The Security Service manages Users, Groups Roles and Permissions in the 024 * system. 025 * 026 * The task performed by the security service include providing access to the 027 * various types of managers. 028 * 029 * <p> 030 * Because of pluggable nature of the Services, it is possible to create 031 * multiple implementations of SecurityService, for example employing database 032 * and directory server as the data backend. <br> 033 * 034 * @author <a href="mailto:epugh@upstate.com">Eric Pugh</a> 035 * @version $Id$ 036 */ 037public interface SecurityService 038{ 039 String ROLE = SecurityService.class.getName(); 040 041 /** 042 * Returns the configured UserManager. 043 * 044 * @return An UserManager object 045 */ 046 UserManager getUserManager(); 047 048 /** 049 * Returns the configured GroupManager. 050 * 051 * @return An UserManager object 052 */ 053 GroupManager getGroupManager(); 054 055 /** 056 * Returns the configured RoleManager. 057 * 058 * @return An RoleManager object 059 */ 060 RoleManager getRoleManager(); 061 062 /** 063 * Returns the configured PermissionManager. 064 * 065 * @return An PermissionManager object 066 */ 067 PermissionManager getPermissionManager(); 068 069 /** 070 * Returns the configured ModelManager object that can then be casted to the 071 * specific model. 072 * 073 * @param <T> ModelManager 074 * @return An ModelManager object 075 */ 076 <T extends ModelManager> T getModelManager(); 077 078}