|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.webactiv.beans.admin.RightAssignationContext
public class RightAssignationContext
This class permits to specify the context of a right assignation operations (copy or replace for
now).
It simplifies significantly all the method definition that perform right assignation operations.
Nested Class Summary | |
---|---|
static class |
RightAssignationContext.MODE
|
Method Summary | |
---|---|
boolean |
areSourceAndTargetEqual()
Indicates if the source and target are equal. |
static RightAssignationContext |
copy()
Initializes a right assignation context by specifying directly a copy operation. |
RightAssignationContext |
fromGroupId(String groupId)
Indicates the source identifier of a group. |
RightAssignationContext |
fromUserId(String userId)
Indicates the source identifier of a user. |
String |
getAuthor()
Gets the identifier of the user behind the assignation operation. |
RightAssignationContext.MODE |
getMode()
Gets the operation mode (copy or replace for now) |
String |
getSourceId()
Gets the identifier of the resource source. |
com.stratelia.webactiv.beans.admin.RightAssignationContext.RESOURCE_TYPE |
getSourceType()
Gets the RightAssignationContext.RESOURCE_TYPE of the resource source. |
String |
getTargetId()
Gets the identifier of the resource target. |
com.stratelia.webactiv.beans.admin.RightAssignationContext.RESOURCE_TYPE |
getTargetType()
Gets the RightAssignationContext.RESOURCE_TYPE of the resource target. |
boolean |
isAssignObjectRights()
Indicates if component object rights must also be assigned. |
static RightAssignationContext |
replace()
Initializes a right assignation context by specifying directly a copy operation. |
RightAssignationContext |
setAuthor(String author)
Sets the author behind the action. |
RightAssignationContext |
toGroupId(String groupId)
Indicates the target identifier of a group. |
RightAssignationContext |
toUserId(String userId)
Indicates the target identifier of a user. |
void |
verifySourceAndTargetAreDefined()
Verifies that source and target resources are defined. |
RightAssignationContext |
withoutAssigningComponentObjectRights()
Indicates that component object rights must not be assigned. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static RightAssignationContext copy()
public static RightAssignationContext replace()
public void verifySourceAndTargetAreDefined()
IllegalArgumentException
is thrown.
public boolean areSourceAndTargetEqual()
verifySourceAndTargetAreDefined()
method in order to be
sure
working on defined data.
public RightAssignationContext fromUserId(String userId)
userId
- the identifier of a user that represents the source of rights.
public RightAssignationContext fromGroupId(String groupId)
groupId
- the identifier of a group that represents the source of rights.
public RightAssignationContext toUserId(String userId)
userId
- the identifier of a user that represents the target of rights.
public RightAssignationContext toGroupId(String groupId)
groupId
- the identifier of a group that represents the target of rights.
public RightAssignationContext withoutAssigningComponentObjectRights()
public RightAssignationContext setAuthor(String author)
author
- the identifier of a user.
public RightAssignationContext.MODE getMode()
public String getSourceId()
public com.stratelia.webactiv.beans.admin.RightAssignationContext.RESOURCE_TYPE getSourceType()
RightAssignationContext.RESOURCE_TYPE
of the resource source.
RightAssignationContext.RESOURCE_TYPE
of the resource source.public String getTargetId()
public com.stratelia.webactiv.beans.admin.RightAssignationContext.RESOURCE_TYPE getTargetType()
RightAssignationContext.RESOURCE_TYPE
of the resource target.
RightAssignationContext.RESOURCE_TYPE
of the resource target.public boolean isAssignObjectRights()
public String getAuthor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |