Class Privilege
java.lang.Object
edu.internet2.middleware.grouper.privs.Privilege
- All Implemented Interfaces:
Serializable
Privilege schema specification. Access the constants for Groups from AccessPrivilege
and Stems from NamingPrivilege.
- Version:
- $Id: Privilege.java,v 1.9 2009-09-21 06:14:26 mchyzer Exp $
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertFieldsToPrivileges
(Collection<Field> fields) convert a list to a privilege for any type of privilegeconvertNamesToPrivileges
(Collection<String> privilegeNames) convert a list of privilege names or field names to a privilege for any type of privilegestatic Collection<Field>
convertPrivilegesToFields
(Collection<Privilege> privileges) convert a collection of privileges to a collection of fieldsboolean
string equalsget attribute def privsgetField()
return the list nameget the privilege that this privilege implied (including this privilege for instance if the privilege is UPDATE, then return UPDATE and ADMINget the inherited privileges for this privilege (including this privilege for instance if the privilege is UPDATE, then return UPDATE and ADMINstatic Privilege
getInstance
(String name) static Privilege
getInstance
(String name, boolean exceptionIfNotFound) getInstances
(String namesCommaSeparated) return the list namegetName()
get stem (naming) privsint
hashCode()
generate hash codeboolean
isAccess()
see if privilege involves groupstatic boolean
boolean
see if privilege involves attribute defstatic boolean
static boolean
boolean
isNaming()
see if privilege involves stemstatic boolean
static Privilege
listToPriv
(String list, boolean exceptionOnNotFound) convert a list to a privilege for any type of privilegestatic String
stringValue
(Set<Privilege> privileges) convert privileges to string comma separatedtoString()
-
Field Details
-
serialVersionUID
public static final long serialVersionUIDconstant- See Also:
-
-
Method Details
-
isAccess
public boolean isAccess()see if privilege involves group- Returns:
- if involves groups
-
isNaming
public boolean isNaming()see if privilege involves stem- Returns:
- if involves stems
-
isAttributeDef
public boolean isAttributeDef()see if privilege involves attribute def- Returns:
- if involves attribute def
-
listToPriv
convert a list to a privilege for any type of privilege- Parameters:
list
-- Returns:
- the privilege
-
convertFieldsToPrivileges
convert a list to a privilege for any type of privilege- Parameters:
fields
-- Returns:
- the privilege
-
convertNamesToPrivileges
convert a list of privilege names or field names to a privilege for any type of privilege- Parameters:
privilegeNames
-- Returns:
- the privilege
-
convertPrivilegesToFields
convert a collection of privileges to a collection of fields- Parameters:
privileges
-- Returns:
- the fields
-
hashCode
public int hashCode()generate hash code -
equals
string equals -
getInheritedPrivileges
get the inherited privileges for this privilege (including this privilege for instance if the privilege is UPDATE, then return UPDATE and ADMIN- Returns:
- the inherited privileges
-
getImpliedPrivileges
get the privilege that this privilege implied (including this privilege for instance if the privilege is UPDATE, then return UPDATE and ADMIN- Returns:
- the inherited privileges
-
getListName
return the list name- Returns:
- the list name
-
getField
return the list name- Returns:
- the list name
- Throws:
SchemaException
-
getAccessPrivs
- Returns:
- access (group) privs
-
getEntityPrivs
- Returns:
- entity access (group) privs
-
getInstances
- Parameters:
namesCommaSeparated
-- Returns:
- the privileges
-
stringValue
convert privileges to string comma separated- Parameters:
privileges
-- Returns:
- the privileges
-
getInstance
- Parameters:
name
-- Returns:
- priv
-
getInstance
- Parameters:
name
-exceptionIfNotFound
-- Returns:
- priv
-
getNamingPrivs
get stem (naming) privs- Returns:
- set
-
getAttributeDefPrivs
get attribute def privs- Returns:
- attr def privs
-
isAccess
- Parameters:
p
-- Returns:
- if access
-
isEntity
- Parameters:
p
-- Returns:
- if entity
-
isNaming
- Parameters:
p
-- Returns:
- if naming (stem)
-
isAttributeDef
- Parameters:
p
-- Returns:
- if attribute def
-
getName
- Returns:
- name
-
toString
-