com.bigbross.bossa.wfnet
Class CaseTypeManager

java.lang.Object
  extended bycom.bigbross.bossa.wfnet.CaseTypeManager
All Implemented Interfaces:
Serializable

public class CaseTypeManager
extends Object
implements Serializable

This class manages all registered case types of the workflow system. It provides all the case type life cycle functions and is the entry point of the WFNet package.

Author:
BigBross Team
See Also:
Serialized Form

Constructor Summary
CaseTypeManager()
          Creates a new empty case type manager.
CaseTypeManager(Bossa engine)
          Creates a new empty case type manager.
 
Method Summary
 List getActivities()
          Returns the list of all activities of all registered case types.
 CaseType getCaseType(String id)
          Returns the case type with the provided id.
 List getCaseTypes()
          Returns all registered case types.
 List getWorkItems()
          Returns the list of all work items of all registered case types.
 List getWorkItems(boolean getInitial)
          Returns the list of all work items of all registered case types.
 boolean registerCaseType(CaseType caseType)
          Registers a new case type in the manager.
 boolean registerCaseType(String file)
          Registers a new case type read from a PNML file in the manager.
 boolean registerCaseTypeImpl(CaseType caseType)
          Registers a new case type in the manager.
 void removeCaseType(String id)
          Removes the case type from the manager, if present.
 void removeCaseTypeImpl(String id)
          Removes the case type from the manager, if present.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaseTypeManager

public CaseTypeManager(Bossa engine)
Creates a new empty case type manager.

Parameters:
engine - the bossa engine this case type manager is part.

CaseTypeManager

public CaseTypeManager()
Creates a new empty case type manager.

Method Detail

registerCaseType

public boolean registerCaseType(CaseType caseType)
                         throws BossaException
Registers a new case type in the manager.

Parameters:
caseType - the case type.
Returns:
true if the case type is registered, false if there is already a case type registered with the same id.
Throws:
PersistenceException - if an error occours when making the execution of this method persistent.
BossaException

registerCaseType

public boolean registerCaseType(String file)
                         throws BossaException
Registers a new case type read from a PNML file in the manager.

Parameters:
file - the PNML file.
Returns:
true if the case type is registered, false if there is already a case type registered with the same id.
Throws:
DataTransferException - if an error happens reading or parsing the PNML file.
SetAttributeException - if the underlying expression evaluation system has problems setting an attribute.
EvaluationException - if an expression evaluation error occurs.
PersistenceException - if an error occours when making the execution of this method persistent.
BossaException

registerCaseTypeImpl

public boolean registerCaseTypeImpl(CaseType caseType)
Registers a new case type in the manager.

This method does not create a transaction in the prevalent system. The execution of this method will not be persistent unless it is called inside an appropriate transaction.

Parameters:
caseType - the CaseType object containing the case type.
Returns:
true if the case type is registered, false if there is already a case type registered with the same id.

removeCaseType

public void removeCaseType(String id)
                    throws BossaException
Removes the case type from the manager, if present. This operation will remove also all cases of this case type.

Parameters:
id - the id of the case type.
Throws:
PersistenceException - if an error occours when making the execution of this method persistent.
BossaException

removeCaseTypeImpl

public void removeCaseTypeImpl(String id)
Removes the case type from the manager, if present. This operation will remove also all cases of this case type.

This method does not create a transaction in the prevalent system. The execution of this method will not be persistent unless it is called inside an appropriate transaction.

Parameters:
id - the id of the case type.

getCaseType

public CaseType getCaseType(String id)
Returns the case type with the provided id.

Parameters:
id - the id of the desired case type.
Returns:
The case type if it exists, null otherwise.

getCaseTypes

public List getCaseTypes()
Returns all registered case types.

Returns:
A list of all case types registered.

getWorkItems

public List getWorkItems()
Returns the list of all work items of all registered case types.

Returns:
The list of all work itens of all registered case types.

getWorkItems

public List getWorkItems(boolean getInitial)
Returns the list of all work items of all registered case types. If desired, the initial work item(s) can be returned. Opening an initial work item will create a new case.

Parameters:
getInitial - set to true to get the initial work items and to false to only get the standard work items.
Returns:
The list of all work itens of all registered case types.

getActivities

public List getActivities()
Returns the list of all activities of all registered case types.

Returns:
The list of all activities of all registered case types.


Copyright © 2003,2004 OpenBR Sistemas S/C Ltda.