Compoze Software, Inc.

com.compoze.domino
Class Folders


java.lang.Object

  |

  +--com.compoze.domino.Folders

All Implemented Interfaces:
java.io.Serializable

public class Folders
extends java.lang.Object
implements java.io.Serializable

This class contains the methods used for folder manipulation.

See Also:
Serialized Form

Method Summary
 void serverCopyFolder(java.lang.String sSourceFolderID, java.lang.String sTargetFolderID, java.lang.String sNewName)
          Hits the server to copy folders to another folder.
 Folder serverCreateFolder(java.lang.String sFolderID, java.lang.String sName, PropertyKey[] keys)
          Hits the server to add a folder.
 void serverDeleteFolders(java.lang.String[] folderIDs)
          Hits the server to delete a folder.
 Folder serverGetFolder(FolderType type, PropertyKey[] keys)
          Queries the server to get a single folder by type.
 Folder serverGetFolder(java.lang.String sFolderID, PropertyKey[] keys)
          Queries the server to get a single folder.
 Folder[] serverGetFolders(PropertyKey[] keys, java.lang.String[] expandedFolderIDs)
          Queries the server to get sub-folders off of a folder.
 Folder[] serverGetSubFolders(java.lang.String sID, int iDepth, PropertyKey[] keys)
          Gets the subfolders.
 void serverMoveFolder(java.lang.String sSourceFolderID, java.lang.String sTargetFolderID)
          Hits the server to move folders to another folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

serverGetFolder


public Folder serverGetFolder(FolderType type,
                              PropertyKey[] keys)
                       throws DominoException
Queries the server to get a single folder by type. No folder is returned if FolderType.PERSONAL is specified.
Parameters:
type - the folder type
keys - the properties to fetch for the folder
Returns:
the folder or null if not found

serverGetFolder


public Folder serverGetFolder(java.lang.String sFolderID,
                              PropertyKey[] keys)
                       throws DominoException
Queries the server to get a single folder.
Parameters:
sFolderID - the folder ID
keys - the properties to fetch for the folder
Returns:
the folder or null if not found

serverGetSubFolders


public Folder[] serverGetSubFolders(java.lang.String sID,
                                    int iDepth,
                                    PropertyKey[] keys)
                             throws DominoException
Gets the subfolders.
Parameters:
sID - the folder ID
iDepth - the depth of folders to retrieve (N for depth of N, -1 for infinite depth)
keys - the properties to bring back from the new folder or null to not retrieve the newly created folder
Returns:
the subfolders or an empty array for none

serverGetFolders


public Folder[] serverGetFolders(PropertyKey[] keys,
                                 java.lang.String[] expandedFolderIDs)
                          throws DominoException
Queries the server to get sub-folders off of a folder.
Parameters:
keys - the properties to fetch for each folder
expandedFolderIDs - the IDs of folders below a depth of 1 which are to be expanded (null for none)
Returns:
an array of folders (an empty array if there are no folders)

serverCreateFolder


public Folder serverCreateFolder(java.lang.String sFolderID,
                                 java.lang.String sName,
                                 PropertyKey[] keys)
                          throws DominoException
Hits the server to add a folder.

Note: If you specify a parent folder and that folder cannot hold sub-folders, the new folder is created at the root level.

Parameters:
sFolderID - the ID of the parent folder or null for root
sName - the name of the new folder (use '\' characters to create a folder hierarchy)
keys - the properties to bring back from the new folder or null to not retrieve the newly created folder
Returns:
the new folder with properties loaded for each of the keys
See Also:
Folder.holdFolders()

serverDeleteFolders


public void serverDeleteFolders(java.lang.String[] folderIDs)
                         throws DominoException
Hits the server to delete a folder.
Parameters:
folderIDs - the IDs of the folders to delete

serverCopyFolder


public void serverCopyFolder(java.lang.String sSourceFolderID,
                             java.lang.String sTargetFolderID,
                             java.lang.String sNewName)
                      throws DominoException
Hits the server to copy folders to another folder.
Parameters:
sSourceFolderID - the ID of the source folders
sTargetFolderID - the ID of the target folder
sNewName - the name for the new folder (or null to keep the same name) (may not include '\' characters)

serverMoveFolder


public void serverMoveFolder(java.lang.String sSourceFolderID,
                             java.lang.String sTargetFolderID)
                      throws DominoException
Hits the server to move folders to another folder. The following folder types cannot be moved. If an attempt is made to move the one of these folders, this method does nothing:

If an attempt is made to move the source folder to a target folder where a folder already exists with the same name, a FolderAlreadyExistsException is thrown.

Note: The target folder must be able to hold sub-folders.

Parameters:
sSourceFolderID - the ID of the source folder
sTargetFolderID - the ID of the target folder

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.