wt.workflow.collaboration
Class StandardCollaborationService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.workflow.collaboration.StandardCollaborationService
All Implemented Interfaces:
CollaborationService, Manager, NetFactor, Serializable

public class StandardCollaborationService
extends StandardManager
implements CollaborationService, Serializable

Implementation class for methods defined in CollaborationService.

Use the newStandardCollaborationService static factory method(s), not the StandardCollaborationService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardCollaborationService()
           
 
Method Summary
 String getConceptualClassname()
          Deprecated.  
private  CollaborationTemplateFactory getFactory()
          returns an instance of the CollaborationTemplateFactory.
 boolean isSubscribed(CollaborationContainer container, String event_key)
          returns true if current user is subscribed to the given event of the container, false otherwise.
 boolean isSubscribed(ObjectIdentifier oid, String event_key)
          returns true if current user is subscribed to the given event of the container, false otherwise.
 boolean isValidTemplate(CollaborationTemplate template)
          

Supported API: false
static StandardCollaborationService newStandardCollaborationService()
          Default factory for the class.
protected  void performStartupProcess()
          Dummy method to be overridden by subclasses.
 CollaborationContainer populateContainer(CollaborationContainer container, CollaborationTemplate template)
          

Supported API: false
private  void registerAsListener()
          Register as listener to the following events: PersistenceManagerEvent.PRE_DELETE The objects of interest are workflow objects, more specifically, node templates (processes, activities and connectors) and expressions.
 CollaborationTemplate saveTemplate(CollaborationTemplate template)
          Validates the template and updates it if already persisted else inserts it into the database.
 void subscribe(CollaborationContainer container)
          Subscribes the current user to the given CollaborationContainer.
 void subscribe(CollaborationContainer container, Vector userVec)
          Subscribes the list of users to the given CollaborationContainer.
 void unsubscribe(CollaborationContainer container, String event_key)
          Unsubscribes the current user from the given CollaborationContainer.
 void unsubscribe(CollaborationContainer container, Vector userVec, String event_key)
          Unsubscribes the list of users from the given CollaborationContainer.
 void unsubscribe(CollaborationContainer container, WTPrincipalReference user, String event_key)
          Unsubscribes the list of users from the given CollaborationContainer.
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

VERBOSE

private static boolean VERBOSE
Constructor Detail

StandardCollaborationService

public StandardCollaborationService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException
Dummy method to be overridden by subclasses. Subclasses should override this method and provide startup processing.

Supported API: false

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

newStandardCollaborationService

public static StandardCollaborationService newStandardCollaborationService()
                                                                    throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardCollaborationService
Throws:
WTException

subscribe

public void subscribe(CollaborationContainer container)
               throws WTException
Subscribes the current user to the given CollaborationContainer. The user is subscribed recursively to all child nodes of the container and so on to the very last node in the hierarchy.

Supported API: false

Specified by:
subscribe in interface CollaborationService
Parameters:
container -
Throws:
WTException

unsubscribe

public void unsubscribe(CollaborationContainer container,
                        String event_key)
                 throws WTException
Unsubscribes the current user from the given CollaborationContainer. Unsubscribing from a container does not unsubscribe the user from the child nodes of the container; this has to be done explicitly.

Supported API: false

Specified by:
unsubscribe in interface CollaborationService
Parameters:
container - The CollaborationContainer being unsubscribed from.
event_key - The event being unsubscribed from.
Throws:
WTException

subscribe

public void subscribe(CollaborationContainer container,
                      Vector userVec)
               throws WTException
Subscribes the list of users to the given CollaborationContainer. The users are subscribed recursively to all child nodes of the container and so on to the very last node in the hierarchy.

Supported API: false

Specified by:
subscribe in interface CollaborationService
Parameters:
container -
userVec -
Throws:
WTException

unsubscribe

public void unsubscribe(CollaborationContainer container,
                        WTPrincipalReference user,
                        String event_key)
                 throws WTException
Unsubscribes the list of users from the given CollaborationContainer. Unsubscribing from a container does not unsubscribe the users from the child nodes of the container; this has to be done explicitly.

Supported API: false

Specified by:
unsubscribe in interface CollaborationService
Parameters:
container - The CollaborationContainer being unsubscribed from.
user - The user being unsubscribed.
event_key - The event being unsubscribed from.
Throws:
WTException

unsubscribe

public void unsubscribe(CollaborationContainer container,
                        Vector userVec,
                        String event_key)
                 throws WTException
Unsubscribes the list of users from the given CollaborationContainer. Unsubscribing from a container does not unsubscribe the users from the child nodes of the container; this has to be done explicitly.

Supported API: false

Specified by:
unsubscribe in interface CollaborationService
Parameters:
container - The CollaborationContainer being unsubscribed from.
userVec - A Vector of WTPrincipal objects.
event_key - The event being unsubscribed from.
Throws:
WTException

populateContainer

public CollaborationContainer populateContainer(CollaborationContainer container,
                                                CollaborationTemplate template)
                                         throws WTException


Supported API: false

Specified by:
populateContainer in interface CollaborationService
Parameters:
container -
template -
Returns:
CollaborationContainer
Throws:
WTException

isValidTemplate

public boolean isValidTemplate(CollaborationTemplate template)
                        throws WTException


Supported API: false

Specified by:
isValidTemplate in interface CollaborationService
Parameters:
template -
Returns:
boolean
Throws:
WTException

isSubscribed

public boolean isSubscribed(CollaborationContainer container,
                            String event_key)
                     throws WTException
returns true if current user is subscribed to the given event of the container, false otherwise.

Supported API: false

Specified by:
isSubscribed in interface CollaborationService
Parameters:
container -
event_key -
Returns:
boolean
Throws:
WTException

saveTemplate

public CollaborationTemplate saveTemplate(CollaborationTemplate template)
                                   throws WTException
Validates the template and updates it if already persisted else inserts it into the database.

Supported API: false

Specified by:
saveTemplate in interface CollaborationService
Parameters:
template -
Returns:
CollaborationTemplate
Throws:
WTException

isSubscribed

public boolean isSubscribed(ObjectIdentifier oid,
                            String event_key)
                     throws WTException
returns true if current user is subscribed to the given event of the container, false otherwise.

Supported API: false

Specified by:
isSubscribed in interface CollaborationService
Parameters:
oid -
event_key -
Returns:
boolean
Throws:
WTException

registerAsListener

private void registerAsListener()
                         throws ManagerException
Register as listener to the following events: The objects of interest are workflow objects, more specifically, node templates (processes, activities and connectors) and expressions.

Throws:
ManagerException

getFactory

private CollaborationTemplateFactory getFactory()
                                         throws WTException
returns an instance of the CollaborationTemplateFactory.

Throws:
WTException