org.jwarp.flow.security
Class ParticipantManager
java.lang.Object
|
+--org.jwarp.flow.security.ParticipantManager
- All Implemented Interfaces:
- IConfigurable, IParticipantManager, IWorkflowSystemAware
- public class ParticipantManager
- extends java.lang.Object
- implements IParticipantManager
|
Field Summary |
(package private) java.util.Hashtable |
participants
|
|
Method Summary |
void |
configure(org.jdom.Element config)
Pass the Configuration to the Configurable
class. |
IParticipant |
createParticipant(java.lang.String name,
java.lang.String description,
short type,
IWorkflowModel system,
ITicket user)
This creates a new participant within the given workflow model. |
IParticipant |
createParticipant(java.lang.String name,
java.lang.String description,
short type,
IWorkflowSystem system,
ITicket user)
This creates a new global participant within the given workflow system. |
IParticipant |
getParticipant(int id,
ITicket user)
Get a participant. |
java.util.Iterator |
getParticipants(IWorkflowModel model,
ITicket user)
Return all the participants valid for a model. |
IWorkflowSystem |
getWorkflowSystem()
|
void |
removeParticipant(IParticipant participant,
ITicket user)
Removes a participant from the db. |
java.util.Iterator |
searchParticipants(java.lang.String name,
IWorkflowSystem system,
IWorkflowModel model,
IWorkflow flow,
ITicket admin)
Search for participants. |
void |
setWorkflowSystem(IWorkflowSystem system)
|
void |
updateParticipant(int id,
java.lang.String newName,
java.lang.String newDescription,
short newType,
ITicket user)
Update a participant. |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
participants
java.util.Hashtable participants
ParticipantManager
public ParticipantManager()
configure
public void configure(org.jdom.Element config)
- Description copied from interface:
IConfigurable
- Pass the
Configuration to the Configurable
class. This method must always be called after the constructor and before any other method.
- Specified by:
configure in interface IConfigurable
- Following copied from interface:
org.jwarp.service.configuration.IConfigurable
- Parameters:
configuration - the class configurations.
getParticipants
public java.util.Iterator getParticipants(IWorkflowModel model,
ITicket user)
throws java.lang.SecurityException
- Description copied from interface:
IParticipantManager
- Return all the participants valid for a model. This method returns the model specific participants as also
the flow system globally defined roles.
- Specified by:
getParticipants in interface IParticipantManager
- Following copied from interface:
org.jwarp.flow.security.IParticipantManager
- Parameters:
model - The modeluser - The user ticket- Returns:
- The participants for according to the model
- Throws:
java.lang.SecurityException - If access was denied.
createParticipant
public IParticipant createParticipant(java.lang.String name,
java.lang.String description,
short type,
IWorkflowSystem system,
ITicket user)
throws InitializationException,
java.lang.SecurityException
- Description copied from interface:
IParticipantManager
- This creates a new global participant within the given workflow system.
- Specified by:
createParticipant in interface IParticipantManager
- Following copied from interface:
org.jwarp.flow.security.IParticipantManager
- Parameters:
name - The name of the new participantdescription - The participant's descriptiontype - The participant's typesystem - The systemuser - The user ticket- Returns:
- The newly created participant
- Throws:
InitializationException - If the participant could not be created.java.lang.SecurityException - If access was denied.
createParticipant
public IParticipant createParticipant(java.lang.String name,
java.lang.String description,
short type,
IWorkflowModel system,
ITicket user)
throws InitializationException,
java.lang.SecurityException
- Description copied from interface:
IParticipantManager
- This creates a new participant within the given workflow model.
- Specified by:
createParticipant in interface IParticipantManager
- Following copied from interface:
org.jwarp.flow.security.IParticipantManager
- Parameters:
name - The name of the new roledescription - The roles descriptiontype - The participant's typesystem - The systemuser - The user ticket- Returns:
- The newly created participant
- Throws:
InitializationException - If the participant could not be created.java.lang.SecurityException - If access was denied.
updateParticipant
public void updateParticipant(int id,
java.lang.String newName,
java.lang.String newDescription,
short newType,
ITicket user)
throws NotFoundException,
java.lang.SecurityException
- Description copied from interface:
IParticipantManager
- Update a participant.
- Specified by:
updateParticipant in interface IParticipantManager
- Following copied from interface:
org.jwarp.flow.security.IParticipantManager
- Parameters:
id - The participant's idname - The new participant's namedescription - The new participant's descriptionrype - The new participant's typeuser - The user ticket- Returns:
- The newly created participant
- Throws:
java.lang.SecurityException - If access was denied.NotFoundException - If the participant could not be located.
getParticipant
public IParticipant getParticipant(int id,
ITicket user)
throws java.lang.SecurityException
- Description copied from interface:
IParticipantManager
- Get a participant.
- Specified by:
getParticipant in interface IParticipantManager
- Following copied from interface:
org.jwarp.flow.security.IParticipantManager
- Parameters:
id - The participant's id numberuser - The user ticket- Returns:
- The participant
- Throws:
java.lang.SecurityException - If access was denied.
searchParticipants
public java.util.Iterator searchParticipants(java.lang.String name,
IWorkflowSystem system,
IWorkflowModel model,
IWorkflow flow,
ITicket admin)
throws java.lang.SecurityException
- Description copied from interface:
IParticipantManager
- Search for participants.
- Specified by:
searchParticipants in interface IParticipantManager
- Following copied from interface:
org.jwarp.flow.security.IParticipantManager
- Parameters:
name - The participant's namesystem - The workflow systemmodel - The workflow modelflow - The workflowadmin - The user ticket- Returns:
- The participants
- Throws:
java.lang.SecurityException - If access was denied.
removeParticipant
public void removeParticipant(IParticipant participant,
ITicket user)
throws NotFoundException,
java.lang.SecurityException
- Description copied from interface:
IParticipantManager
- Removes a participant from the db. Note that a participant can only be removed if all
dependencies are also removed.
Dependencies are transitions that act as this participant.
- Specified by:
removeParticipant in interface IParticipantManager
- Following copied from interface:
org.jwarp.flow.security.IParticipantManager
- Parameters:
participant - The participantuser - The user- Throws:
NotFoundException - If the participant could not be located.java.lang.SecurityException - If access was denied.
setWorkflowSystem
public void setWorkflowSystem(IWorkflowSystem system)
- Specified by:
setWorkflowSystem in interface IWorkflowSystemAware
getWorkflowSystem
public IWorkflowSystem getWorkflowSystem()
- Specified by:
getWorkflowSystem in interface IWorkflowSystemAware