Oracle® Webcenter Interaction Development Kit 10.3.0.0.0

IProjectManager.CopyProjectMetaData Method 

Copies the basic metadata and all IRole objects from the source project to the target project.

IProject CopyProjectMetaData(
   IProject sourceProject,
   IProject targetProject
);

Parameters

sourceProject
The source project to copy from; cannot be null.
targetProject
The target project to copy to; cannot be null.

Return Value

The target project after copied from source project.

Remarks

Prior to the call, the source project must be a persisted IProject, and the target project can be persisted or not. Note: This is different from CopyProjectContent method where both the source project and target project must be stored prior to the call.

The user must be a Project Leader in the target project, and must have READ access in the source project.

The method will copy all of the following: project description, all IRole objects, and start date information if the target project's start date is not set and the source project's start date is available.

After the copy process is complete, the target project will be returned.

The copied project will be stored permanently. No Store method is required on the copied object. WARNING: The old roles in the target project will be overwritten with the copied roles from the source project.

Note: This method does not copy the project content, only the project metadata. To copy the project content, use CopyProjectContent.

Example code:

//Sample code for copying projects
// get the projects - the targetProject does not have to be stored
IProject sourceProject = projectManager.getProject(sourceProjectID);
IProject targetProject = projectManager.getProject(targetProjectID);
projectManager.CopyProjectMetaData(sourceProject, targetProject);

Exceptions

Exception Type Condition
InvalidOperationException if the source project has not yet been stored or if either of the projects have already been removed.
CollaborationException The user is not a Project Leader in the target project or if the method call resulted in an error.
SoapException There was a communication problem during the execution of the remote method call.

See Also

IProjectManager Interface | Plumtree.Remote.PRC.Collaboration.Project Namespace