Assignment

来源:百度文库 编辑:神马文学网 时间:2024/04/29 04:04:55
edu.internet2.middleware.signet
Interface Assignment
All Superinterfaces:java.lang.Comparable,Entity,Grantable
All Known Implementing Classes:AssignmentImpl
public interface AssignmentextendsGrantable
An Assignment represents some authority which has been granted to aSignetSubject (often a person). The granularity of an Assignment is alwaysFunction; 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 beLimits (constraints) on the assignment. getLimitValues returns the Limits applicable to this assignment, along with the values of those Limits.
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().
See Also:SignetSubject,Function
Method Summary
booleancanGrant()
Indicates whether or not this Assignment can be granted to others by its current grantee.
booleancanUse()
Indicates whether or not this Assignment can be used directly by its current grantee, or can only be granted to others.
FunctiongetFunction()
Gets the Function which is the subject of this Assignment.
java.util.SetgetLimitValues()
Gets theLimits and Limit-values applied to this Assignment.
TreeNodegetScope()
Gets the scope (usually an organization) of this Assignment.
voidsetCanGrant(SignetSubject editor, boolean canGrant, boolean checkAuth)
Changes the grantability of an existing Assignment.
voidsetCanUse(SignetSubject editor, boolean canUse, boolean checkAuth)
Changes the direct usability of an existing Assignment.
voidsetLimitValues(SignetSubject editor, java.util.Set limitValues, boolean checkAuth)
Changes theLimit-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
getScope
TreeNode getScope()Gets the scope (usually an organization) of this Assignment.
 
Returns:the scope (usually an organization) of this Assignment.
getFunction
Function getFunction()Gets the Function which is the subject of this Assignment.
 
Returns:the Function which is the subject of this Assignment.
canGrant
boolean canGrant()Indicates whether or not this Assignment can be granted to others by its current grantee.
 
Returns:true if this Assignment can be granted to others by its current grantee.
setCanGrant
void setCanGrant(SignetSubject editor,boolean canGrant,boolean checkAuth)throwsSignetAuthorityExceptionChanges the grantability of an existing Assignment. To save this change to the database, call Assignment.save().
 
Parameters: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).Throws:SignetAuthorityException
canUse
boolean canUse()Indicates whether or not this Assignment can be used directly by its current grantee, or can only be granted to others.
 
Returns:false if this Assignment can only be granted to others by its current grantee, and not used directly by its current grantee.
setCanUse
void setCanUse(SignetSubject editor,boolean canUse,boolean checkAuth)throwsSignetAuthorityExceptionChanges the direct usability of an existing Assignment. To save this change to the database, call Assignment.save();
 
Parameters: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).Throws:SignetAuthorityException
getLimitValues
java.util.Set getLimitValues()Gets theLimits and Limit-values applied to this Assignment.
 
Returns:a set ofLimitValue objects, which represents all of the Limits (constraints) applied to this Assignment, along with the values of those Limits.
setLimitValues
void setLimitValues(SignetSubject editor,java.util.Set limitValues,boolean checkAuth)throwsSignetAuthorityExceptionChanges theLimit-values applied to an existing Assignment. To save this change in the database, call Assignment.save().
 
Parameters:editor - the SignetSubject who is responsible for this change.limitValues - the complete Set ofLimitValues 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).Throws:SignetAuthorityException