public class TaskPrivileges
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CAN_DEALLOCATE |
static int |
CAN_DELEGATE |
static int |
CAN_PILE |
static int |
CAN_REALLOCATE_STATEFUL |
static int |
CAN_REALLOCATE_STATELESS |
static int |
CAN_SKIP |
static int |
CAN_SUSPEND |
Constructor and Description |
---|
TaskPrivileges()
**************************************************************************
|
TaskPrivileges(java.lang.String taskID) |
TaskPrivileges(YSpecificationID specID,
java.lang.String taskID) |
Modifier and Type | Method and Description |
---|---|
void |
addParticipantToPrivilegeUnchecked(java.lang.String pid,
int priv)
grant the privilege to the Participant without checking the validity of the id.
|
void |
addRoleToPrivilegeUnchecked(java.lang.String rid,
int priv)
grant the privilege to the Role without checking the validity of the id.
|
void |
allowAll(int privilege)
grant a privilege to all Participants
|
void |
allowAll(java.lang.String privilegeStr) |
boolean |
canDeallocate(Participant p) |
boolean |
canDelegate(Participant p) |
boolean |
canPile(Participant p) |
boolean |
canReallocateStateful(Participant p) |
boolean |
canReallocateStateless(Participant p) |
boolean |
canSkip(Participant p) |
boolean |
canSuspend(Participant p)
Convenience boolean methods - return true if the Particpant passed has
been granted the privilege
|
void |
disallowAll(int privilege)
disallow a privilege for all Participants
|
void |
disallowAll(java.lang.String privilegeStr) |
int |
getPrivilegeType(java.lang.String privStr)
returns the privilege type for the string version passed
|
YSpecificationID |
getSpecID() |
java.lang.String |
getTaskID() |
void |
grant(int priv,
Participant p)
Grants a privilege to a Participant
|
void |
grant(int priv,
java.util.Set<Participant> pSet)
Grants a privilege to set of Participant
|
void |
grant(int priv,
java.lang.String id)
Grants the privilege the Participant with id passed
|
void |
grant(java.lang.String privName,
Participant p) |
void |
grant(java.lang.String privName,
java.util.Set<Participant> pSet) |
void |
grantByID(int priv,
java.util.Set pSet)
Grants a privilege to set of Participant using a set of ids
|
void |
grantDeallocate(Participant p) |
void |
grantDeallocate(java.util.Set<Participant> p) |
void |
grantDeallocateByID(java.util.Set userids) |
void |
grantDeallocateByID(java.lang.String userid) |
void |
grantDelegate(Participant p) |
void |
grantDelegate(java.util.Set<Participant> p) |
void |
grantDelegateByID(java.util.Set userids) |
void |
grantDelegateByID(java.lang.String userid) |
void |
grantPile(Participant p) |
void |
grantPile(java.util.Set<Participant> p) |
void |
grantPileByID(java.util.Set userids) |
void |
grantPileByID(java.lang.String userid) |
void |
grantReallocateStateful(Participant p) |
void |
grantReallocateStateful(java.util.Set<Participant> p) |
void |
grantReallocateStatefulByID(java.util.Set userids) |
void |
grantReallocateStatefulByID(java.lang.String userid) |
void |
grantReallocateStateless(Participant p) |
void |
grantReallocateStateless(java.util.Set<Participant> p) |
void |
grantReallocateStatelessByID(java.util.Set userids) |
void |
grantReallocateStatelessByID(java.lang.String userid) |
void |
grantSkip(Participant p) |
void |
grantSkip(java.util.Set<Participant> p) |
void |
grantSkipByID(java.util.Set userids) |
void |
grantSkipByID(java.lang.String userid) |
void |
grantSuspend(Participant p)
Convenience grant methods (by Participant, id, Participant set, id Set)
|
void |
grantSuspend(java.util.Set<Participant> p) |
void |
grantSuspendByID(java.util.Set userids) |
void |
grantSuspendByID(java.lang.String userid) |
boolean |
hasParticipants(int priv)
returns true if at least one Participant has been granted the Privilege
|
boolean |
hasPrivilege(Participant p,
int privilege)
returns true if the Participant has been granted the Privilege
|
void |
parse(Element e,
Namespace nsYawl)
Parses the xml element passed into a set of privileges and who has them
|
void |
setSpecID(YSpecificationID specID) |
void |
setTaskID(java.lang.String taskID) |
java.lang.String |
toXML()
creates xml to describe the entire object
|
java.lang.String |
toXML(boolean full) |
public static final int CAN_SUSPEND
public static final int CAN_REALLOCATE_STATELESS
public static final int CAN_REALLOCATE_STATEFUL
public static final int CAN_DEALLOCATE
public static final int CAN_DELEGATE
public static final int CAN_SKIP
public static final int CAN_PILE
public TaskPrivileges()
public TaskPrivileges(java.lang.String taskID)
public TaskPrivileges(YSpecificationID specID, java.lang.String taskID)
public YSpecificationID getSpecID()
public void setSpecID(YSpecificationID specID)
public java.lang.String getTaskID()
public void setTaskID(java.lang.String taskID)
public int getPrivilegeType(java.lang.String privStr)
public void grant(int priv, java.lang.String id)
priv
- the privilege to grantid
- the id of the Participant (must be a known Participant id)public void grant(int priv, Participant p)
priv
- the privilege to grantp
- the Participantpublic void grant(java.lang.String privName, Participant p)
public void grant(int priv, java.util.Set<Participant> pSet)
priv
- the privilege to grantpSet
- the Participant Setpublic void grant(java.lang.String privName, java.util.Set<Participant> pSet)
public void grantByID(int priv, java.util.Set pSet)
priv
- the privilege to grantpSet
- the Set of Participant idspublic void allowAll(int privilege)
public void allowAll(java.lang.String privilegeStr)
public void disallowAll(int privilege)
public void disallowAll(java.lang.String privilegeStr)
public void addParticipantToPrivilegeUnchecked(java.lang.String pid, int priv)
public void addRoleToPrivilegeUnchecked(java.lang.String rid, int priv)
public void grantSuspend(Participant p)
public void grantReallocateStateless(Participant p)
public void grantReallocateStateful(Participant p)
public void grantDeallocate(Participant p)
public void grantDelegate(Participant p)
public void grantSkip(Participant p)
public void grantPile(Participant p)
public void grantSuspend(java.util.Set<Participant> p)
public void grantReallocateStateless(java.util.Set<Participant> p)
public void grantReallocateStateful(java.util.Set<Participant> p)
public void grantDeallocate(java.util.Set<Participant> p)
public void grantDelegate(java.util.Set<Participant> p)
public void grantSkip(java.util.Set<Participant> p)
public void grantPile(java.util.Set<Participant> p)
public void grantSuspendByID(java.lang.String userid)
public void grantReallocateStatelessByID(java.lang.String userid)
public void grantReallocateStatefulByID(java.lang.String userid)
public void grantDeallocateByID(java.lang.String userid)
public void grantDelegateByID(java.lang.String userid)
public void grantSkipByID(java.lang.String userid)
public void grantPileByID(java.lang.String userid)
public void grantSuspendByID(java.util.Set userids)
public void grantReallocateStatelessByID(java.util.Set userids)
public void grantReallocateStatefulByID(java.util.Set userids)
public void grantDeallocateByID(java.util.Set userids)
public void grantDelegateByID(java.util.Set userids)
public void grantSkipByID(java.util.Set userids)
public void grantPileByID(java.util.Set userids)
public boolean canSuspend(Participant p)
public boolean canReallocateStateless(Participant p)
public boolean canReallocateStateful(Participant p)
public boolean canDeallocate(Participant p)
public boolean canDelegate(Participant p)
public boolean canSkip(Participant p)
public boolean canPile(Participant p)
public boolean hasPrivilege(Participant p, int privilege)
public boolean hasParticipants(int priv)
public void parse(Element e, Namespace nsYawl)
e
- the element containing the privileges from the spec xmlpublic java.lang.String toXML()
public java.lang.String toXML(boolean full)
Copyright © 2004-2014 The YAWL Foundation.