org.yawlfoundation.yawl.resourcing.resource
Class Participant

java.lang.Object
  extended by org.yawlfoundation.yawl.resourcing.resource.AbstractResource
      extended by org.yawlfoundation.yawl.resourcing.resource.Participant
All Implemented Interfaces:
Cloneable

public class Participant
extends AbstractResource
implements Cloneable

Represents a single participant (i.e. human) resource. Also manages the participant's work queues.

Author:
Michael Adams v0.1, 03/08/2007

Nested Class Summary
 
Nested classes/interfaces inherited from class org.yawlfoundation.yawl.resourcing.resource.AbstractResource
AbstractResource.BlockType
 
Field Summary
 
Fields inherited from class org.yawlfoundation.yawl.resourcing.resource.AbstractResource
_blockedDuration, _blockType, _description, _isAvailable, _notes, _resourceID
 
Constructor Summary
Participant()
          CONSTRUCTORS
Participant(boolean newParticipant)
           
Participant(org.jdom.Element e)
           
Participant(String id)
           
Participant(String lastName, String firstName, String userID)
           
Participant(String lastName, String firstName, String userid, boolean persist)
           
Participant(String lastname, String firstname, String userID, boolean isAdministrator, Set<Position> positions, Set<Role> roles, Set<Capability> capabilities)
           
 
Method Summary
 void addCapability(Capability cap)
           
 void addCapability(String cid)
           
 void addPosition(Position pos)
           
 void addPosition(String pid)
           
 void addRole(Role role)
           
 void addRole(String rid)
           
 void attachWorkQueue(WorkQueue q, boolean persisting)
           
 Participant clone()
           
 QueueSet createQueueSet(boolean persisting)
           
 void fromXML(String xml)
           
 Set<AbstractResourceAttribute> getAttributeReferences()
           
 Set<Capability> getCapabilities()
           
 String getFirstName()
           
 String getFullName()
           
 String getLastName()
           
 String getName()
           
 String getPassword()
           
 Set<Position> getPositions()
           
 Set<Role> getRoles()
           
 String getUserID()
           
 UserPrivileges getUserPrivileges()
           
 QueueSet getWorkQueues()
           
 QueueSet getWorkQueues(boolean init)
          returns an initialised qSet if init is true
 boolean hasCapability(Capability cap)
           
 boolean hasPosition(Position pos)
           
 boolean hasRole(Role role)
           
 boolean isAdministrator()
           
 boolean isOrgGroupMember(OrgGroup og)
           
 boolean isPersisting()
           
 boolean isValidPassword(String password)
           
 void merge(Participant p)
           
 void mergeCapabilities(Set<Capability> capSet)
           
 void mergePositions(Set<Position> posSet)
           
 void mergeRoles(Set<Role> roleSet)
           
 void reconstitute(org.jdom.Element e)
           
 void removeAttributeReferences()
           
 void removeCapabilities()
           
 void removeCapability(Capability cap)
           
 void removeCapability(String cid)
           
 void removePosition(Position pos)
           
 void removePosition(String pid)
           
 void removePositions()
           
 void removeRole(Role role)
           
 void removeRole(String rid)
           
 void removeRoles()
           
 void save()
           
 void setAdministrator(boolean canAdministrate)
           
 void setAttributeReferences(Set<AbstractResourceAttribute> attributes)
           
 void setCapabilities(Set<Capability> capSet)
           
 void setFirstName(String name)
           
 void setID(String id)
          GETTERS & SETTERS
 void setLastName(String name)
           
 void setPassword(String pw)
           
 void setPassword(String pw, boolean encrypt)
           
 void setPersisting(boolean persisting)
           
 void setPositions(Set<Position> posSet)
           
 void setRoles(Set<Role> roleSet)
           
 void setUserID(String id)
           
 void setUserPrivileges(UserPrivileges up)
           
 void setWorkQueues(QueueSet q)
           
 String toXML()
           
 
Methods inherited from class org.yawlfoundation.yawl.resourcing.resource.AbstractResource
equals, getBlockedDuration, getBlockType, getDescription, getID, getNotes, hashCode, isAvailable, isAvailable, merge, setBlockedDuration, setBlockedDuration, setBlockType, setDescription, setNotes, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Participant

public Participant()
CONSTRUCTORS


Participant

public Participant(boolean newParticipant)

Participant

public Participant(String id)

Participant

public Participant(String lastName,
                   String firstName,
                   String userID)

Participant

public Participant(String lastName,
                   String firstName,
                   String userid,
                   boolean persist)

Participant

public Participant(String lastname,
                   String firstname,
                   String userID,
                   boolean isAdministrator,
                   Set<Position> positions,
                   Set<Role> roles,
                   Set<Capability> capabilities)

Participant

public Participant(org.jdom.Element e)
Method Detail

clone

public Participant clone()
                  throws CloneNotSupportedException
Overrides:
clone in class AbstractResource
Throws:
CloneNotSupportedException

merge

public void merge(Participant p)

save

public void save()
          throws ResourceGatewayException
Throws:
ResourceGatewayException

setPersisting

public void setPersisting(boolean persisting)

isPersisting

public boolean isPersisting()

setID

public void setID(String id)
GETTERS & SETTERS

Overrides:
setID in class AbstractResource

getName

public String getName()
Specified by:
getName in class AbstractResource

getFirstName

public String getFirstName()

setFirstName

public void setFirstName(String name)

getLastName

public String getLastName()

setLastName

public void setLastName(String name)

getFullName

public String getFullName()

getUserID

public String getUserID()

setUserID

public void setUserID(String id)

getPassword

public String getPassword()

setPassword

public void setPassword(String pw)

setPassword

public void setPassword(String pw,
                        boolean encrypt)

isValidPassword

public boolean isValidPassword(String password)

isAdministrator

public boolean isAdministrator()

setAdministrator

public void setAdministrator(boolean canAdministrate)

setUserPrivileges

public void setUserPrivileges(UserPrivileges up)

getUserPrivileges

public UserPrivileges getUserPrivileges()

getRoles

public Set<Role> getRoles()

setRoles

public void setRoles(Set<Role> roleSet)

addRole

public void addRole(Role role)

addRole

public void addRole(String rid)
             throws ResourceGatewayException
Throws:
ResourceGatewayException

mergeRoles

public void mergeRoles(Set<Role> roleSet)

removeRole

public void removeRole(Role role)

removeRole

public void removeRole(String rid)

removeRoles

public void removeRoles()

hasRole

public boolean hasRole(Role role)

getCapabilities

public Set<Capability> getCapabilities()

setCapabilities

public void setCapabilities(Set<Capability> capSet)

addCapability

public void addCapability(Capability cap)

addCapability

public void addCapability(String cid)
                   throws ResourceGatewayException
Throws:
ResourceGatewayException

mergeCapabilities

public void mergeCapabilities(Set<Capability> capSet)

removeCapability

public void removeCapability(Capability cap)

removeCapability

public void removeCapability(String cid)

removeCapabilities

public void removeCapabilities()

hasCapability

public boolean hasCapability(Capability cap)

getPositions

public Set<Position> getPositions()

setPositions

public void setPositions(Set<Position> posSet)

addPosition

public void addPosition(Position pos)

addPosition

public void addPosition(String pid)
                 throws ResourceGatewayException
Throws:
ResourceGatewayException

removePosition

public void removePosition(Position pos)

removePosition

public void removePosition(String pid)

removePositions

public void removePositions()

mergePositions

public void mergePositions(Set<Position> posSet)

hasPosition

public boolean hasPosition(Position pos)

removeAttributeReferences

public void removeAttributeReferences()

getAttributeReferences

public Set<AbstractResourceAttribute> getAttributeReferences()

setAttributeReferences

public void setAttributeReferences(Set<AbstractResourceAttribute> attributes)

isOrgGroupMember

public boolean isOrgGroupMember(OrgGroup og)

getWorkQueues

public QueueSet getWorkQueues()

setWorkQueues

public void setWorkQueues(QueueSet q)

getWorkQueues

public QueueSet getWorkQueues(boolean init)
returns an initialised qSet if init is true


createQueueSet

public QueueSet createQueueSet(boolean persisting)

attachWorkQueue

public void attachWorkQueue(WorkQueue q,
                            boolean persisting)

toXML

public String toXML()

fromXML

public void fromXML(String xml)

reconstitute

public void reconstitute(org.jdom.Element e)


Copyright © 2004-2012 The YAWL Foundation.