Package com.ptc.projectmanagement.plan
Interface PlanService
- All Known Implementing Classes:
StandardPlanService
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionAdds the specified Plannable to the Plan.createPlan(Rootable root) Will persist and return a plan object that implements Rootable.createPlan(String name, WTContainerRef containerRef, ObjectReference planHolderRef) Deprecated.- use PlanHelper.service.createPlan(Rootable root).createPlan(String name, WTContainerRef containerRef, ObjectReference planHolderRef, boolean isAutoExecution, boolean isLinkDeliverable) Creates and returns a new com.ptc.projectmanagement.Plan object given name, container reference, planHolder reference, boolean isAutoExecution and boolean isLinkDeliverable.createPlan(String name, WTContainerRef containerRef, ObjectReference planHolderRef, boolean isAutoExecution, boolean isLinkDeliverable, boolean isScheduledBackward) Creates and returns a new com.ptc.projectmanagement.Plan object given name, container reference, planHolder reference, boolean isAutoExecution and boolean isLinkDeliverable and boolean isScheduledBackward.deletePlannableContents(Plan plan) Deletes the Plannable contents from the specified Plan.voiddispatchEvent(String eventType) Use: This API is used to dispatch event when there is no target object going to be affected through the event.voiddispatchEvent(String eventType, Object target)
Supported API: truevoiddispatchMultiEvent(String eventType, WTCollection targets)
Supported API: true
Supported API: truegetDefaultPlan(ObjectReference planHolder) For project, returns the plan that gets created by default while creating the project.getDefaultPlan(ObjectReference planHolder, boolean includeDeleted) For project, returns the plan that gets created by default while creating the project.getEligiblePlansForNewPlanActivityWizard(long[] containerOids) USE: Given a plan holder, returns a list of Eligible Manual and Auto (Scheduled/In-Progress/Suspended) Plans.getEligiblePlansForTrackNewWork(long[] containerOids) USE: Given a plan holder, returns a list of associated Plans having one or more inprocess scheduled deliverables having logged in user as a resource.org.json.JSONArraygetEligiblePlansForTrackNewWork(long[] containerOids, boolean returnCountStar) USE: Given a plan holder, returns a list of associated Plans attributes having one or more inprocess scheduled deliverables having logged in user as a resource.getPlan(ObjectReference planHolder) Given a plan holder, returns the associated Plan (object that implements Rootable)
Supported API: truegetPlan(ObjectReference planHolder, boolean includeDeleted) Overloaded method for getPlan(ObjectReference).intgetPlanCount(ObjectReference planHolder) For project, returns the number of plans project have.getPlannableContents(Plan plan) Returns all Plannable objects that are part of the specified Plan
Supported API: truegetPlans(List<AbstractPlanActivity> activities) Returns plans for a given collection of activities Supported API: truegetPlans(ObjectReference planHolder) Given a plan holder, returns a list of associated Plans (objects that implement the interface com.ptc.projectmanagement.plannable.Rootable).getPlansFromSummaryActivities(WTCollection plannables) This API will return all plans corresponding to summary activities
Supported API: truegetProjectsForPlans(WTCollection plans) Use: This API will return a collection of projects for plans
Supported API: truevoidpropagateScheduleForAllPlans(WTContainerRef containerRef)
Supported API: trueresumePlan(Plan plan) Resumes the given Plan by changing its state to Running.voidsuspendPlan(Plan plan)
Supported API: trueupdatePlanName(String newContextName, String oldContextName, ObjectReference planHolderRef) Update a Plan Name for given Container Ref name, ObjectReference.
-
Method Details
-
createPlan
Plan createPlan(String name, WTContainerRef containerRef, ObjectReference planHolderRef) throws WTException Deprecated.- use PlanHelper.service.createPlan(Rootable root).Creates and returns a new com.ptc.projectmanagement.Plan object given a planHolder reference and a container reference
Supported API: true- Parameters:
name-containerRef-planHolderRef-- Returns:
- Plan
- Throws:
WTException
-
getPlan
Given a plan holder, returns the associated Plan (object that implements Rootable)
Supported API: true- Parameters:
planHolder-- Returns:
- Rootable
- Throws:
WTException
-
getPlan
Overloaded method for getPlan(ObjectReference). Useful to retrieve the plan for a project Marked for deletion. Given a plan holder, returns the associated Plan (object that implements Rootable)
Supported API: true- Parameters:
planHolder-- Returns:
- Rootable
- Throws:
WTException
-
getPlans
Given a plan holder, returns a list of associated Plans (objects that implement the interface com.ptc.projectmanagement.plannable.Rootable).
Supported API: true- Parameters:
planHolder- - an ObjectReference to the input plan holder.- Returns:
- - a WTList of Plans that are associated to the input plan holder.
- Throws:
WTException
-
addToPlan
Adds the specified Plannable to the Plan. The Plan is retrieved from parent
Supported API: true- Parameters:
plannable- A pre-constructed Plannableparent-- Returns:
- Plannable
- Throws:
WTException
-
getPlannableContents
Returns all Plannable objects that are part of the specified Plan
Supported API: true- Parameters:
plan-- Returns:
- WTCollection
- Throws:
WTException
-
deletePlannableContents
Deletes the Plannable contents from the specified Plan. The Plan is returned (updated if necessary)
Supported API: true- Parameters:
plan-- Returns:
- Plan
- Throws:
WTException
-
dispatchEvent
Supported API: true- Parameters:
eventType-target-- Throws:
WTException
-
createPlan
Will persist and return a plan object that implements Rootable. Will emit the ProjectManagementEvent.NEW_PLAN after persisting. Will return null if the passed inRootableobject is not persisted.
Supported API: true- Parameters:
root- Object that will hold the Plan. The object passed in should implementRootable- Returns:
- Rootable
- Throws:
WTException
-
createPlan
Plan createPlan(String name, WTContainerRef containerRef, ObjectReference planHolderRef, boolean isAutoExecution, boolean isLinkDeliverable, boolean isScheduledBackward) throws WTException Creates and returns a new com.ptc.projectmanagement.Plan object given name, container reference, planHolder reference, boolean isAutoExecution and boolean isLinkDeliverable and boolean isScheduledBackward.
Supported API: true- Parameters:
name-containerRef-planHolderRef-isAutoExecution-isLinkDeliverable-isScheduledBackward-- Returns:
- Plan
- Throws:
WTException
-
createPlan
Plan createPlan(String name, WTContainerRef containerRef, ObjectReference planHolderRef, boolean isAutoExecution, boolean isLinkDeliverable) throws WTException Creates and returns a new com.ptc.projectmanagement.Plan object given name, container reference, planHolder reference, boolean isAutoExecution and boolean isLinkDeliverable.
Supported API: true- Parameters:
name-containerRef-planHolderRef-isAutoExecution-isLinkDeliverable-- Returns:
- Plan
- Throws:
WTException
-
getActiveEPPlanHolders
Supported API: true- Throws:
WTException
-
dispatchMultiEvent
Supported API: true- Parameters:
eventType-target-- Throws:
WTException
-
suspendPlan
Supported API: true- Parameters:
plan-- Throws:
WTException
-
updatePlanName
Plan updatePlanName(String newContextName, String oldContextName, ObjectReference planHolderRef) throws WTException Update a Plan Name for given Container Ref name, ObjectReference.
Supported API: true- Parameters:
newContextName-planHolderRef-oldContextName-- Returns:
- Plan
- Throws:
WTException
-
resumePlan
Resumes the given Plan by changing its state to Running.
Supported API: true- Parameters:
plan-- Returns:
- Plan
- Throws:
WTException
-
getDefaultPlan
For project, returns the plan that gets created by default while creating the project. For product, returns the first plan created.
Supported API: true- Parameters:
planHolder-- Returns:
- Throws:
WTException
-
getDefaultPlan
For project, returns the plan that gets created by default while creating the project. For product, returns the first plan created.
Supported API: true- Parameters:
planHolder-includeDeleted-- Returns:
- Throws:
WTException
-
propagateScheduleForAllPlans
Supported API: true- Parameters:
containerRef-- Throws:
WTException
-
getPlanCount
For project, returns the number of plans project have.
Supported API: true- Parameters:
planHolder-- Returns:
- int
- Throws:
WTException
-
getPlans
Returns plans for a given collection of activities Supported API: true- Parameters:
List-- Returns:
- Set<Rootable
- Throws:
WTException
-
getEligiblePlansForTrackNewWork
WTCollection getEligiblePlansForTrackNewWork(long[] containerOids) throws WTException, WTPropertyVetoException USE: Given a plan holder, returns a list of associated Plans having one or more inprocess scheduled deliverables having logged in user as a resource. Supported API: true- Parameters:
containerOids- - list of oids for containers- Returns:
- - a WTCollection of Plans (other than BaselinedPlans) that are associated to the input container having one or more scheduled deliverables in it, which are inprogress state and not completed.
- Throws:
WTException- - when an error occurred while building or executing the relevant database query.WTPropertyVetoException
-
getEligiblePlansForTrackNewWork
org.json.JSONArray getEligiblePlansForTrackNewWork(long[] containerOids, boolean returnCountStar) throws WTException, WTPropertyVetoException USE: Given a plan holder, returns a list of associated Plans attributes having one or more inprocess scheduled deliverables having logged in user as a resource. Supported API: true- Parameters:
containerOids- - list of oids for containersreturnCountStar- - when true only returns the count of associated plan otherwise return selected plan attributes- Returns:
- - a JSONArray of plan attributes
- Throws:
WTException- - when an error occurred while building or executing the relevant database query.WTPropertyVetoException
-
getEligiblePlansForNewPlanActivityWizard
WTCollection getEligiblePlansForNewPlanActivityWizard(long[] containerOids) throws WTException, WTPropertyVetoException USE: Given a plan holder, returns a list of Eligible Manual and Auto (Scheduled/In-Progress/Suspended) Plans. Supported API: true- Parameters:
containerOids- - list of oids for containers- Returns:
- - a WTCollection of Eligible Plans.
- Throws:
WTException- - when an error occurred while building or executing the relevant database query.WTPropertyVetoException
-
dispatchEvent
Use: This API is used to dispatch event when there is no target object going to be affected through the event.
Supported API: true- Parameters:
eventType-- Throws:
WTException
-
getPlansFromSummaryActivities
This API will return all plans corresponding to summary activities
Supported API: true- Returns:
- WTCollection plans - set of plans corresponding to given summaries
- Throws:
WTException
-
getProjectsForPlans
Use: This API will return a collection of projects for plans
Supported API: true- Parameters:
plans-- Returns:
- WTHashSet projects
- Throws:
WTException
-