- SingleResult save (String sessionID, RPMObject container,
RPMObjectScope scope, ReloadType reloadtype)
The save method applies changes
to the specified containers. The save method starts by applying the changes
to the specified container, it then follows the objects linked to this container
depending on the scope parameter.
In the case that the delete flag of
a container is set to true, the save method deletes the specified container.
If
there are errors during the save process, each error is registered and sent
back in the SaveResult.
Some containers have restrictions about their
usage in the save method. For details, refer to the container specific documentation
in chapter 5.
- The parameter sessionID defines the session identifier
obtained during the login call. If this parameter is invalid, the method
will fail with and will return an RPM Exception.
- The parameter container, defines the container to
save. If the value of this parameter is null, the method will fail and will
return an RPM Exception.
- The parameter scope, defines the linked objects that
will be followed during the save method. If the value of this parameter is
null, only the specified container will be saved and no links will be followed.
- The parameter reloadtype, defines the type of reload
performed during the save operation. It affects the structure returned in
the SingleResult. Possible values are the following:
- None: This value denotes that the containers will not be reloaded
during the save call. The rpmObject returned in the SingleResult will
be null.
- SavedResult: This value denotes that the saved containers will
be reloaded during the save call. The rpmObject returned in the SingleResult will
correspond to the new version of the containers in the RPM database.
- ReloadResult: This value denotes that the save method will reload
all the containers, starting from the specified container parameter, and will
also follow all the specified scopes in the scope parameter.
- Returns the SingleResult object. This object contains the following information:
- boolean successful: A flag that indicates if the task was successful
or not.
- RPMObject rpmObject: The state of the container after the save operation
is performed. The objects contained in this field depend on the specified
reloadType parameter.
- RPMException[] exceptions: An array containing all the exceptions that
occurred during the save operation.
- Result delete (String sessionID, RPMObject container)
This
method deletes an object from the RPM database.
If the delete call fails,
it will throw an RPM Exception.
- The parameter sessionID, is the session identifier
obtained during the login call. If this parameter is invalid, the method
will fail and will return an RPM Exception.
- The parameter container, is the container to delete.
If this parameter is null, the method will fail and will return an RPM Exception.
- ArrayResult loadFromXpath (String sessionID, String
XPath, RPMObjectScope scope)
This method performs a query to find a list
of containers that depend on the conditions specified in the XPath.
- The parameter sessionID, is the session identifier
obtained during the login call. If this parameter is invalid, the method
will fail and will return an RPM Exception.
- The parameter XPath, is a query to be executed. Refer
to section about XPaths in chapter 4 for details. If the XPath query syntax
is invalid, the method will fail and return an RPM Exception.
- The parameter scope, indicates which linked objects
shall be loaded during the operation. If this parameter is null, only the
containers found by the query will be loaded.
- Returns ArrayResult.rpmObjectList, the array of containers that match
the desired query.
- ArrayResult loadArrayFromID (String sessionID, RPMObject[]
rpmObjectArray, RPMObjectScope scope)
This method performs a query to find
a list of containers using their unique identifiers.
- The parameter sessionID, is the session identifier
obtained during the login call. If this parameter is invalid, the method
will fail and will return an RPM Exception.
- The parameter rpmObjectArray, is an array of RPM
Objects. The IDs of those containers must be set before this method is called.
If this parameter is invalid, the method will fail and will return an RPM
Exception.
- The parameter scope, indicates which linked objects
shall be loaded during the operation. If the value of this parameter is null,
only the containers found by the query will be loaded.
- Returns ArrayResult.rpmObjectList, the array of reloaded containers.
- SingleResult loadFromID(String sessionID, RPMObject
rpmObject, RPMObjectScope scope)
This method performs a query to find a
specific container using its unique identifier.
- The parameter sessionID, is the session identifier
obtained during the login call. If this parameter is invalid, the method will
fail and will return an RPM Exception.
- The parameter rpmObject, is the container to be loaded.
The ID of this container must be set before this method is called. If this
parameter is invalid, the method will fail and will return an RPM Exception.
- The parameter scope, indicates which linked objects
are to be loaded during the operation. If the value of this parameter is null,
only the containers found by the query will be loaded.
- Returns SingleResult.rpmObject, the loaded container.
- SingleResult assignScorecard (String sessionID,
RPMObject container, RPMObjectScope scope, ReloadType reloadtype)
The assignScorecard
method assigns a Scorecard object to an RPMObject. There are three types of
RPMObjects that are amenable for scorecard assignment, Asset, GenericProject
and its subobjects, and AbstractScope and its subobjects. Refer to documentation
on these objects for further information.
It is assumed for the assignment,
that the Scorecard has already been created and saved during the design phase
and that the RPMObject has already been saved. Once the scorecard has been
assigned, any changes to the Scorecard will not affect the AssignedScorecard.
- The parameter sessionID defines the session identifier
obtained during the login call. If this parameter is invalid, the method will
fail with and will return an RPM Exception.
- The parameter objectToAssign defines the container
to save. If this parameter’s value is null, the method will fail and
return an RPM Exception.
- The parameter objectToAssignScope defines the scope
which defines the linked objects that will be loaded during the assignScorecard
method. If this parameter’s value is null, only the specified container
will be loaded after the assignment. It is recommended to set the ScorecardScope
structure in the objectToAssignScope in order to load the AssignedScorecard.
- The parameter scorecardToAssign defines the Scorecard
to be assigned to the objectToAssign. This should be a scorecard that has
been saved with the same context as the objectToAssign.
- The parameter reloadtype defines the type of reload
performed during the save operation. It affects the structure returned in
the SingleResult.
The possible values are:
- None: The containers will not be reloaded during the save call.
The rpmObject returned in the SingleResult will be null.
- SavedResult: The saved containers will be reloaded during the save
call. The rpmObject returned in the SingleResult will correspond to the new
version of the containers in the RPM database.
- ReloadResult: The save method will reload all the containers starting
from the specified container parameter and follow all the scopes specified
in the scope parameter.
- Returns SingleResult object. SingleResult.rpmObject is the objectToAssign
after the assignment was completed
- SingleResult publishScorecard (String
sessionID, AssignedScorecard assignedScorecard, AbstractScorecardScope scorecardScope)
The
publishScorecard publishes an assignedScorecard. This operation has two results,
the assignedScorecard becomes available for portfolio analysis and the assignedScorecard
values are versioned which allows a user to return to history assignedScorecard
values and compare versions. For more information refer to RPM's scorecard
documentation.
A user can publish an assignedScorecard as many times
as desired, each publication marks new version. Once an assignedScorecard
is published, it will continue to be as such. The assignedScorecard can be
deactivated by a user, using the AssignedScorecardState (for more information
refer to AssignedScorecardState documentation).
- The parameter sessionID defines the session identifier
obtained during the login call. If this parameter is invalid, the method
will fail and return an RPM Exception.
- The parameter assignedScorecard defines the assignedScorecard
to publish
- The parameter assignedScorecardScope is the scope
that defines the assignedScorecard elements which will be loaded and returned.
If the value is set to null, only the assignedScorecard will be loaded.
- Returns AssignedScorecard object. SingleResult.rpmObject
is the assignedScorecard after the publication has been completed.
- SingleResult startWorkflow(String sessionID, WorkflowProcess
process, RPMObject target, Resource initiator)
This function starts the
given workflow process on the given target object.
- The parameter process identifies the workflow process
to be started. It cannot be null. It must be active.
- The parameter target identifies the object on which
the workflow process is to be started. It cannot be null. Its root
workflow group has to match the process as specified below. Each line in this
list maps a workflow group name (as seen in RPM Client) to a target RPM container
type.
- Project: GenericProject
- Deliverable: Deliverable
- Task: SimpleNode
- Defects: Defect
- Change Request: ChangeRequest
- Risk: Risk
- Issue: Issue
- Requirement: Requirement
- Service Requests: ServiceRequest
- Action Item: Action
- Document: Document
- Note Minutes: NoteMinutes
- The parameter initiator identifies the resource
that will start the workflow process. If its value is set to null,
the user id entered at login will be used.
- Returns SingleResult. This object contains any exception that was raised
during the execution of this function.
It will eventually return the object
that will represent the workflow instance created when the workflow started.
This object will be used to control the workflow execution with operations
such as pause, resume, and stop. For the current version, this object reference
is null.
- Result transferUnderScope(String sessionID, RPMObject
element, ScopeElement scopeElement)
This function is not implemented in
this release.
- Result transferUnderWBS(String sessionID, WorkElement
workElement, RPMObject element)
This function is not implemented in this
release.
- SingleResult createProjectWithTemplate(String sessionID,
GenericProject inputProject, GenericProject templateProject, WorkElementScope
workElementScope)
This function creates a project using a template. If fields
are set within inputProjects, they will be overwritten
by the corresponding template field, therefore, the method will not fail but
will return a warning indicating the fields in question.
The inputProject
should not be null and should also be an instance of Proposal, Project,
or WorkOrganization otherwise, the method will fail and return an RPM Exception.
The
templateProject should be a valid template and not null, it should
also be an instance of Proposal, Project, or WorkOrganization otherwise, the
method will fail and return an RPM Exception.
- The parameter sessionID defines the session identifier
obtained during the login call. If this parameter is invalid, the method
will fail and return an RPM Exception.
- The parameter inputProject defines the GenericProject
that will conform to the templateProject.
- The parameter templateProject defines the GenericProject
that will be used to modify the inputProject
- The parameter workElementScope is the scope that
defines the genericProject element which will be loaded and returned. If the
value is set to null, only the genericProject will be loaded.
- Returns SingleResult object. This object contains the GenericProject once
all fields in the template have been applied to the input project and any
exceptions that were raised while performing the changes.