move(objects, targetPath, options)

Use this method to move objects within the content store.

This method returns the searchPath, defaultName, and storeID of the objects that were moved. An error is returned if no objects are selected.

A move operation updates the bibus » baseClass » searchPath property of the target object.

ID-based references are maintained by Content Manager when moving objects. Path-based references to the object (for example, target objects of shortcuts) are not maintained by Content Manager when an object is moved, resulting in a broken reference.

If you want to assign new names to the moved objects, use the content » moveRename(objects, targetPath, newNames, options) method.

Use of this method requires:

  • read and write permission for the source object

  • write permission for the parent of the source object

  • traverse permission for all ancestors of the source object

  • write permission for the target container object

  • traverse permission for the target container object and all its ancestors

  • write permission for the object being overwritten if one already exists in the new location

Signatures

Java and Apache Axis
 
public  com.cognos.developer.schemas.bibus._3.BaseClass[]  move( 
com.cognos.developer.schemas.bibus._3.BaseClass[]  objects, 
com.cognos.developer.schemas.bibus._3.SearchPathSingleObject 
targetPath,  com.cognos.developer.schemas.bibus._3.MoveOptions  options) 
C# .NET
 
public  baseClass[]  move(baseClass[]  objects,  searchPathSingleObject 
targetPath,  moveOptions  options) 
Example: Using the move(objects, targetPath, options) Method with the Content Manager Service in Java

The following Java code snippet demonstrates how to use the content » move(objects, targetPath, options) method with the Content Manager service.

To see this code in context, view the Java sample HandlersCS/CSHandlers.java. For more information about the samples, see Code samples and language-specific coding practices.

 
return  connection.getCMService().move( 
		bc,  new  SearchPathSingleObject(targetPath),  new  MoveOptions()); 
 
Example: Using the move(objects, targetPath, options) Method with the Content Manager Service in C# .NET

The following C# code snippet demonstrates how to use the content » move(objects, targetPath, options) method with the Content Manager service.

To see this code in context, view the C# sample Move/Move.cs. For more information about the samples, see Code samples and language-specific coding practices.

 
baseClass[]  bcaMoveResults  =  cBICMS.move(bcaMove,  cmTargetPath,  cpOptions); 
 
if  (bcaMoveResults.GetLength(0)  >  0) 
{ 
	//the  number  of  successfully  copied  objects 
	resultMessage  =   
			"...the  report  has  been  successfully  moved  to  the  target  location  \""  + 
			targetPath  + 
			"\"."; 
	return  true; 
} 
 

References

Part of the following method sets:
Implemented by the following services:

The services that implement the move method, along with the associated SOAP actions, are listed in the following table.

Table 1. Services implementing the move method.

Service

SOAP Action

contentManagerService

http://www.ibm.com/xmlns/prod/cognos/contentManagerService/201404/

Input parameters

Use the following parameters when calling this method.

objects

Specifies the objects to be moved to a new location in the content store.

The bibus » baseClass » searchPath property of each object is used to select the object.

This argument

  • is an array of type bibus » baseClass

    is encoded as type tns:baseClassArray

targetPath

Specifies the target location for the moved objects. This parameter must select a single container object that is writable in the current security context.

This argument

options

Specifies the options for the content » move(objects, targetPath, options) method.

This argument

Return values

This method returns the following values.

result

Returns the bibus » baseClass » defaultName property, the bibus » baseClass » searchPath property, and the bibus » baseClass » storeID property for each moved object.

This result

  • is an array of type bibus » baseClass

    is encoded as type tns:baseClassArray