com.hp.ucmdb.api.folders
Interface FoldersManagementSubService<FolderType,ResourceType>


public interface FoldersManagementSubService<FolderType,ResourceType>

The folders management interface. This sub-service is used by other services.

Since:
UCMDB 9.0

Method Summary
 boolean attachFolderToFolder(java.util.List<java.lang.String> folderToAttachPathFromRoot, java.util.List<java.lang.String> targetFolderPathFromRoot)
          Moves an existing folder to be attached to specified target folder.
 boolean attachToFolder(java.lang.String resourceName, java.util.List<java.lang.String> folderPathFromRoot)
          Attaches the resource matching the given name to the folder path, creating the path if needed.
 boolean createFolder(java.util.List<java.lang.String> folderPathFromRoot)
          Creates folders according to the given path from the root.
 boolean deleteFolder(java.util.List<java.lang.String> folderPathFromRoot)
          Deletes the folder at the end of the given path, along with its subfolders and the resources in the folder or any of its subfolders.
 FolderType getFoldersTreeRoot()
          Returns the folder tree of the resources created by the service that created this object.
 boolean renameFolder(java.util.List<java.lang.String> folderPath, java.lang.String newName)
          Renames a folder.
 

Method Detail

createFolder

boolean createFolder(java.util.List<java.lang.String> folderPathFromRoot)
Creates folders according to the given path from the root. Skips any folder that already exists.

Parameters:
folderPathFromRoot - The path. Can not be null.
Returns:
true if any folder was created.

deleteFolder

boolean deleteFolder(java.util.List<java.lang.String> folderPathFromRoot)
Deletes the folder at the end of the given path, along with its subfolders and the resources in the folder or any of its subfolders.

Parameters:
folderPathFromRoot - The path. Can not be null.
Returns:
true if any folder was deleted.

attachToFolder

boolean attachToFolder(java.lang.String resourceName,
                       java.util.List<java.lang.String> folderPathFromRoot)
Attaches the resource matching the given name to the folder path, creating the path if needed.

Parameters:
resourceName - the name of the resource to attach. There must be a valid resource created by the service that created this object.
folderPathFromRoot - The path. Can not be null.
Returns:
true if the resource was moved.

attachFolderToFolder

boolean attachFolderToFolder(java.util.List<java.lang.String> folderToAttachPathFromRoot,
                             java.util.List<java.lang.String> targetFolderPathFromRoot)
Moves an existing folder to be attached to specified target folder.

The folderToAttachPathFromRoot cannot be the root folder (empty list). If a folder with the same name (last element of folderToAttachPathFromRoot) already exists under targetFolderPathFromRoot, the request fails with an exception.

Parameters:
folderToAttachPathFromRoot - the folder to move.
targetFolderPathFromRoot - the target folder to attach the folder to move under.
Returns:
true if the folder was successfully moved.

renameFolder

boolean renameFolder(java.util.List<java.lang.String> folderPath,
                     java.lang.String newName)
Renames a folder. The folderPath cannot be the root folder (empty list). If a folder with the same name already exists under the parent folder of folderPath (sublist(0, folderPath.size() - 2)), the request fails with an exception.

Parameters:
folderPath - the full path of the folder to rename.
newName - the new name for the folder.
Returns:
true if the folder was renamed. false if it already had the specified name.

getFoldersTreeRoot

FolderType getFoldersTreeRoot()
Returns the folder tree of the resources created by the service that created this object.

Returns:
the folder tree of the resources created by the service that created this object.


Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.