Schnittstelle SecurityService

Alle Superschnittstellen:
Initable, Service
Alle bekannten Implementierungsklassen:
DefaultSecurityService

public interface SecurityService extends Service

The Security Service manages Users, Groups Roles and Permissions in the system.

The task performed by the security service include creation and removal of accounts, groups, roles, and permissions; assigning users roles in groups; assigning roles specific permissions and construction of objects representing these logical entities.

Because of pluggable nature of the Services, it is possible to create multiple implementations of SecurityService, for example employing database and directory server as the data backend.

Version:
$Id$
Autor:
Rafal Krzewski, Henning P. Schmiedehausen, Marco Knüttel
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final String
    The name of the service
    static final String
    the default implementation of UserManager interface (org.apache.turbine.services.security.passive.PassiveUserManager)
    static final String
    the key within services's properties for user manager implementation classname (user.manager)
    static final String
    the default implementation of User interface (org.apache.turbine.om.security.DefaultUserImpl)
    static final String
    the key within services's properties for user implementation classname (wrapper.class)
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    boolean
    Check whether a specified user's account exists.
    boolean
    Check whether a specified user's account exists.
    <G extends org.apache.fulcrum.security.entity.Group>
    G
    addGroup(G group)
    Creates a new group with specified attributes.
    <P extends org.apache.fulcrum.security.entity.Permission>
    P
    addPermission(P permission)
    Creates a new permission with specified attributes.
    <R extends org.apache.fulcrum.security.entity.Role>
    R
    addRole(R role)
    Creates a new role with specified attributes.
    void
    addUser(User user, String password)
    Creates new user account with specified attributes.
    void
    changePassword(User user, String oldPassword, String newPassword)
    Change the password for an User.
    void
    forcePassword(User user, String password)
    Forcibly sets new password for an User.
    <A extends org.apache.fulcrum.security.acl.AccessControlList>
    A
    getACL(User user)
    Constructs an AccessControlList for a specific user.
    org.apache.fulcrum.security.util.GroupSet
    Retrieves all groups defined in the system.
    org.apache.fulcrum.security.util.PermissionSet
    Retrieves all permissions defined in the system.
    org.apache.fulcrum.security.util.RoleSet
    Retrieves all roles defined in the system.
    <U extends User>
    U
    Constructs an User object to represent an anonymous user of the application.
    <U extends User>
    U
    getAuthenticatedUser(String username, String password)
    Authenticates an user, and constructs an User object to represent him/her.
    <G extends org.apache.fulcrum.security.entity.Group>
    G
    Provides a reference to the Group object that represents the global group.
    <G extends org.apache.fulcrum.security.entity.Group>
    G
    getGroupById(int id)
    Retrieve a Group object with specified Id.
    <G extends org.apache.fulcrum.security.entity.Group>
    G
    Retrieve a Group object with specified name.
    <G extends org.apache.fulcrum.security.entity.Group>
    G
    Construct a blank Group object.
    <G extends org.apache.fulcrum.security.entity.Group>
    G
    Construct a blank Group object.
    <P extends org.apache.fulcrum.security.entity.Permission>
    P
    Retrieve a Permission object with specified Id.
    <P extends org.apache.fulcrum.security.entity.Permission>
    P
    Retrieve a Permission object with specified name.
    <P extends org.apache.fulcrum.security.entity.Permission>
    P
    Construct a blank Permission object.
    <P extends org.apache.fulcrum.security.entity.Permission>
    P
    Construct a blank Permission object.
    org.apache.fulcrum.security.util.PermissionSet
    getPermissions(org.apache.fulcrum.security.entity.Role role)
    Retrieves all permissions associated with a role.
    <R extends org.apache.fulcrum.security.entity.Role>
    R
    getRoleById(int id)
    Retrieve a Role object with specified Id.
    <R extends org.apache.fulcrum.security.entity.Role>
    R
    Retrieve a Role object with specified name.
    <R extends org.apache.fulcrum.security.entity.Role>
    R
    Construct a blank Role object.
    <R extends org.apache.fulcrum.security.entity.Role>
    R
    Construct a blank Role object.
    <U extends User>
    U
    getUser(String username)
    Constructs an User object to represent a registered user of the application.
    <U extends User>
    U
    Construct a blank User object.
    <U extends User>
    U
    Construct a blank User object.
    Returns the configured UserManager.
    void
    grant(org.apache.fulcrum.security.entity.Role role, org.apache.fulcrum.security.entity.Permission permission)
    Grants a Role a Permission
    void
    grant(User user, org.apache.fulcrum.security.entity.Group group, org.apache.fulcrum.security.entity.Role role)
    Grant an User a Role in a Group.
    boolean
    Checks whether a passed user object matches the anonymous user pattern according to the configured user manager
    void
    removeGroup(org.apache.fulcrum.security.entity.Group group)
    Removes a Group from the system.
    void
    removePermission(org.apache.fulcrum.security.entity.Permission permission)
    Removes a Permission from the system.
    void
    removeRole(org.apache.fulcrum.security.entity.Role role)
    Removes a Role from the system.
    void
    Removes an user account from the system.
    void
    renameGroup(org.apache.fulcrum.security.entity.Group group, String name)
    Renames an existing Group.
    void
    renamePermission(org.apache.fulcrum.security.entity.Permission permission, String name)
    Renames an existing Permission.
    void
    renameRole(org.apache.fulcrum.security.entity.Role role, String name)
    Renames an existing Role.
    void
    replaceRole(User user, org.apache.fulcrum.security.entity.Role role, org.apache.fulcrum.security.entity.Role newRole)
    Replaces transactionally the first given role with the second role for the given user.
    void
    revoke(org.apache.fulcrum.security.entity.Role role, org.apache.fulcrum.security.entity.Permission permission)
    Revokes a Permission from a Role.
    void
    revoke(User user, org.apache.fulcrum.security.entity.Group group, org.apache.fulcrum.security.entity.Role role)
    Revoke a Role in a Group from an User.
    void
    revokeAll(org.apache.fulcrum.security.entity.Role role)
    Revokes all permissions from a Role.
    void
    revokeAll(org.apache.fulcrum.security.entity.Role role, boolean cascadeDelete)
    Revokes by default all permissions from a Role and if flag is set all groups and users for this role This method is used when deleting a Role.
    void
    Revokes all roles from an User.
    void
    Saves User data when the session is unbound.
    void
    saveUser(User user)
    Saves User's data in the permanent storage.

    Von Schnittstelle geerbte Methoden org.apache.turbine.services.Initable

    getInit, init, init, setInitableBroker, shutdown

    Von Schnittstelle geerbte Methoden org.apache.turbine.services.Service

    getConfiguration, getName, getProperties, setName, setServiceBroker
  • Felddetails

  • Methodendetails

    • getUserInstance

      <U extends User> U getUserInstance() throws org.apache.fulcrum.security.util.UnknownEntityException
      Construct a blank User object.
      Typparameter:
      U - user class
      Gibt zurück:
      an object implementing User interface.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the object could not be instantiated.
    • getUserInstance

      <U extends User> U getUserInstance(String userName) throws org.apache.fulcrum.security.util.UnknownEntityException
      Construct a blank User object.
      Typparameter:
      U - user class
      Parameter:
      userName - The name of the user.
      Gibt zurück:
      an object implementing User interface.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the object could not be instantiated.
    • getGroupInstance

      <G extends org.apache.fulcrum.security.entity.Group> G getGroupInstance() throws org.apache.fulcrum.security.util.UnknownEntityException
      Construct a blank Group object.
      Typparameter:
      G - group class
      Gibt zurück:
      an object implementing Group interface.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the object could not be instantiated.
    • getGroupInstance

      <G extends org.apache.fulcrum.security.entity.Group> G getGroupInstance(String groupName) throws org.apache.fulcrum.security.util.UnknownEntityException
      Construct a blank Group object.
      Typparameter:
      G - group class
      Parameter:
      groupName - The name of the Group
      Gibt zurück:
      an object implementing Group interface.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the object could not be instantiated.
    • getPermissionInstance

      <P extends org.apache.fulcrum.security.entity.Permission> P getPermissionInstance() throws org.apache.fulcrum.security.util.UnknownEntityException
      Construct a blank Permission object.
      Typparameter:
      P - permission class
      Gibt zurück:
      an object implementing Permission interface.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the object could not be instantiated.
    • getPermissionInstance

      <P extends org.apache.fulcrum.security.entity.Permission> P getPermissionInstance(String permName) throws org.apache.fulcrum.security.util.UnknownEntityException
      Construct a blank Permission object.
      Typparameter:
      P - permission class
      Parameter:
      permName - The name of the Permission
      Gibt zurück:
      an object implementing Permission interface.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the object could not be instantiated.
    • getRoleInstance

      <R extends org.apache.fulcrum.security.entity.Role> R getRoleInstance() throws org.apache.fulcrum.security.util.UnknownEntityException
      Construct a blank Role object.
      Typparameter:
      R - role class
      Gibt zurück:
      an object implementing Role interface.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the object could not be instantiated.
    • getRoleInstance

      <R extends org.apache.fulcrum.security.entity.Role> R getRoleInstance(String roleName) throws org.apache.fulcrum.security.util.UnknownEntityException
      Construct a blank Role object.
      Typparameter:
      R - role class
      Parameter:
      roleName - The name of the Role
      Gibt zurück:
      an object implementing Role interface.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the object could not be instantiated.
    • getUserManager

      Returns the configured UserManager.
      Gibt zurück:
      An UserManager object
    • accountExists

      boolean accountExists(String userName) throws org.apache.fulcrum.security.util.DataBackendException
      Check whether a specified user's account exists. The login name is used for looking up the account.
      Parameter:
      userName - The user to be checked.
      Gibt zurück:
      true if the specified account exists
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
    • accountExists

      boolean accountExists(User user) throws org.apache.fulcrum.security.util.DataBackendException
      Check whether a specified user's account exists. An User object is used for looking up the account.
      Parameter:
      user - The user object to be checked.
      Gibt zurück:
      true if the specified account exists
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
    • getAuthenticatedUser

      <U extends User> U getAuthenticatedUser(String username, String password) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException, org.apache.fulcrum.security.util.PasswordMismatchException
      Authenticates an user, and constructs an User object to represent him/her.
      Typparameter:
      U - user class
      Parameter:
      username - The user name.
      password - The user password.
      Gibt zurück:
      An authenticated Turbine User.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if user account is not present.
      org.apache.fulcrum.security.util.PasswordMismatchException - if the supplied password was incorrect.
    • getUser

      <U extends User> U getUser(String username) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Constructs an User object to represent a registered user of the application.
      Typparameter:
      U - user class
      Parameter:
      username - The user name.
      Gibt zurück:
      A Turbine User.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if user account is not present.
    • getAnonymousUser

      <U extends User> U getAnonymousUser() throws org.apache.fulcrum.security.util.UnknownEntityException
      Constructs an User object to represent an anonymous user of the application.
      Typparameter:
      U - user class
      Gibt zurück:
      An anonymous Turbine User.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the anonymous User object couldn't be constructed.
    • isAnonymousUser

      boolean isAnonymousUser(User u)
      Checks whether a passed user object matches the anonymous user pattern according to the configured user manager
      Parameter:
      u - a user object
      Gibt zurück:
      True if this is an anonymous user
    • saveUser

      void saveUser(User user) throws org.apache.fulcrum.security.util.UnknownEntityException, org.apache.fulcrum.security.util.DataBackendException
      Saves User's data in the permanent storage. The user account is required to exist in the storage.
      Parameter:
      user - the user object to save
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the user's account does not exist in the database.
      org.apache.fulcrum.security.util.DataBackendException - if there is a problem accessing the storage.
    • saveOnSessionUnbind

      void saveOnSessionUnbind(User user) throws org.apache.fulcrum.security.util.UnknownEntityException, org.apache.fulcrum.security.util.DataBackendException
      Saves User data when the session is unbound. The user account is required to exist in the storage. LastLogin, AccessCounter, persistent pull tools, and any data stored in the permData hashtable that is not mapped to a column will be saved.
      Parameter:
      user - the user object
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the user's account does not exist in the database.
      org.apache.fulcrum.security.util.DataBackendException - if there is a problem accessing the storage.
    • addUser

      void addUser(User user, String password) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.EntityExistsException, org.apache.fulcrum.security.util.UnknownEntityException
      Creates new user account with specified attributes.
      Parameter:
      user - the object describing account to be created.
      password - The password to use.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.EntityExistsException - if the user account already exists.
      org.apache.fulcrum.security.util.UnknownEntityException - if the provided user does not exist (is null)
    • removeUser

      void removeUser(User user) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Removes an user account from the system.
      Parameter:
      user - the object describing the account to be removed.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the user account is not present.
    • changePassword

      void changePassword(User user, String oldPassword, String newPassword) throws org.apache.fulcrum.security.util.PasswordMismatchException, org.apache.fulcrum.security.util.UnknownEntityException, org.apache.fulcrum.security.util.DataBackendException
      Change the password for an User.
      Parameter:
      user - an User to change password for.
      oldPassword - the current password supplied by the user.
      newPassword - the current password requested by the user.
      Löst aus:
      org.apache.fulcrum.security.util.PasswordMismatchException - if the supplied password was incorrect.
      org.apache.fulcrum.security.util.UnknownEntityException - if the user's record does not exist in the database.
      org.apache.fulcrum.security.util.DataBackendException - if there is a problem accessing the storage.
    • forcePassword

      void forcePassword(User user, String password) throws org.apache.fulcrum.security.util.UnknownEntityException, org.apache.fulcrum.security.util.DataBackendException
      Forcibly sets new password for an User. This is supposed by the administrator to change the forgotten or compromised passwords. Certain implementatations of this feature would require administrative level access to the authenticating server / program.
      Parameter:
      user - an User to change password for.
      password - the new password.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the user's record does not exist in the database.
      org.apache.fulcrum.security.util.DataBackendException - if there is a problem accessing the storage.
    • getACL

      <A extends org.apache.fulcrum.security.acl.AccessControlList> A getACL(User user) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Constructs an AccessControlList for a specific user.
      Typparameter:
      A - ACL class
      Parameter:
      user - the user for whom the AccessControlList are to be retrieved
      Gibt zurück:
      A new AccessControlList object.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if user account is not present.
    • getPermissions

      org.apache.fulcrum.security.util.PermissionSet getPermissions(org.apache.fulcrum.security.entity.Role role) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Retrieves all permissions associated with a role.
      Parameter:
      role - the role name, for which the permissions are to be retrieved.
      Gibt zurück:
      the permissions associated with the role
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the role is not present.
    • grant

      void grant(User user, org.apache.fulcrum.security.entity.Group group, org.apache.fulcrum.security.entity.Role role) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Grant an User a Role in a Group.
      Parameter:
      user - the user.
      group - the group.
      role - the role.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if user account, group or role is not present.
    • revoke

      void revoke(User user, org.apache.fulcrum.security.entity.Group group, org.apache.fulcrum.security.entity.Role role) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Revoke a Role in a Group from an User.
      Parameter:
      user - the user.
      group - the group.
      role - the role.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if user account, group or role is not present.
    • revokeAll

      void revokeAll(User user) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Revokes all roles from an User. This method is used when deleting an account.
      Parameter:
      user - the User.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the account is not present.
    • grant

      void grant(org.apache.fulcrum.security.entity.Role role, org.apache.fulcrum.security.entity.Permission permission) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Grants a Role a Permission
      Parameter:
      role - the Role.
      permission - the Permission.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if role or permission is not present.
    • revoke

      void revoke(org.apache.fulcrum.security.entity.Role role, org.apache.fulcrum.security.entity.Permission permission) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Revokes a Permission from a Role.
      Parameter:
      role - the Role.
      permission - the Permission.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if role or permission is not present.
    • revokeAll

      void revokeAll(org.apache.fulcrum.security.entity.Role role) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Revokes all permissions from a Role. This method is user when deleting a Role.
      Parameter:
      role - the Role
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the Role is not present.
    • revokeAll

      void revokeAll(org.apache.fulcrum.security.entity.Role role, boolean cascadeDelete) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Revokes by default all permissions from a Role and if flag is set all groups and users for this role This method is used when deleting a Role.
      Parameter:
      role - the Role
      cascadeDelete - if true removes all groups and user for this role.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the Role is not present.
    • getGlobalGroup

      <G extends org.apache.fulcrum.security.entity.Group> G getGlobalGroup()
      Provides a reference to the Group object that represents the global group.
      Typparameter:
      G - group class
      Gibt zurück:
      A Group object that represents the global group.
    • getGroupByName

      <G extends org.apache.fulcrum.security.entity.Group> G getGroupByName(String name) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Retrieve a Group object with specified name.
      Typparameter:
      G - group class
      Parameter:
      name - the name of the Group.
      Gibt zurück:
      an object representing the Group with specified name.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the group does not exist.
    • getGroupById

      <G extends org.apache.fulcrum.security.entity.Group> G getGroupById(int id) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Retrieve a Group object with specified Id.
      Typparameter:
      G - group class
      Parameter:
      id - the id of the Group.
      Gibt zurück:
      an object representing the Group with specified name.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the permission does not exist in the database.
      org.apache.fulcrum.security.util.DataBackendException - if there is a problem accessing the storage.
    • getRoleByName

      <R extends org.apache.fulcrum.security.entity.Role> R getRoleByName(String name) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Retrieve a Role object with specified name.
      Typparameter:
      R - role class
      Parameter:
      name - the name of the Role.
      Gibt zurück:
      an object representing the Role with specified name.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the role does not exist.
    • getRoleById

      <R extends org.apache.fulcrum.security.entity.Role> R getRoleById(int id) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Retrieve a Role object with specified Id.
      Typparameter:
      R - role class
      Parameter:
      id - the id of the Role.
      Gibt zurück:
      an object representing the Role with specified name.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the permission does not exist in the database.
      org.apache.fulcrum.security.util.DataBackendException - if there is a problem accessing the storage.
    • getPermissionByName

      <P extends org.apache.fulcrum.security.entity.Permission> P getPermissionByName(String name) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Retrieve a Permission object with specified name.
      Typparameter:
      P - permission class
      Parameter:
      name - the name of the Permission.
      Gibt zurück:
      an object representing the Permission with specified name.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the permission does not exist.
    • getPermissionById

      <P extends org.apache.fulcrum.security.entity.Permission> P getPermissionById(int id) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Retrieve a Permission object with specified Id.
      Typparameter:
      P - permission class
      Parameter:
      id - the id of the Permission.
      Gibt zurück:
      an object representing the Permission with specified name.
      Löst aus:
      org.apache.fulcrum.security.util.UnknownEntityException - if the permission does not exist in the database.
      org.apache.fulcrum.security.util.DataBackendException - if there is a problem accessing the storage.
    • getAllGroups

      org.apache.fulcrum.security.util.GroupSet getAllGroups() throws org.apache.fulcrum.security.util.DataBackendException
      Retrieves all groups defined in the system.
      Gibt zurück:
      the names of all groups defined in the system.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
    • getAllRoles

      org.apache.fulcrum.security.util.RoleSet getAllRoles() throws org.apache.fulcrum.security.util.DataBackendException
      Retrieves all roles defined in the system.
      Gibt zurück:
      the names of all roles defined in the system.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
    • getAllPermissions

      org.apache.fulcrum.security.util.PermissionSet getAllPermissions() throws org.apache.fulcrum.security.util.DataBackendException
      Retrieves all permissions defined in the system.
      Gibt zurück:
      the names of all roles defined in the system.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
    • addGroup

      <G extends org.apache.fulcrum.security.entity.Group> G addGroup(G group) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.EntityExistsException
      Creates a new group with specified attributes.
      Typparameter:
      G - group class
      Parameter:
      group - the object describing the group to be created.
      Gibt zurück:
      the new Group object.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.EntityExistsException - if the group already exists.
    • addRole

      <R extends org.apache.fulcrum.security.entity.Role> R addRole(R role) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.EntityExistsException
      Creates a new role with specified attributes.
      Typparameter:
      R - role class
      Parameter:
      role - The object describing the role to be created.
      Gibt zurück:
      the new Role object.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.EntityExistsException - if the role already exists.
    • addPermission

      <P extends org.apache.fulcrum.security.entity.Permission> P addPermission(P permission) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.EntityExistsException
      Creates a new permission with specified attributes.
      Typparameter:
      P - permission class
      Parameter:
      permission - The object describing the permission to be created.
      Gibt zurück:
      the new Permission object.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.EntityExistsException - if the permission already exists.
    • removeGroup

      void removeGroup(org.apache.fulcrum.security.entity.Group group) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Removes a Group from the system.
      Parameter:
      group - The object describing the group to be removed.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the group does not exist.
    • removeRole

      void removeRole(org.apache.fulcrum.security.entity.Role role) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Removes a Role from the system.
      Parameter:
      role - The object describing the role to be removed.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the role does not exist.
    • removePermission

      void removePermission(org.apache.fulcrum.security.entity.Permission permission) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Removes a Permission from the system.
      Parameter:
      permission - The object describing the permission to be removed.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the permission does not exist.
    • renameGroup

      void renameGroup(org.apache.fulcrum.security.entity.Group group, String name) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Renames an existing Group.
      Parameter:
      group - The object describing the group to be renamed.
      name - the new name for the group.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the group does not exist.
    • renameRole

      void renameRole(org.apache.fulcrum.security.entity.Role role, String name) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Renames an existing Role.
      Parameter:
      role - The object describing the role to be renamed.
      name - the new name for the role.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the role does not exist.
    • renamePermission

      void renamePermission(org.apache.fulcrum.security.entity.Permission permission, String name) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Renames an existing Permission.
      Parameter:
      permission - The object describing the permission to be renamed.
      name - the new name for the permission.
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the permission does not exist.
    • replaceRole

      void replaceRole(User user, org.apache.fulcrum.security.entity.Role role, org.apache.fulcrum.security.entity.Role newRole) throws org.apache.fulcrum.security.util.DataBackendException, org.apache.fulcrum.security.util.UnknownEntityException
      Replaces transactionally the first given role with the second role for the given user.
      Parameter:
      user - the user.
      role - the old role
      newRole - the new role
      Löst aus:
      org.apache.fulcrum.security.util.DataBackendException - if there was an error accessing the data backend.
      org.apache.fulcrum.security.util.UnknownEntityException - if the permission does not exist.