Compoze Software, Inc.

com.compoze.domino
Class Folder


java.lang.Object

  |

  +--com.compoze.domino.AbstractItem

        |

        +--com.compoze.domino.Folder

All Implemented Interfaces:
java.io.Serializable

public class Folder
extends AbstractItem
implements java.io.Serializable

This class is an Domino folder. Folder instances are obtained from the Folders. Methods that access properites on the class require that the properties were loaded beforehand, when the folder was initially retrieved. Any methods in this class that begin with the string server make a query to the server, and require that the PropertyKey.FOLDER_ID property be loaded beforehand. Any additional property requirements are indicated on each individual method.

See Also:
Serialized Form

Field Summary
static PropertyKey[] ALL_PROPS
          Contains an array of all of the properties available on a folder.
 
Fields inherited from class com.compoze.domino.AbstractItem
m_props, m_session
 
Method Summary
 java.lang.String getAbsoluteName()
          Gets the absolute name of the folder (including its full path relative to the top of the information store).
 int getDepth()
          Gets the depth.
 FolderType getFolderType()
          Gets the folder type.
 java.lang.String getID()
          Gets the ID of the folder.
 int getMemoCount()
          Gets the number of memos.
 java.lang.String getName()
          Gets the folder name.
 java.lang.String getParentFolderID()
          Gets the parent folder ID.
 int getSubFolderCount()
          Gets the number of subfolders.
 int getUnreadMemoCount()
          Gets the number of unread memos.
 boolean hasSubFolders()
          Checks if a folder has subfolders.
 boolean holdFolders()
          Checks if this folder can hold sub-folders.
 boolean holdMemos()
          Checks if this folder can hold memos.
 void serverCopyTo(java.lang.String sTargetFolderID, java.lang.String sNewName)
          Hits the server to copy the folder to another folder.
 Folder serverCreateFolder(java.lang.String sName, PropertyKey[] keys)
          Hits the server to add a folder below the current folder.
 void serverDelete()
          Hits the server to delete the folder.
 int serverGetMemoCount()
          Deprecated. As of 3.6.25, replaced by getMemoCount() and property PropertyKey.FOLDER_MEMO_COUNT
 Memo[] serverGetMemos(int iStartIndex, int iEndIndex, PropertyKey[] keys, SortProperty sortProp)
          Queries the server to get memos from the server between the specified iStartIndex and iEndIndex starting at 0.
 Folder[] serverGetSubFolders(int iDepth, PropertyKey[] keys)
          Gets the subfolders.
 void serverMoveTo(java.lang.String sFolderID)
          Hits the server to move the folder to another folder.
 void serverUpdate()
          Hits the server to update any changed properties.
 void setName(java.lang.String sName)
          Sets the folder name.
 java.lang.String toString()
          Returns the string representation of the folder.
 
Methods inherited from class com.compoze.domino.AbstractItem
get, getBoolean, getDate, getDateArray, getDouble, getInt, getPropertyKeys, getString, getStringArray, getUpdatedPropertyValues, set, setBoolean, setDate, setDouble, setInt, setString, setStringArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL_PROPS


public static final PropertyKey[] ALL_PROPS
Contains an array of all of the properties available on a folder. Although this can be used when specifying property keys to retrieve, it's preferable to only specify the keys that are required as the number of properties that are pulled back has a direct impact on performance.
Method Detail

serverUpdate


public void serverUpdate()
                  throws DominoException
Hits the server to update any changed properties. If an attempt is made to rename the folder and a folder already exists with the new name, a FolderAlreadyExistsException is thrown.
Overrides:
serverUpdate in class AbstractItem
See Also:
FolderAlreadyExistsException

serverDelete


public void serverDelete()
                  throws DominoException
Hits the server to delete the folder. The following folder types cannot be deleted. This method throws a DominoException if you attempt to delete one of these folder types:
See Also:
PropertyKey.FOLDER_TYPE

serverCopyTo


public void serverCopyTo(java.lang.String sTargetFolderID,
                         java.lang.String sNewName)
                  throws DominoException
Hits the server to copy the folder to another folder.
Parameters:
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)

serverMoveTo


public void serverMoveTo(java.lang.String sFolderID)
                  throws DominoException
Hits the server to move the folder 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 this folder to a location 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:
sFolderID - the ID of the target folder
See Also:
FolderType, holdFolders()

serverCreateFolder


public Folder serverCreateFolder(java.lang.String sName,
                                 PropertyKey[] keys)
                          throws DominoException
Hits the server to add a folder below the current folder. This method throws an exception if it cannot hold sub-folders.
Parameters:
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
See Also:
PropertyKey.FOLDER_TYPE, holdFolders()

getID


public java.lang.String getID()
                       throws DominoException
Gets the ID of the folder.
Returns:
the ID
See Also:
PropertyKey.FOLDER_ID

holdFolders


public boolean holdFolders()
                    throws DominoException
Checks if this folder can hold sub-folders. The following folder types cannot holder sub-folders:
Returns:
true if this folder can hold sub-folders; false otherwise
See Also:
PropertyKey.FOLDER_TYPE

holdMemos


public boolean holdMemos()
                  throws DominoException
Checks if this folder can hold memos. The following folder types cannot holder memos:
Returns:
true if this folder can hold memos; false otherwise
See Also:
PropertyKey.FOLDER_TYPE

getName


public java.lang.String getName()
                         throws DominoException
Gets the folder name.
Returns:
the folder name
See Also:
PropertyKey.FOLDER_NAME

setName


public void setName(java.lang.String sName)
             throws DominoException
Sets the folder name. This name cannot contain '\' characters.
Parameters:
sName - the folder name (may not be null)
See Also:
PropertyKey.FOLDER_NAME

getAbsoluteName


public java.lang.String getAbsoluteName()
                                 throws DominoException
Gets the absolute name of the folder (including its full path relative to the top of the information store).
Returns:
the absolute name
See Also:
PropertyKey.FOLDER_ABSOLUTE_NAME

getSubFolderCount


public int getSubFolderCount()
                      throws DominoException
Gets the number of subfolders.
Returns:
the subfolder count
See Also:
PropertyKey.FOLDER_SUBFOLDER_COUNT

serverGetSubFolders


public Folder[] serverGetSubFolders(int iDepth,
                                    PropertyKey[] keys)
                             throws DominoException
Gets the subfolders.
Parameters:
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

getDepth


public int getDepth()
             throws DominoException
Gets the depth.
Returns:
the depth
See Also:
PropertyKey.FOLDER_DEPTH

getFolderType


public FolderType getFolderType()
                         throws DominoException
Gets the folder type.
Returns:
the folder type
See Also:
PropertyKey.FOLDER_TYPE

hasSubFolders


public boolean hasSubFolders()
                      throws DominoException
Checks if a folder has subfolders.
Returns:
true if the folder has subfolders
See Also:
PropertyKey.FOLDER_HAS_SUBFOLDERS

serverGetMemoCount


public int serverGetMemoCount()
                       throws DominoException
Deprecated. As of 3.6.25, replaced by getMemoCount() and property PropertyKey.FOLDER_MEMO_COUNT

Queries the server for the memo count.
Returns:
the memo count

serverGetMemos


public Memo[] serverGetMemos(int iStartIndex,
                             int iEndIndex,
                             PropertyKey[] keys,
                             SortProperty sortProp)
                      throws DominoException
Queries the server to get memos from the server between the specified iStartIndex and iEndIndex starting at 0.
Parameters:
iStartIndex - the start index endpoint (inclusive) or -1 for all
iEndIndex - the end index highpoint (exclusive) or -1 for all
keys - the properties to bring back from the memo
sortProp - the property to sort by or null for default sorting
Returns:
an array of memos

getUnreadMemoCount


public int getUnreadMemoCount()
                       throws DominoException
Gets the number of unread memos.
Returns:
the unread memo count
See Also:
PropertyKey.FOLDER_MEMO_UNREAD_COUNT

getMemoCount


public int getMemoCount()
                 throws DominoException
Gets the number of memos.
Returns:
the memo count
See Also:
PropertyKey.FOLDER_MEMO_COUNT

getParentFolderID


public java.lang.String getParentFolderID()
                                   throws DominoException
Gets the parent folder ID.
Returns:
the parent folder ID or null if parent is root folder
See Also:
PropertyKey.FOLDER_PARENT_FOLDER_ID

toString


public java.lang.String toString()
Returns the string representation of the folder.
Overrides:
toString in class java.lang.Object
Returns:
the string representation of the folder
See Also:
PropertyKey.FOLDER_NAME, PropertyKey.FOLDER_ID, PropertyKey.FOLDER_ABSOLUTE_NAME

Compoze Software, Inc.

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