Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.plumtree.remote.prc.content.folder
Interface IFolder

public interface IFolder

An `IFolder` represents a folder in the Content Server which is a container for `IContentItem`, `IDataEntryTemplate`, `IPresentationTemplate`, `ISelectionList`, and other `IFolder` objects. Any modifications to the `IFolder` meta-data will not be stored permanently until `store` is called.

If you associate a folder with a portlet then all content items in that folder or its sub-folders will be indexed by the Search server and made searchable. See the `addAssociatedPortletID` method documentation on how to `add an associated portlet ID` to a folder.

Prior to associating a portlet to a folder, either a content item or a publishable Presentation Template in that folder must be associated with the same portlet.

To associate a portlet with a content item and make it searchable, see `IContentItem.setAssociatedPortletID`.

To associate a portlet with a publishable Presentation Template, see `IPresentationTemplate.setAssociatedPortletID`. Note: Content Server does not support making a publishable Presentation Template searchable.

Refer to the Administrator Guide for Content Server for additional details on portlet association with a content item, a Presentation Template or a folder.

Method Summary
`void` | `addAssociatedPortletID(int portletID)` Adds an association of a portlet to this folder.
`int[]` | `getAssociatedPortletIDs()` Returns the object ids of the portlets associated with this folder or an empty array if no portlets have been associated with the folder.
`java.lang.String` | `getName()` Returns the folder name.
`IFolder` | `getParentFolder()` Returns the parent folder, or `null` if this is the root folder.
`java.lang.String` | `getPath()` Returns a string representation of the path of a folder.
`java.lang.String` | `getUUID()` Returns the folder UUID.
`void` | `removeAssociatedPortletID(int portletID)` Remove a portlet association from this folder.
`void` | `setName(java.lang.String name)` Sets the folder name.
`void` | `store()` Stores the folder.

Method Detail

### addAssociatedPortletID

    public void addAssociatedPortletID(int portletID)

  Adds an association of a portlet to this folder. If a folder is associated with a portlet then all its contents, including its subfolders, may be indexed and made searchable when they are published. See `IPresentationTemplate.isSearchable` for more information.

  Note: The recommended way to associate a portlet with a content folder is through the portlet administration settings in the portal.

  In order to associate a portlet ID with a folder the portlet ID must be associated with a Presentation Template or content item in that folder, or one of its subfolders. To associate a portlet ID with a Presentation Template use `IPresentationTemplate.setAssociatedPortletID`. To associate a portlet ID with a content item use `IContentItem.setAssociatedPortletID`. If the portlet ID is not associated with a content item or Presentation Template in the folder, or one of its subfolders, a `ContentException` will be thrown when `store` is called on the folder.

  If the portlet ID does not refer to a valid portlet a `ContentException` will be thrown when `store` is called. The ID of a portlet can be retrieved using methods in `com.plumtree.remote.prc.IPortletManager` or `com.plumtree.remote.prc.IPortletTemplateManager`.

  Note: A folder can have multiple portlet IDs associated with it but a portlet can only be associated with one folder at a time. If the portlet ID is already associated with another folder, an `IllegalStateException` will be thrown when `store` is called.

  The portlet ID association will not be persisted until `store` is called.

  Parameters:
    `portletID` - the portlet ID to associate with the folder.
  Throws:
    `java.lang.IllegalStateException` - if the folder has been deleted.
    `java.lang.IllegalArgumentException` - if the portlet ID is less than or equal to 0.
  See Also:
    `IPresentationTemplate.isSearchable()`, `IContentItem.setAssociatedPortletID(int)`, `IPresentationTemplate.setAssociatedPortletID(int)`

### getAssociatedPortletIDs

    public int[] getAssociatedPortletIDs()

  Returns the object ids of the portlets associated with this folder or an empty array if no portlets have been associated with the folder. Note: If you are verifying a content item is searchable by checking if it is contained in a folder with an associated portlet ID be sure to check all parent folders for associated portlet IDs as well.

  For more information about associating portlet IDs with folders, refer to the Administrator Guide for Plumtree Content Server.

  Returns:
    an array of portlet object IDs associated with this folder. The returned array is not ordered.
  Throws:
    `java.lang.IllegalStateException` - if the folder has been deleted.
  See Also:
    `IPresentationTemplate.isSearchable()`, `addAssociatedPortletID(int)`, `removeAssociatedPortletID(int)`

### getName

    public java.lang.String getName()

  Returns the folder name.

  Returns:
    the folder name.
  Throws:
    `java.lang.IllegalStateException` - if the folder has been removed.

### getParentFolder

    public IFolder getParentFolder()
                            throws ContentSecurityException,
                                   ContentException,
                                   java.rmi.RemoteException

  Returns the parent folder, or `null` if this is the root folder.

  Returns:
    the parent folder or `null` if this is the root folder.
  Throws:
    `java.lang.IllegalStateException` - if the folder has been deleted or has not been stored.
    `ContentSecurityException` - if the user does not have permission to access the parent folder.
    `ContentException` - if the method call resulted in a Content Server exception.
    `java.rmi.RemoteException` - if there was a communication problem during the execution of the remote method call.

### getPath

    public java.lang.String getPath()

  Returns a string representation of the path of a folder. The folder path string has '/' as delimiter for each path component.

  For example a folder named "Department Codes" that is in the "HR" subfolder of the "Acme Subdivision" top-level folder will return /Acme Subdivision/HR/Deparement Codes as its folder path.

  Returns:
    a string representing the path of the folder.
  Throws:
    `java.lang.IllegalStateException` - if the folder has been deleted or has not been stored.

### getUUID

    public java.lang.String getUUID()

  Returns the folder UUID.

  Returns:
    the folder UUID.
  Throws:
    `java.lang.IllegalStateException` - if the folder has been deleted or has not been stored.

### removeAssociatedPortletID

    public void removeAssociatedPortletID(int portletID)

  Remove a portlet association from this folder. A portlet that was previously associated with this folder can be associated to a different folder after this method is called with the ID of that portlet.

  Calling this method with a portlet ID that was not associated with the folder or on a folder that does not have any associated portlet IDs will not result in a exception.

  The portlet disassociation will not be persisted until `store` is called on the folder.

  Parameters:
    `portletID` - the portlet ID to associate with the folder.
  Throws:
    `java.lang.IllegalStateException` - if the folder has been deleted.
    `java.lang.IllegalArgumentException` - if the portlet ID is less than or equal to 0.
  See Also:
    `addAssociatedPortletID(int)`, `getAssociatedPortletIDs()`

### setName

    public void setName(java.lang.String name)

  Sets the folder name.

  Parameters:
    `name` - the folder name. The name cannot be `null`, empty, or longer than 255 characters. The string used for the name will be trimmed of leading and trailing whitespace when it is stored and is case-insensitive during name comparison.
  Throws:
    `java.lang.IllegalStateException` - if the folder has already been removed.
    `java.lang.IllegalArgumentException` - if the name is an empty string or longer than 255 characters.

### store

    public void store()
               throws ContentSecurityException,
                      NameAlreadyInUseException,
                      ContentException,
                      java.rmi.RemoteException

  Stores the folder. Modifications to the folder will not be permanently stored until this method is called. This method can be used to persist a newly created folder or to persist a modification to an existing folder such as setting a new folder name.

  The security level of a newly-created, persisted folder will inherit the security of its parent folder by default.

  Throws:
    `ContentSecurityException` - if the user does not have permission to create a folder in the parent folder.
    `NameAlreadyInUseException` - if there is already a folder in the parent folder with the same name.
    `ContentException` - if the folder is associated with an invalid portlet ID, or if method call resulted in a Content Server exception.
    `java.rmi.RemoteException` - if there was a communication problem during the execution of the remote method call.
    `java.lang.IllegalStateException` - if the folder has been removed, or if its parent folder has been deleted or has not been stored, or or there was an attempt to associate the folder with a portlet ID that was already associated with another folder.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

For additional information on the IDK, including tutorials, blogs, code samples and more,see the AquaLogic User Interaction Developer Center on BEA dev2dev.

Copyright ©2007 BEA Systems, Inc. All Rights Reserved.