Class TorqueAbstractPermissionManager

    • Constructor Detail

      • TorqueAbstractPermissionManager

        public TorqueAbstractPermissionManager()
    • Method Detail

      • configure

        public void configure​(org.apache.avalon.framework.configuration.Configuration conf)
                       throws org.apache.avalon.framework.configuration.ConfigurationException
        Avalon Service lifecycle method
        Specified by:
        configure in interface org.apache.avalon.framework.configuration.Configurable
        Overrides:
        configure in class AbstractEntityManager
        Throws:
        org.apache.avalon.framework.configuration.ConfigurationException
      • doSelectAllPermissions

        protected abstract <T extends PermissionList<T> doSelectAllPermissions​(Connection con)
                                                                          throws org.apache.torque.TorqueException
        Get all specialized Permissions
        Parameters:
        con - a database connection
        Returns:
        a List of Permission instances
        Throws:
        org.apache.torque.TorqueException - if any database error occurs
      • doSelectByName

        protected abstract <T extends Permission> T doSelectByName​(String name,
                                                                   Connection con)
                                                            throws org.apache.torque.NoRowsException,
                                                                   org.apache.torque.TooManyRowsException,
                                                                   org.apache.torque.TorqueException
        Get a specialized Permission by name
        Parameters:
        name - the name of the group
        con - a database connection
        Returns:
        a Permission instance
        Throws:
        org.apache.torque.NoRowsException - if no such group exists
        org.apache.torque.TooManyRowsException - if multiple groups with the given name exist
        org.apache.torque.TorqueException - if any database error occurs if any other database error occurs
      • doSelectById

        protected abstract <T extends Permission> T doSelectById​(Integer id,
                                                                 Connection con)
                                                          throws org.apache.torque.NoRowsException,
                                                                 org.apache.torque.TooManyRowsException,
                                                                 org.apache.torque.TorqueException
        Get a specialized Permission by id
        Parameters:
        id - the id of the group
        con - a database connection
        Returns:
        a Permission instance
        Throws:
        org.apache.torque.NoRowsException - if no such group exists
        org.apache.torque.TooManyRowsException - if multiple groups with the given id exist
        org.apache.torque.TorqueException - if any database error occurs if any other database error occurs
      • getAllPermissions

        public PermissionSet getAllPermissions()
                                        throws DataBackendException
        Retrieves all permissions defined in the system.
        Returns:
        the names of all roles defined in the system.
        Throws:
        DataBackendException - if there was an error accessing the data backend.
      • checkExists

        public boolean checkExists​(String permissionName)
                            throws DataBackendException
        Determines if the Permission exists in the security system.
        Parameters:
        permissionName - a Permission value
        Returns:
        true if the permission name exists in the system, false otherwise
        Throws:
        DataBackendException - when more than one Permission with the same name exists.