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, Serializable, Comparable<PermissionEntry>, org.hibernate.classic.Lifecycle

public class PermissionEntry
extends GrouperAPI
implements 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(Collection<PermissionEntry> permissionEntries, String roleName, String attributeDefNameName, String action, String subjectSourceId, String subjectId)
          see if a permission is in the list of entries
static PermissionEntry collectionFindFirst(Collection<PermissionEntry> permissionEntries, String roleName, String attributeDefNameName, String action, String subjectSourceId, String subjectId, String permissionType)
          find the first permission entry in the list of entries
static PermissionEntry collectionFindFirst(Collection<PermissionEntry> permissionEntries, String roleName, String attributeDefNameName, String action, String subjectSourceId, String subjectId, String permissionType, boolean considerPermissionType)
          find the first permission entry in the list of entries
 int compareTo(PermissionEntry o2)
           
 boolean equals(Object obj)
           
 String getAction()
          action on the perimssion (e.g.
 String getActionId()
          action on the perimssion (e.g.
 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
 String getAttributeAssignDelegatableDb()
          internal method for hibernate to persist this enum
 String getAttributeAssignId()
          id of the attribute assign row, either to the role, or to the role member pair
 String getAttributeDefId()
          id of the attributeDef
 String getAttributeDefNameDispName()
          display name of the attribute def name which is the permission assigned to the role or subject
 String getAttributeDefNameId()
          id of the attribute def name which is the permission
 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
 Timestamp getDisabledTime()
          if there is a date here, and it is in the past, this assignment is disabled
 Long getDisabledTimeDb()
          if there is a date here, and it is in the past, this assignment is disabled
 String getEnabledDb()
          true or false for if this assignment is enabled (e.g.
 Timestamp getEnabledTime()
          if there is a date here, and it is in the future, this assignment is disabled until that time
 Long getEnabledTimeDb()
          if there is a date here, and it is in the future, this assignment is disabled until that time
 Timestamp getImmediateMshipDisabledTime()
          when the underlying membership will be disabled
 Long getImmediateMshipDisabledTimeDb()
          when the underlying membership will be disabled
 Timestamp getImmediateMshipEnabledTime()
          when the underlying membership was enabled
 Long getImmediateMshipEnabledTimeDb()
          when the underlying membership was enabled
 String getMemberId()
          id of the member that has the permission
 int getMembershipDepth()
          depth of memberships, 0 means immediate
 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
 String getPermissionTypeDb()
          type of permission, either assigned to role, or assigned to role and user combined: role_subject
 String getRoleDisplayName()
          display name of the role which the subject is in to have the permission
 String getRoleId()
          id of the role which the subject is in to get the permission
 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
 String getSubjectId()
          subject id of the subject which has the permissions
 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.
 boolean isImmediateMembership()
          see if the membership is unassignable directly
 boolean isImmediatePermission()
          see if the permission is unassignable directly
 void setAction(String action1)
          action on the perimssion (e.g.
 void setActionId(String actionId1)
          action on the perimssion (e.g.
 void setAssignmentNotes(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(String theAttributeAssignDelegatableDb)
          internal method for hibernate to set if delegatable
 void setAttributeAssignId(String attributeAssignId1)
          id of the attribute assign row, either to the role, or to the role member pair
 void setAttributeDefId(String attributeDefId1)
          id of the attributeDef
 void setAttributeDefNameDispName(String attributeDefNameDispName1)
          display name of the attribute def name which is the permission assigned to the role or subject
 void setAttributeDefNameId(String attributeDefNameId1)
          id of the attribute def name which is the permission
 void setAttributeDefNameName(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(Timestamp disabledTimeDb1)
          if there is a date here, and it is in the past, this assignment is disabled
 void setDisabledTimeDb(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.
 void setEnabledDb(String enabled1)
          true or false for if this assignment is enabled (e.g.
 void setEnabledTime(Timestamp enabledTimeDb1)
          if there is a date here, and it is in the future, this assignment is disabled until that time
 void setEnabledTimeDb(Long enabledTimeDb1)
          if there is a date here, and it is in the future, this assignment is disabled until that time
 void setImmediateMshipDisabledTimeDb(Long immediateMshipDisabledTimeDb1)
          when the underlying membership was enabled
 void setImmediateMshipDisabledTimeDb(Timestamp immediateMshipDisabledTimeDb1)
          when the underlying membership was enabled
 void setImmediateMshipEnabledTime(Timestamp immediateMshipEnabledTimeDb1)
          when the underlying membership was enabled
 void setImmediateMshipEnabledTimeDb(Long immediateMshipEnabledTimeDb1)
          when the underlying membership was enabled
 void setMemberId(String memberId1)
          id of the member that has the permission
 void setMembershipDepth(int membershipDepth1)
          depth of memberships, 0 means immediate
 void setMembershipId(String membershipId1)
          id of the membership row
 void setPermissionTypeDb(String permissionTypeDb1)
          type of permission, either assigned to role, or assigned to role and user combined: role_subject
 void setRoleDisplayName(String roleDisplayName1)
          display name of the role which the subject is in to have the permission
 void setRoleId(String roleId1)
          id of the role which the subject is in to get the permission
 void setRoleName(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(String subjectId1)
          subject id of the subject which has the permissions
 void setSubjectSourceId(String subjectSourceId1)
          source id of the subject which has the permissions
 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 String getAssignmentNotes()
notes on the assignment of privilege

Returns:
notes

setAssignmentNotes

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

Parameters:
assignmentNotes1 -

collectionContains

public static boolean collectionContains(Collection<PermissionEntry> permissionEntries,
                                         String roleName,
                                         String attributeDefNameName,
                                         String action,
                                         String subjectSourceId,
                                         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(Collection<PermissionEntry> permissionEntries,
                                                  String roleName,
                                                  String attributeDefNameName,
                                                  String action,
                                                  String subjectSourceId,
                                                  String subjectId,
                                                  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(Collection<PermissionEntry> permissionEntries,
                                                  String roleName,
                                                  String attributeDefNameName,
                                                  String action,
                                                  String subjectSourceId,
                                                  String subjectId,
                                                  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

getImmediateMshipEnabledTimeDb

public Long getImmediateMshipEnabledTimeDb()
when the underlying membership was enabled

Returns:
time

getImmediateMshipEnabledTime

public Timestamp getImmediateMshipEnabledTime()
when the underlying membership was enabled

Returns:
time

setImmediateMshipEnabledTimeDb

public void setImmediateMshipEnabledTimeDb(Long immediateMshipEnabledTimeDb1)
when the underlying membership was enabled

Parameters:
immediateMshipEnabledTimeDb1 -

setImmediateMshipEnabledTime

public void setImmediateMshipEnabledTime(Timestamp immediateMshipEnabledTimeDb1)
when the underlying membership was enabled

Parameters:
immediateMshipEnabledTimeDb1 -

getImmediateMshipDisabledTimeDb

public Long getImmediateMshipDisabledTimeDb()
when the underlying membership will be disabled

Returns:
time

setImmediateMshipDisabledTimeDb

public void setImmediateMshipDisabledTimeDb(Long immediateMshipDisabledTimeDb1)
when the underlying membership was enabled

Parameters:
immediateMshipDisabledTimeDb1 -

getImmediateMshipDisabledTime

public Timestamp getImmediateMshipDisabledTime()
when the underlying membership will be disabled

Returns:
time

setImmediateMshipDisabledTimeDb

public void setImmediateMshipDisabledTimeDb(Timestamp immediateMshipDisabledTimeDb1)
when the underlying membership was enabled

Parameters:
immediateMshipDisabledTimeDb1 -

getActionId

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

Returns:
action

setActionId

public void setActionId(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 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(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 String getSubjectSourceId()
source id of the subject which has the permissions

Returns:
the subjectSourceId

setSubjectSourceId

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

Parameters:
subjectSourceId1 - the subjectSourceId to set

getSubjectId

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

Returns:
the subjectId

setSubjectId

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

Parameters:
subjectId1 - the subjectId to set

getAction

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

Returns:
the action

setAction

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

Parameters:
action1 - the action to set

getAttributeDefNameName

public 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(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 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(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 String getRoleDisplayName()
display name of the role which the subject is in to have the permission

Returns:
the roleDisplayName

setRoleDisplayName

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

Parameters:
roleDisplayName1 - the roleDisplayName to set

getRoleId

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

Returns:
the roleId

setRoleId

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

Parameters:
roleId1 - the roleId to set

getAttributeDefId

public String getAttributeDefId()
id of the attributeDef

Returns:
the attributeDefId

setAttributeDefId

public void setAttributeDefId(String attributeDefId1)
id of the attributeDef

Parameters:
attributeDefId1 - the attributeDefId to set

getMemberId

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

Returns:
the memberId

setMemberId

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

Parameters:
memberId1 - the memberId to set

getAttributeDefNameId

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

Returns:
the attributeDefNameId

setAttributeDefNameId

public void setAttributeDefNameId(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 String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getAttributeAssignDelegatable

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

Returns:
the attributeAssignDelegatable

getAttributeAssignDelegatableDb

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

Returns:
the string value (enum name)

getDisabledTime

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

Returns:
the disabledTimeDb

getDisabledTimeDb

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

Returns:
the disabledTimeDb

getEnabledDb

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

Returns:
the enabled

getEnabledTime

public 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 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(String theAttributeAssignDelegatableDb)
internal method for hibernate to set if delegatable

Parameters:
theAttributeAssignDelegatableDb -

setDisabledTime

public void setDisabledTime(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(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(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(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(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(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

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

getPermissionTypeDb

public 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(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 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(String membershipId1)
id of the membership row

Parameters:
membershipId1 -

getAttributeAssignId

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

Returns:
id

setAttributeAssignId

public void setAttributeAssignId(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 Comparable<PermissionEntry>
See Also:
Comparable.compareTo(java.lang.Object)