edu.internet2.middleware.grouper.permissions
Class PermissionEntry

java.lang.Object
  extended by edu.internet2.middleware.grouper.GrouperAPI
      extended by edu.internet2.middleware.grouper.permissions.PermissionEntry
All Implemented Interfaces:
HibGrouperLifecycle, GrouperCloneable, GrouperUtil.FieldValuable, java.io.Serializable, java.lang.Comparable<PermissionEntry>, org.hibernate.classic.Lifecycle

public class PermissionEntry
extends GrouperAPI
implements java.lang.Comparable<PermissionEntry>

See Also:
Serialized Form

Nested Class Summary
static class PermissionEntry.PermissionType
          type of permission, either assigned to role, or assigned to role and user combined
 
Field Summary
 
Fields inherited from class edu.internet2.middleware.grouper.GrouperAPI
COLUMN_HIBERNATE_VERSION_NUMBER, FIELD_DB_VERSION, FIELD_HIBERNATE_VERSION_NUMBER, INITIAL_VERSION_NUMBER
 
Fields inherited from interface org.hibernate.classic.Lifecycle
NO_VETO, VETO
 
Constructor Summary
PermissionEntry()
           
 
Method Summary
 GrouperAPI clone()
          deep clone the fields in this object
static boolean collectionContains(java.util.Collection<PermissionEntry> permissionEntries, java.lang.String roleName, java.lang.String attributeDefNameName, java.lang.String action, java.lang.String subjectSourceId, java.lang.String subjectId)
          see if a permission is in the list of entries
static PermissionEntry collectionFindFirst(java.util.Collection<PermissionEntry> permissionEntries, java.lang.String roleName, java.lang.String attributeDefNameName, java.lang.String action, java.lang.String subjectSourceId, java.lang.String subjectId, java.lang.String permissionType)
          find the first permission entry in the list of entries
static PermissionEntry collectionFindFirst(java.util.Collection<PermissionEntry> permissionEntries, java.lang.String roleName, java.lang.String attributeDefNameName, java.lang.String action, java.lang.String subjectSourceId, java.lang.String subjectId, java.lang.String permissionType, boolean considerPermissionType)
          find the first permission entry in the list of entries
 int compareTo(PermissionEntry o2)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAction()
          action on the perimssion (e.g. read, write, assign (default), etc
 java.lang.String getActionId()
          action on the perimssion (e.g. read, write, assign (default), etc
 java.lang.String getAssignmentNotes()
          notes on the assignment of privilege
 int getAttributeAssignActionSetDepth()
          depth of action hierarchy, 0 means immediate
 AttributeAssignDelegatable getAttributeAssignDelegatable()
          get the enum for delegatable, do not return null
 java.lang.String getAttributeAssignDelegatableDb()
          internal method for hibernate to persist this enum
 java.lang.String getAttributeAssignId()
          id of the attribute assign row, either to the role, or to the role member pair
 java.lang.String getAttributeDefId()
          id of the attributeDef
 java.lang.String getAttributeDefNameDispName()
          display name of the attribute def name which is the permission assigned to the role or subject
 java.lang.String getAttributeDefNameId()
          id of the attribute def name which is the permission
 java.lang.String getAttributeDefNameName()
          name of the attribute def name which is the permission assigned to the role or subject
 int getAttributeDefNameSetDepth()
          depth of attributeDefName set hierarchy, 0 means immediate
 java.sql.Timestamp getDisabledTime()
          if there is a date here, and it is in the past, this assignment is disabled
 java.lang.Long getDisabledTimeDb()
          if there is a date here, and it is in the past, this assignment is disabled
 java.lang.String getEnabledDb()
          true or false for if this assignment is enabled (e.g. might have expired)
 java.sql.Timestamp getEnabledTime()
          if there is a date here, and it is in the future, this assignment is disabled until that time
 java.lang.Long getEnabledTimeDb()
          if there is a date here, and it is in the future, this assignment is disabled until that time
 java.lang.String getMemberId()
          id of the member that has the permission
 int getMembershipDepth()
          depth of memberships, 0 means immediate
 java.lang.String getMembershipId()
          id of the membership row
 PermissionEntry.PermissionType getPermissionType()
          type of permission, either assigned to role, or assigned to role and user combined: role_subject
 java.lang.String getPermissionTypeDb()
          type of permission, either assigned to role, or assigned to role and user combined: role_subject
 java.lang.String getRoleDisplayName()
          display name of the role which the subject is in to have the permission
 java.lang.String getRoleId()
          id of the role which the subject is in to get the permission
 java.lang.String getRoleName()
          role which has the permission or which the subject must be in to have the permission
 int getRoleSetDepth()
          depth of role hierarchy, 0 means immediate, -1 means no role set involved
 java.lang.String getSubjectId()
          subject id of the subject which has the permissions
 java.lang.String getSubjectSourceId()
          source id of the subject which has the permissions
 int hashCode()
           
 boolean isEnabled()
          true or false for if this assignment is enabled (e.g. might have expired)
 boolean isImmediateMembership()
          see if the membership is unassignable directly
 boolean isImmediatePermission()
          see if the permission is unassignable directly
 void setAction(java.lang.String action1)
          action on the perimssion (e.g. read, write, assign (default), etc
 void setActionId(java.lang.String actionId1)
          action on the perimssion (e.g. read, write, assign (default), etc
 void setAssignmentNotes(java.lang.String assignmentNotes1)
          notes on the assignment of privilege
 void setAttributeAssignActionSetDepth(int attributeAssignActionSetDepth1)
          depth of action hierarchy, 0 means immediate
 void setAttributeAssignDelegatable(AttributeAssignDelegatable attributeAssignDelegatable1)
           
 void setAttributeAssignDelegatableDb(java.lang.String theAttributeAssignDelegatableDb)
          internal method for hibernate to set if delegatable
 void setAttributeAssignId(java.lang.String attributeAssignId1)
          id of the attribute assign row, either to the role, or to the role member pair
 void setAttributeDefId(java.lang.String attributeDefId1)
          id of the attributeDef
 void setAttributeDefNameDispName(java.lang.String attributeDefNameDispName1)
          display name of the attribute def name which is the permission assigned to the role or subject
 void setAttributeDefNameId(java.lang.String attributeDefNameId1)
          id of the attribute def name which is the permission
 void setAttributeDefNameName(java.lang.String attributeDefNameName1)
          name of the attribute def name which is the permission assigned to the role or subject
 void setAttributeDefNameSetDepth(int attributeDefNameSetDepth1)
          depth of attributeDefName set hierarchy, 0 means immediate
 void setDisabledTime(java.sql.Timestamp disabledTimeDb1)
          if there is a date here, and it is in the past, this assignment is disabled
 void setDisabledTimeDb(java.lang.Long disabledTimeDb1)
          if there is a date here, and it is in the past, this assignment is disabled
 void setEnabled(boolean enabled1)
          true or false for if this assignment is enabled (e.g. might have expired)
 void setEnabledDb(java.lang.String enabled1)
          true or false for if this assignment is enabled (e.g. might have expired)
 void setEnabledTime(java.sql.Timestamp enabledTimeDb1)
          if there is a date here, and it is in the future, this assignment is disabled until that time
 void setEnabledTimeDb(java.lang.Long enabledTimeDb1)
          if there is a date here, and it is in the future, this assignment is disabled until that time
 void setMemberId(java.lang.String memberId1)
          id of the member that has the permission
 void setMembershipDepth(int membershipDepth1)
          depth of memberships, 0 means immediate
 void setMembershipId(java.lang.String membershipId1)
          id of the membership row
 void setPermissionTypeDb(java.lang.String permissionTypeDb1)
          type of permission, either assigned to role, or assigned to role and user combined: role_subject
 void setRoleDisplayName(java.lang.String roleDisplayName1)
          display name of the role which the subject is in to have the permission
 void setRoleId(java.lang.String roleId1)
          id of the role which the subject is in to get the permission
 void setRoleName(java.lang.String roleName1)
          role which has the permission or which the subject must be in to have the permission
 void setRoleSetDepth(int roleSetDepth1)
          depth of role hierarchy, 0 means immediate, -1 means no role set involved
 void setSubjectId(java.lang.String subjectId1)
          subject id of the subject which has the permissions
 void setSubjectSourceId(java.lang.String subjectSourceId1)
          source id of the subject which has the permissions
 java.lang.String toString()
           
 
Methods inherited from class edu.internet2.middleware.grouper.GrouperAPI
dbVersion, dbVersionClear, dbVersionDifferentFields, dbVersionIsDifferent, dbVersionReset, fieldValue, getHibernateVersionNumber, onDelete, onLoad, onPostDelete, onPostSave, onPostUpdate, onPreDelete, onPreSave, onPreUpdate, onSave, onUpdate, setHibernateVersionNumber
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PermissionEntry

public PermissionEntry()
Method Detail

getAssignmentNotes

public java.lang.String getAssignmentNotes()
notes on the assignment of privilege

Returns:
notes

setAssignmentNotes

public void setAssignmentNotes(java.lang.String assignmentNotes1)
notes on the assignment of privilege

Parameters:
assignmentNotes1 -

collectionContains

public static boolean collectionContains(java.util.Collection<PermissionEntry> permissionEntries,
                                         java.lang.String roleName,
                                         java.lang.String attributeDefNameName,
                                         java.lang.String action,
                                         java.lang.String subjectSourceId,
                                         java.lang.String subjectId)
see if a permission is in the list of entries

Parameters:
permissionEntries -
roleName -
attributeDefNameName -
action -
subjectSourceId -
subjectId -
Returns:
true if the item is in the list

collectionFindFirst

public static PermissionEntry collectionFindFirst(java.util.Collection<PermissionEntry> permissionEntries,
                                                  java.lang.String roleName,
                                                  java.lang.String attributeDefNameName,
                                                  java.lang.String action,
                                                  java.lang.String subjectSourceId,
                                                  java.lang.String subjectId,
                                                  java.lang.String permissionType)
find the first permission entry in the list of entries

Parameters:
permissionEntries -
roleName -
attributeDefNameName -
action -
subjectSourceId -
subjectId -
permissionType - e.g. role or role_subject
Returns:
true if the item is in the list

collectionFindFirst

public static PermissionEntry collectionFindFirst(java.util.Collection<PermissionEntry> permissionEntries,
                                                  java.lang.String roleName,
                                                  java.lang.String attributeDefNameName,
                                                  java.lang.String action,
                                                  java.lang.String subjectSourceId,
                                                  java.lang.String subjectId,
                                                  java.lang.String permissionType,
                                                  boolean considerPermissionType)
find the first permission entry in the list of entries

Parameters:
permissionEntries -
roleName -
attributeDefNameName -
action -
subjectSourceId -
subjectId -
permissionType - e.g. role or role_subject
considerPermissionType -
Returns:
true if the item is in the list

getActionId

public java.lang.String getActionId()
action on the perimssion (e.g. read, write, assign (default), etc

Returns:
action

setActionId

public void setActionId(java.lang.String actionId1)
action on the perimssion (e.g. read, write, assign (default), etc

Parameters:
actionId1 -

getMembershipDepth

public int getMembershipDepth()
depth of memberships, 0 means immediate

Returns:
depth

setMembershipDepth

public void setMembershipDepth(int membershipDepth1)
depth of memberships, 0 means immediate

Parameters:
membershipDepth1 -

getRoleSetDepth

public int getRoleSetDepth()
depth of role hierarchy, 0 means immediate, -1 means no role set involved

Returns:
depth

setRoleSetDepth

public void setRoleSetDepth(int roleSetDepth1)
depth of role hierarchy, 0 means immediate, -1 means no role set involved

Parameters:
roleSetDepth1 -

getAttributeDefNameSetDepth

public int getAttributeDefNameSetDepth()
depth of attributeDefName set hierarchy, 0 means immediate

Returns:
depth

setAttributeDefNameSetDepth

public void setAttributeDefNameSetDepth(int attributeDefNameSetDepth1)
depth of attributeDefName set hierarchy, 0 means immediate

Parameters:
attributeDefNameSetDepth1 -

getAttributeAssignActionSetDepth

public int getAttributeAssignActionSetDepth()
depth of action hierarchy, 0 means immediate

Returns:
depth

setAttributeAssignActionSetDepth

public void setAttributeAssignActionSetDepth(int attributeAssignActionSetDepth1)
depth of action hierarchy, 0 means immediate

Parameters:
attributeAssignActionSetDepth1 -

getRoleName

public java.lang.String getRoleName()
role which has the permission or which the subject must be in to have the permission

Returns:
the roleName

setRoleName

public void setRoleName(java.lang.String roleName1)
role which has the permission or which the subject must be in to have the permission

Parameters:
roleName1 - the roleName to set

getSubjectSourceId

public java.lang.String getSubjectSourceId()
source id of the subject which has the permissions

Returns:
the subjectSourceId

setSubjectSourceId

public void setSubjectSourceId(java.lang.String subjectSourceId1)
source id of the subject which has the permissions

Parameters:
subjectSourceId1 - the subjectSourceId to set

getSubjectId

public java.lang.String getSubjectId()
subject id of the subject which has the permissions

Returns:
the subjectId

setSubjectId

public void setSubjectId(java.lang.String subjectId1)
subject id of the subject which has the permissions

Parameters:
subjectId1 - the subjectId to set

getAction

public java.lang.String getAction()
action on the perimssion (e.g. read, write, assign (default), etc

Returns:
the action

setAction

public void setAction(java.lang.String action1)
action on the perimssion (e.g. read, write, assign (default), etc

Parameters:
action1 - the action to set

getAttributeDefNameName

public java.lang.String getAttributeDefNameName()
name of the attribute def name which is the permission assigned to the role or subject

Returns:
the attributeDefNameName

setAttributeDefNameName

public void setAttributeDefNameName(java.lang.String attributeDefNameName1)
name of the attribute def name which is the permission assigned to the role or subject

Parameters:
attributeDefNameName1 - the attributeDefNameName to set

getAttributeDefNameDispName

public java.lang.String getAttributeDefNameDispName()
display name of the attribute def name which is the permission assigned to the role or subject

Returns:
the attributeDefNameDispName

setAttributeDefNameDispName

public void setAttributeDefNameDispName(java.lang.String attributeDefNameDispName1)
display name of the attribute def name which is the permission assigned to the role or subject

Parameters:
attributeDefNameDispName1 - the attributeDefNameDispName to set

getRoleDisplayName

public java.lang.String getRoleDisplayName()
display name of the role which the subject is in to have the permission

Returns:
the roleDisplayName

setRoleDisplayName

public void setRoleDisplayName(java.lang.String roleDisplayName1)
display name of the role which the subject is in to have the permission

Parameters:
roleDisplayName1 - the roleDisplayName to set

getRoleId

public java.lang.String getRoleId()
id of the role which the subject is in to get the permission

Returns:
the roleId

setRoleId

public void setRoleId(java.lang.String roleId1)
id of the role which the subject is in to get the permission

Parameters:
roleId1 - the roleId to set

getAttributeDefId

public java.lang.String getAttributeDefId()
id of the attributeDef

Returns:
the attributeDefId

setAttributeDefId

public void setAttributeDefId(java.lang.String attributeDefId1)
id of the attributeDef

Parameters:
attributeDefId1 - the attributeDefId to set

getMemberId

public java.lang.String getMemberId()
id of the member that has the permission

Returns:
the memberId

setMemberId

public void setMemberId(java.lang.String memberId1)
id of the member that has the permission

Parameters:
memberId1 - the memberId to set

getAttributeDefNameId

public java.lang.String getAttributeDefNameId()
id of the attribute def name which is the permission

Returns:
the attributeDefNameId

setAttributeDefNameId

public void setAttributeDefNameId(java.lang.String attributeDefNameId1)
id of the attribute def name which is the permission

Parameters:
attributeDefNameId1 - the attributeDefNameId to set

clone

public GrouperAPI clone()
Description copied from class: GrouperAPI
deep clone the fields in this object

Specified by:
clone in interface GrouperCloneable
Specified by:
clone in class GrouperAPI
Returns:
the clone of the object
See Also:
GrouperAPI.clone()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getAttributeAssignDelegatable

public AttributeAssignDelegatable getAttributeAssignDelegatable()
get the enum for delegatable, do not return null

Returns:
the attributeAssignDelegatable

getAttributeAssignDelegatableDb

public java.lang.String getAttributeAssignDelegatableDb()
internal method for hibernate to persist this enum

Returns:
the string value (enum name)

getDisabledTime

public java.sql.Timestamp getDisabledTime()
if there is a date here, and it is in the past, this assignment is disabled

Returns:
the disabledTimeDb

getDisabledTimeDb

public java.lang.Long getDisabledTimeDb()
if there is a date here, and it is in the past, this assignment is disabled

Returns:
the disabledTimeDb

getEnabledDb

public java.lang.String getEnabledDb()
true or false for if this assignment is enabled (e.g. might have expired)

Returns:
the enabled

getEnabledTime

public java.sql.Timestamp getEnabledTime()
if there is a date here, and it is in the future, this assignment is disabled until that time

Returns:
the enabledTimeDb

getEnabledTimeDb

public java.lang.Long getEnabledTimeDb()
if there is a date here, and it is in the future, this assignment is disabled until that time

Returns:
the enabledTimeDb

isEnabled

public boolean isEnabled()
true or false for if this assignment is enabled (e.g. might have expired)

Returns:
the enabled

setAttributeAssignDelegatable

public void setAttributeAssignDelegatable(AttributeAssignDelegatable attributeAssignDelegatable1)
Parameters:
attributeAssignDelegatable1 - the attributeAssignDelegatable to set

setAttributeAssignDelegatableDb

public void setAttributeAssignDelegatableDb(java.lang.String theAttributeAssignDelegatableDb)
internal method for hibernate to set if delegatable

Parameters:
theAttributeAssignDelegatableDb -

setDisabledTime

public void setDisabledTime(java.sql.Timestamp disabledTimeDb1)
if there is a date here, and it is in the past, this assignment is disabled

Parameters:
disabledTimeDb1 - the disabledTimeDb to set

setDisabledTimeDb

public void setDisabledTimeDb(java.lang.Long disabledTimeDb1)
if there is a date here, and it is in the past, this assignment is disabled

Parameters:
disabledTimeDb1 - the disabledTimeDb to set

setEnabled

public void setEnabled(boolean enabled1)
true or false for if this assignment is enabled (e.g. might have expired)

Parameters:
enabled1 - the enabled to set

setEnabledDb

public void setEnabledDb(java.lang.String enabled1)
true or false for if this assignment is enabled (e.g. might have expired)

Parameters:
enabled1 - the enabled to set

setEnabledTime

public void setEnabledTime(java.sql.Timestamp enabledTimeDb1)
if there is a date here, and it is in the future, this assignment is disabled until that time

Parameters:
enabledTimeDb1 - the enabledTimeDb to set

setEnabledTimeDb

public void setEnabledTimeDb(java.lang.Long enabledTimeDb1)
if there is a date here, and it is in the future, this assignment is disabled until that time

Parameters:
enabledTimeDb1 - the enabledTimeDb to set

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

getPermissionTypeDb

public java.lang.String getPermissionTypeDb()
type of permission, either assigned to role, or assigned to role and user combined: role_subject

Returns:
type of permission

setPermissionTypeDb

public void setPermissionTypeDb(java.lang.String permissionTypeDb1)
type of permission, either assigned to role, or assigned to role and user combined: role_subject

Parameters:
permissionTypeDb1 -

getPermissionType

public PermissionEntry.PermissionType getPermissionType()
type of permission, either assigned to role, or assigned to role and user combined: role_subject

Returns:
permission type

getMembershipId

public java.lang.String getMembershipId()
id of the membership row

Returns:
id of the membership row

isImmediateMembership

public boolean isImmediateMembership()
see if the membership is unassignable directly

Returns:
true if immediate

isImmediatePermission

public boolean isImmediatePermission()
see if the permission is unassignable directly

Returns:
true if immediate

setMembershipId

public void setMembershipId(java.lang.String membershipId1)
id of the membership row

Parameters:
membershipId1 -

getAttributeAssignId

public java.lang.String getAttributeAssignId()
id of the attribute assign row, either to the role, or to the role member pair

Returns:
id

setAttributeAssignId

public void setAttributeAssignId(java.lang.String attributeAssignId1)
id of the attribute assign row, either to the role, or to the role member pair

Parameters:
attributeAssignId1 -

compareTo

public int compareTo(PermissionEntry o2)
Specified by:
compareTo in interface java.lang.Comparable<PermissionEntry>
See Also:
Comparable.compareTo(java.lang.Object)