Package com.redwood.scheduler.api.model
Interface SubjectPrivilegeGrant
-
- All Superinterfaces:
Root
,SchedulerEntity
,SchedulerEntityComp
,SubjectGrant
- All Known Subinterfaces:
SubjectObjectPrivilegeGrant
,SubjectObjectTypePrivilegeGrant
public interface SubjectPrivilegeGrant extends SubjectGrant
Common interface for grants of privileges.
-
-
Field Summary
-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GrantLevel[]
getAllGrantLevels()
Get the value for AllGrantLevel.SecurityPrivilege[]
getAllowedPrivileges()
Get the value for AllowedPrivilege.SecurityPrivilege[]
getAllPrivileges()
Get the value for AllPrivilege.SecurityRank[]
getAllRanks()
Get the value for AllRank.SecurityRank
getGrantableRank()
Get the value for GrantableRank.SecurityRank
getGrantedRank()
Get the value for GrantedRank.ObjectDefinition
getObjectDefinition()
Get the ObjectDefinition.boolean
isPrivilegeGrantable(SecurityPrivilege name)
Query whether an administration privilege is granted in this grant.boolean
isPrivilegeGranted(SecurityPrivilege name)
Query whether a privilege is granted in this grant.void
setGrantableRank(SecurityRank newGrantableRank)
Set the value for GrantableRank.void
setGrantableRank(String name)
Set whether an administration privilege is granted or not on this grant.void
setGrantedRank(SecurityRank newGrantedRank)
Set the value for GrantedRank.void
setGrantedRank(String name)
Set whether a privilege is granted or not on this grant.void
setObjectDefinition(ObjectDefinition newObjectDefinition)
Set the value for ObjectDefinition.void
setPrivilegeGrantable(SecurityPrivilege privilege, boolean grantable)
Set whether an administration privilege is granted or not on this grant.void
setPrivilegeGrantable(String privilegeName, boolean grantable)
Set whether an administration privilege is granted or not on this grant.void
setPrivilegeGranted(SecurityPrivilege privilege, boolean grant)
Set whether a privilege is granted or not on this grant.void
setPrivilegeGranted(String privilegeName, boolean grant)
Set whether a privilege is granted or not on this grant.-
Methods inherited from interface com.redwood.scheduler.api.model.Root
getCreationTime, getLastModificationTime, getLastModifierSubject
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
Methods inherited from interface com.redwood.scheduler.api.model.SubjectGrant
getGranteeSubject, getGrantorSubject, isExportable, setExportable, setGranteeSubject
-
-
-
-
Method Detail
-
getAllowedPrivileges
SecurityPrivilege[] getAllowedPrivileges()
Get the value for AllowedPrivilege. (Privileges which the session user can set on this grant.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getAllPrivileges
SecurityPrivilege[] getAllPrivileges()
Get the value for AllPrivilege. (All privileges that are technically possible with this grant.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getAllRanks
SecurityRank[] getAllRanks()
Get the value for AllRank. (All ranks that are technically possible with this grant.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getAllGrantLevels
GrantLevel[] getAllGrantLevels()
Get the value for AllGrantLevel. (All grant level technically possible for the current objectdefinition.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getGrantedRank
SecurityRank getGrantedRank()
Get the value for GrantedRank. (The rank represented by the set of granted privileges.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getGrantableRank
SecurityRank getGrantableRank()
Get the value for GrantableRank. (The rank represented by the set of grantable privileges.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setGrantedRank
void setGrantedRank(SecurityRank newGrantedRank)
Set the value for GrantedRank. (The rank represented by the set of granted privileges.) This value is optional.- Parameters:
newGrantedRank
- the new value for GrantedRank.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setGrantableRank
void setGrantableRank(SecurityRank newGrantableRank)
Set the value for GrantableRank. (The rank represented by the set of grantable privileges.) This value is optional.- Parameters:
newGrantableRank
- the new value for GrantableRank.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
isPrivilegeGrantable
boolean isPrivilegeGrantable(SecurityPrivilege name)
Query whether an administration privilege is granted in this grant.- Parameters:
name
- The name of the privilege to get for this grant.- Returns:
- Whether the named privilege is granted or not as part of this grant.
-
isPrivilegeGranted
boolean isPrivilegeGranted(SecurityPrivilege name)
Query whether a privilege is granted in this grant.- Parameters:
name
- The name of the privilege to get for this grant.- Returns:
- Whether the named privilege is granted or not as part of this grant.
-
setGrantableRank
void setGrantableRank(String name) throws IllegalArgumentException
Set whether an administration privilege is granted or not on this grant.- Parameters:
name
- The name of the rank to grant.- Throws:
IllegalArgumentException
-
setGrantedRank
void setGrantedRank(String name) throws IllegalArgumentException
Set whether a privilege is granted or not on this grant.- Parameters:
name
- The name of the rank to set that the user can grant further.- Throws:
IllegalArgumentException
-
setPrivilegeGrantable
void setPrivilegeGrantable(SecurityPrivilege privilege, boolean grantable)
Set whether an administration privilege is granted or not on this grant.- Parameters:
privilege
- The privilege to set.grantable
- Whether the privilege should be grantable or not on this grant.
-
setPrivilegeGranted
void setPrivilegeGranted(SecurityPrivilege privilege, boolean grant)
Set whether a privilege is granted or not on this grant.- Parameters:
privilege
- The name of the privilege to set.grant
- Whether the named privilege should be granted or not on this grant.
-
setPrivilegeGrantable
void setPrivilegeGrantable(String privilegeName, boolean grantable) throws IllegalArgumentException
Set whether an administration privilege is granted or not on this grant.- Parameters:
privilegeName
- The name of the privilege to set.grantable
- Whether the named privilege should be grantable or not on this grant.- Throws:
IllegalArgumentException
-
setPrivilegeGranted
void setPrivilegeGranted(String privilegeName, boolean grant) throws IllegalArgumentException
Set whether a privilege is granted or not on this grant.- Parameters:
privilegeName
- The privilege to set.grant
- Whether the privilege should be granted or not on this grant.- Throws:
IllegalArgumentException
-
getObjectDefinition
ObjectDefinition getObjectDefinition()
Get the ObjectDefinition.- Returns:
- ObjectDefinition
- Throws:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
setObjectDefinition
void setObjectDefinition(ObjectDefinition newObjectDefinition)
Set the value for ObjectDefinition. This value is mandatory.- Parameters:
newObjectDefinition
- is the object to set ObjectDefinition to. The type of object that the grant applies to. If this isnull
, then the object cannot be persisted.
-
-