wt.projmgmt.definer
Class StandardProjDefinerService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.projmgmt.definer.StandardProjDefinerService
All Implemented Interfaces:
Manager, NetFactor, ProjDefinerService, ProjDefinerServiceSvr, Serializable

public class StandardProjDefinerService
extends StandardManager
implements ProjDefinerService, ProjDefinerServiceSvr, Serializable

Standard implementation of the client and service interfaces.

Use the newStandardProjDefinerService static factory method(s), not the StandardProjDefinerService 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:
ProjDefinerService, ProjDefinerServiceSvr, 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
StandardProjDefinerService()
           
 
Method Summary
 ProjectNode addNode(ProjectNode node, WfContainer container)
          Adds node to container passed as argument.
private  WfConnector adjustPredNumber(WfNodeTemplate source_temp, WfConnectorTemplate dest_temp)
           
protected  WfConnectorTemplate createInConnectors(WfContainer container, ProjectNode node)
           
 NodeTemplateLink createLink(WfNode source_node, WfNode dest_node, ProjectLinkType link_type)
          Creates dependency link between two nodes.
 NodeTemplateLink createLinkTemplate(WfNodeTemplate source_temp, WfNodeTemplate dest_temp)
          Assumes link_type = FINISH_START.
 Milestone createMilestoneTemplate(ProjectPlan plan, Milestone milestone)
          Creates a milestone template given the project plan and the milestone instance.
 ProjectNode createNodeTemplate(WfContainer container, ProjectNode node)
          Creates a project node template given the node container (plan or summary) and the node instance.
 ProjectActivity createProjectActivityTemplate(ProjectPlan plan, ProjectActivity activity)
          Creates a project activity template given the project plan, the activity instance and a vector containing references to activity assignees.
 ProjectPlanTemplate createProjectPlanTemplate(ProjectPlan plan)
          Creates project plan template with the name given as argument.
 ProjectProxy createProjectProxyTemplate(ProjectPlan plan, ProjectProxy proxy)
          Creates a project proxy template given the project plan and the proxy instance.
 void createStartEndConnectors(WfContainerTemplate template, WfContainer container)
          Creates the start and end connectors for a container passed as arguments.
 SummaryActivity createSummaryActivityTemplate(ProjectPlan plan, SummaryActivity summary)
          Creates a summary activity template given the project plan and the activity instance.
private  WfTemplateObject createTemplateObject(ProjectNode node)
           
 void deleteFinalLink(WfNode pred_node, WfNode succ_node)
          Deletes the link that joins the first node to an end connector if both nodes belong to the same container.
 WfNode deleteInitialLink(WfNode node)
          Deletes the link that joins the start connector to the node passed as argument.
private  void deleteLink(WfNodeTemplate node, WfConnectorTemplate conn)
           
 String getConceptualClassname()
          Deprecated.  
private  String getIdString(Object obj)
           
private  NodeTemplateLink getLink(ObjectReference source_ref, ObjectReference destination_ref)
           
 ProjectLinkType getLinkType(ProjectNode source_node, ProjectNode dest_node)
          Returns the type of the link (FINISH-START, START-START) given two project nodes.
private  List getList(Object object)
           
private  ObjectIdentifier getOid(Object obj)
           
protected  QueryResult getPredecessorsInContainer(WfNodeTemplate node_template, WfContainerTemplate container_template)
           
private  ObjectReference getRef(Object obj)
           
protected  QueryResult getSuccessorsInContainer(WfNodeTemplate node_template, WfContainerTemplate container_template)
           
private  TimeToElapse getTimeToElapse(int days)
           
private  boolean isClosed(WfNode wf_node)
           
 void moveLink(ProjectNodeTemplate pred, WfConnectorTemplate succ, WfContainerTemplate container_template)
           
static StandardProjDefinerService newStandardProjDefinerService()
          Default factory for the class.
 void removeDependency(WfNode source_node, WfNode dest_node)
          Deletes all links between the templates of the nodes passed as argument.
 ProjectNode removeNode(ProjectNode node)
          Removes node from its current container.
 NodeTemplateLink setLinkType(WfNode source_node, WfNode dest_node, ProjectLinkType link_type)
          Sets the type of dependency beteween two nodes to the dependency passed as argument (ProjectLinkType).
private  String showVector(Object object)
          Returns a String contained the list of objects in the Vector/QueryResult.
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, performStartupProcess, 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 final boolean VERBOSE
Constructor Detail

StandardProjDefinerService

public StandardProjDefinerService()
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

newStandardProjDefinerService

public static StandardProjDefinerService newStandardProjDefinerService()
                                                                throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardProjDefinerService
Throws:
WTException

createProjectPlanTemplate

public ProjectPlanTemplate createProjectPlanTemplate(ProjectPlan plan)
                                              throws WTException
Creates project plan template with the name given as argument. As part of the template creation a start connector template and a end connector template are created making part of the plan template.

Supported API: false

Specified by:
createProjectPlanTemplate in interface ProjDefinerService
Parameters:
plan -
Returns:
ProjectPlanTemplate
Throws:
WTException

getLinkType

public ProjectLinkType getLinkType(ProjectNode source_node,
                                   ProjectNode dest_node)
                            throws WTException
Returns the type of the link (FINISH-START, START-START) given two project nodes.

Supported API: false

Specified by:
getLinkType in interface ProjDefinerService
Parameters:
source_node -
dest_node -
Returns:
ProjectLinkType
Throws:
WTException

createProjectActivityTemplate

public ProjectActivity createProjectActivityTemplate(ProjectPlan plan,
                                                     ProjectActivity activity)
                                              throws WTException
Creates a project activity template given the project plan, the activity instance and a vector containing references to activity assignees. The start connector of the plan template is connected to the activity template created.

Supported API: false

Specified by:
createProjectActivityTemplate in interface ProjDefinerServiceSvr
Parameters:
plan -
activity -
Returns:
ProjectActivity
Throws:
WTException
See Also:
ProjectActivityTemplate, ProjectActivity

createMilestoneTemplate

public Milestone createMilestoneTemplate(ProjectPlan plan,
                                         Milestone milestone)
                                  throws WTException
Creates a milestone template given the project plan and the milestone instance. The start connector of the plan template is connected to the milestone template created.

Supported API: false

Specified by:
createMilestoneTemplate in interface ProjDefinerServiceSvr
Parameters:
plan -
milestone -
Returns:
Milestone
Throws:
WTException

createSummaryActivityTemplate

public SummaryActivity createSummaryActivityTemplate(ProjectPlan plan,
                                                     SummaryActivity summary)
                                              throws WTException
Creates a summary activity template given the project plan and the activity instance. The start connector of the plan template is connected to the activity template created.

Supported API: false

Specified by:
createSummaryActivityTemplate in interface ProjDefinerServiceSvr
Parameters:
plan -
summary -
Returns:
SummaryActivity
Throws:
WTException
See Also:
SummaryActivityTemplate, SummaryActivity

createProjectProxyTemplate

public ProjectProxy createProjectProxyTemplate(ProjectPlan plan,
                                               ProjectProxy proxy)
                                        throws WTException
Creates a project proxy template given the project plan and the proxy instance. The start connector of the plan template is connected to the template created.

Supported API: false

Specified by:
createProjectProxyTemplate in interface ProjDefinerServiceSvr
Parameters:
plan -
proxy -
Returns:
ProjectProxy
Throws:
WTException
See Also:
ProjectProxyTemplate, ProjectProxy

createNodeTemplate

public ProjectNode createNodeTemplate(WfContainer container,
                                      ProjectNode node)
                               throws WTException
Creates a project node template given the node container (plan or summary) and the node instance. A node can can be a Milestone, a ProjectActivity, a SummaryActivity, or a ProjectProxy.

The start connector of the container template is connected to the project node template created.

Supported API: false

Specified by:
createNodeTemplate in interface ProjDefinerServiceSvr
Parameters:
container -
node -
Returns:
ProjectNode
Throws:
WTException
See Also:
ProjectNodeTemplate, ProjectNode, WfContainer, ProjectPlan, SummaryActivity

removeDependency

public void removeDependency(WfNode source_node,
                             WfNode dest_node)
                      throws WTException
Deletes all links between the templates of the nodes passed as argument. Only links between source and destination are deleted.

Supported API: false

Specified by:
removeDependency in interface ProjDefinerServiceSvr
Parameters:
source_node -
dest_node -
Throws:
WTException

setLinkType

public NodeTemplateLink setLinkType(WfNode source_node,
                                    WfNode dest_node,
                                    ProjectLinkType link_type)
                             throws WTException
Sets the type of dependency beteween two nodes to the dependency passed as argument (ProjectLinkType). Assumes the source node is a ProjectNode (activity, milestone or summary) and the destination node is a connector (input connector of another project node).

Supported API: false

Specified by:
setLinkType in interface ProjDefinerServiceSvr
Parameters:
source_node -
dest_node -
link_type -
Returns:
NodeTemplateLink
Throws:
WTException

createLink

public NodeTemplateLink createLink(WfNode source_node,
                                   WfNode dest_node,
                                   ProjectLinkType link_type)
                            throws WTException
Creates dependency link between two nodes. The type of dependency is passed as argument. Assumes the source node is a ProjectNode (activity, milestone or summary) and the destination node is a connector (input connector of another project node).

Supported API: false

Specified by:
createLink in interface ProjDefinerServiceSvr
Parameters:
source_node -
dest_node -
link_type -
Returns:
NodeTemplateLink
Throws:
WTException

removeNode

public ProjectNode removeNode(ProjectNode node)
                       throws WTException
Removes node from its current container. This is done by deleting all links between the start connector and the node and from the node to the end connector.

Supported API: false

Specified by:
removeNode in interface ProjDefinerServiceSvr
Parameters:
node -
Returns:
ProjectNode
Throws:
WTException

addNode

public ProjectNode addNode(ProjectNode node,
                           WfContainer container)
                    throws WTException
Adds node to container passed as argument. It does that by creating links from the start connector to the node and from the node to the end connector.

Supported API: false

Specified by:
addNode in interface ProjDefinerServiceSvr
Parameters:
node -
container -
Returns:
ProjectNode
Throws:
WTException

createStartEndConnectors

public void createStartEndConnectors(WfContainerTemplate template,
                                     WfContainer container)
                              throws WTException
Creates the start and end connectors for a container passed as arguments. Creates both the template and the instance connectors. Assumes container has been persisted.

This method is used when a summary or a project plan is created. It is called only once for each created object.

Supported API: false

Specified by:
createStartEndConnectors in interface ProjDefinerServiceSvr
Parameters:
template -
container -
Throws:
WTException

deleteInitialLink

public WfNode deleteInitialLink(WfNode node)
                         throws WTException
Deletes the link that joins the start connector to the node passed as argument. If there is no link in this situation, retrun 'null' otherwise returns the node possibly changed (connectors). Used when creating a dependency between two nodes to ensure that the node is not preceded by the start connector.

Supported API: false

Specified by:
deleteInitialLink in interface ProjDefinerServiceSvr
Parameters:
node -
Returns:
WfNode
Throws:
WTException

deleteFinalLink

public void deleteFinalLink(WfNode pred_node,
                            WfNode succ_node)
                     throws WTException
Deletes the link that joins the first node to an end connector if both nodes belong to the same container. Used to ensure that the first node is only succeeded by the second node when creating a dependency between the two nodes.

Supported API: false

Specified by:
deleteFinalLink in interface ProjDefinerServiceSvr
Parameters:
pred_node -
succ_node -
Throws:
WTException

deleteLink

private void deleteLink(WfNodeTemplate node,
                        WfConnectorTemplate conn)
                 throws WTException
Throws:
WTException

getPredecessorsInContainer

protected QueryResult getPredecessorsInContainer(WfNodeTemplate node_template,
                                                 WfContainerTemplate container_template)
                                          throws WTException
Throws:
WTException

getSuccessorsInContainer

protected QueryResult getSuccessorsInContainer(WfNodeTemplate node_template,
                                               WfContainerTemplate container_template)
                                        throws WTException
Throws:
WTException

createInConnectors

protected WfConnectorTemplate createInConnectors(WfContainer container,
                                                 ProjectNode node)
                                          throws WTException
Throws:
WTException

getLink

private NodeTemplateLink getLink(ObjectReference source_ref,
                                 ObjectReference destination_ref)
                          throws WTException
Throws:
WTException

moveLink

public void moveLink(ProjectNodeTemplate pred,
                     WfConnectorTemplate succ,
                     WfContainerTemplate container_template)
              throws WTException
Throws:
WTException

createTemplateObject

private WfTemplateObject createTemplateObject(ProjectNode node)
                                       throws WTException
Throws:
WTException

createLinkTemplate

public NodeTemplateLink createLinkTemplate(WfNodeTemplate source_temp,
                                           WfNodeTemplate dest_temp)
                                    throws WTException
Assumes link_type = FINISH_START.

Throws:
WTException

adjustPredNumber

private WfConnector adjustPredNumber(WfNodeTemplate source_temp,
                                     WfConnectorTemplate dest_temp)
                              throws WTException
Throws:
WTException

isClosed

private boolean isClosed(WfNode wf_node)

getTimeToElapse

private TimeToElapse getTimeToElapse(int days)

getList

private List getList(Object object)

showVector

private String showVector(Object object)
Returns a String contained the list of objects in the Vector/QueryResult.


getIdString

private String getIdString(Object obj)

getOid

private ObjectIdentifier getOid(Object obj)

getRef

private ObjectReference getRef(Object obj)
                        throws WTException
Throws:
WTException