public interface Assignment
An Assignment represents some authority which has been granted to a SignetSubject
(often a person). The granularity of an Assignment is always Function
; that is, a Function
is the smallest unit of authority which can be assigned. An Assignment always has an organizational scope associated with it, and in the future, will also have a condition organization associated with it.
The organizational scope represents the highest level in the organizational hierarchy at which the SignetSubject
can exercise the Function
; the condition organization, when it is introduced, will be an organization to which the SignetSubject
must belong for the authority to be active. For example, an Assignment can be interpreted to mean:
"(SignetSubject
) can perform (Function
) in (organizational scope) as long as (SignetSubject
) belongs to (condition organization)".
In addition, there can be Limit
s (constraints) on the assignment. getLimitValues
returns the Limit
s applicable to this assignment, along with the values of those Limit
s.
Also, an Assignment may or may not be grantable. If the Assignment is grantable, then the SignetSubject
may assign this Function
, with scope equal to or more restrictive than his own, and with Limit
-values equal to or more restrictive than his own, to another SignetSubject
.
An existing Assignment may be modified. To save the modified Assignment, call Assignment.save().
SignetSubject
, Function
Method Summary | |
---|---|
boolean | canGrant() Indicates whether or not this Assignment can be granted to others by its current grantee. |
boolean | canUse() Indicates whether or not this Assignment can be used directly by its current grantee, or can only be granted to others. |
Function | getFunction() Gets the Function which is the subject of this Assignment. |
java.util.Set | getLimitValues() Gets the Limit s and Limit -values applied to this Assignment. |
TreeNode | getScope() Gets the scope (usually an organization) of this Assignment. |
void | setCanGrant(SignetSubject editor, boolean canGrant, boolean checkAuth) Changes the grantability of an existing Assignment. |
void | setCanUse(SignetSubject editor, boolean canUse, boolean checkAuth) Changes the direct usability of an existing Assignment. |
void | setLimitValues(SignetSubject editor, java.util.Set limitValues, boolean checkAuth) Changes the Limit -values applied to an existing Assignment. |
Methods inherited from interface edu.internet2.middleware.signet.Grantable |
---|
checkEditAuthority, createHistoryRecord, evaluate, evaluate, findDuplicates, getActualEndDatetime, getActualStartDatetime, getEffectiveDate, getExpirationDate, getGrantee, getGrantor, getHistory, getId, getProxy, getRevoker, getStatus, revoke, setEffectiveDate, setExpirationDate |
Methods inherited from interface edu.internet2.middleware.signet.Entity |
---|
getCreateDatetime |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
TreeNode getScope()
Function getFunction()
Function
which is the subject of this Assignment.
Function
which is the subject of this Assignment.boolean canGrant()
true
if this Assignment can be granted to others by its current grantee.void setCanGrant(SignetSubject editor,boolean canGrant,boolean checkAuth)throws SignetAuthorityException
Assignment.save()
.
editor
- the SignetSubject
who is responsible for this change.canGrant
- true
if this Assignment should be grantable to others by its current grantee, and false
otherwise.checkAuth
- Flag to indicate whether to check for Edit authority by given actor. Note that quite often several values may be set/updated for a Grantable for the actor. Setting checkAuth to false assumes that the caller of the ‘set‘ methods has already called checkEditAuthority(SignetSubject).SignetAuthorityException
boolean canUse()
false
if this Assignment can only be granted to others by its current grantee, and not used directly by its current grantee.void setCanUse(SignetSubject editor,boolean canUse,boolean checkAuth)throws SignetAuthorityException
Assignment.save()
;
editor
- the SignetSubject
who is responsible for this change.canUse
- false
if this Assignment should only be granted to others (and not directly used) by its current grantee, and true
otherwise.checkAuth
- Flag to indicate whether to check for Edit authority by given actor. Note that quite often several values may be set/updated for a Grantable for the actor. Setting checkAuth to false assumes that the caller of the ‘set‘ methods has already called checkEditAuthority(SignetSubject).SignetAuthorityException
java.util.Set getLimitValues()
Limit
s and Limit
-values applied to this Assignment.
LimitValue
objects, which represents all of the Limit
s (constraints) applied to this Assignment, along with the values of those Limit
s.void setLimitValues(SignetSubject editor,java.util.Set limitValues,boolean checkAuth)throws SignetAuthorityException
Limit
-values applied to an existing Assignment. To save this change in the database, call Assignment.save().
editor
- the SignetSubject
who is responsible for this change.limitValues
- the complete Set of LimitValue
s that should be associated with this Assignment.checkAuth
- Flag to indicate whether to check for Edit authority by given actor. Note that quite often several values may be set/updated for a Grantable for the actor. Setting checkAuth to false assumes that the caller of the ‘set‘ methods has already called checkEditAuthority(SignetSubject).SignetAuthorityException
联系客服