com.plumtree.remote.prc.content.selectionlist
Interface ISelectionList


public interface ISelectionList

Represents a selection list; a user-defined list of text values that specifies the list of valid values for an ISelectionListProperty property that can be added to an IDataEntryTemplate. An ISelectionList is similar to a drop-down menu which contains multiple pre-defined text values for a property. A user can select from the pre-defined list of values instead of typing a value for a text field. A selection list simplifies content item creation because it ensures that the value is spelled correctly and it is a valid value for that field.

A selection list can only be deleted if it is not currently being used by a IDataEntryTemplate. A given selection list can be reused in multiple ISelectionListPropertys and in different IDataEntryTemplates.

In the following example, a selection list is created that contains abbreviations for the U.S. states.

 // Create a selection list representing states
 String[] stateOptionValues = {"CA", "MA"};
 ISelectionList stateSelectionList = selectionListManager.createSelectionList(rootFolder, "State Selection List", stateOptionValues);
 stateSelectionList.store();
 // Expand the list options
 String[] expandedStateOptionValues = {"OR", "NY"};
 stateSelectionList.addValues(expandedStateOptionValues);
 stateSelectionList.store();
 // The list now contains "CA", "MA", "OR", "NY"
 // Remove the expanded options
 stateSelectionList.removeValues(expandedStateOptionValues);
 stateSelectionList.store();
 // The list now contains "CA", "MA"
 


Method Summary
 void addValues(java.lang.String[] values)
          Adds an array of text values to the end of the existing selection list values.
 IFolder getContainingFolder()
          Returns the IFolder that this selection list is created in.
 java.lang.String getName()
          Returns the name of the selection list.
 java.lang.String getUUID()
          Returns the selection list UUID.
 java.lang.String[] getValues()
          Retrieves all text values from the selection list.
 void removeValues(java.lang.String[] values)
          Removes an array of text values from the selection list.
 void setName(java.lang.String name)
          Sets the name for the selection list.
 void store()
          Stores the selection list.
 

Method Detail

addValues

public void addValues(java.lang.String[] values)
Adds an array of text values to the end of the existing selection list values. A text value can only occur once in the selection list. String values are case-sensitive and whitespace-sensitive. The added values will not be stored permanently until store is called.

Parameters:
values - an array of text values to be added to the selection list. A text value cannot be null, an empty string, or a string longer than 255 characters. Text values will preserve whitespace when stored and are case-sensitive during comparison. Duplicate text values will only be added once. The order of the values will be preserved.
Throws:
java.lang.IllegalStateException - if the selection list has already been removed
java.lang.IllegalArgumentException - if the values contain an empty string or a string longer than 255 characters

getContainingFolder

public IFolder getContainingFolder()
                            throws ContentSecurityException,
                                   ContentException,
                                   java.rmi.RemoteException
Returns the IFolder that this selection list is created in.

Returns:
the IFolder that this selection list is created in
Throws:
ContentSecurityException - if the user does not have permission to access the containing folder
ContentException - if the method call resulted in a Publisher exception
java.lang.IllegalStateException - if the selection list has not yet been persisted or has already been removed
java.rmi.RemoteException - if there was a communication problem during the execution of the remote method call

getName

public java.lang.String getName()
Returns the name of the selection list.

Returns:
the name of the selection list
Throws:
java.lang.IllegalStateException - if the selection list has been removed

getUUID

public java.lang.String getUUID()
Returns the selection list UUID. This UUID can be used with ISelectionListManager.getSelectionList to retrieve the selection list.

Returns:
the selection list UUID
Throws:
java.lang.IllegalStateException - if the selection list has not yet been persisted or has been removed

getValues

public java.lang.String[] getValues()
Retrieves all text values from the selection list.

Returns:
an array of text values in the selection list or an empty array if there are no values. The order of values returned will match the order in the selection list.
Throws:
java.lang.IllegalStateException - if the selection list has already been removed

removeValues

public void removeValues(java.lang.String[] values)
Removes an array of text values from the selection list. The removed values will not be removed permanently until store is called.

Parameters:
values - an array of text values to be removed from the selection list. The values cannot be null or contain an empty string or strings longer than 255 characters. Text values will preserve whitespace when stored and are case-sensitive during comparison. Only exact matches will be removed and duplicate string values will only be removed once.
Throws:
java.lang.IllegalStateException - if the selection list has already been removed
java.lang.IllegalArgumentException - if the values contain an empty string, or a string longer than 255 characters

setName

public void setName(java.lang.String name)
Sets the name for the selection list.

Parameters:
name - name of the selection list; 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 selection list 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 selection list. Any modification to the selection list will not be stored permanently until this method is called. This method can be used to persist a newly created selection list or edit an existing one.

Throws:
ContentSecurityException - if the user does not have permission to store the selection list
NameAlreadyInUseException - if there is already a selection list with the given name in the same folder
ContentException - if the method call resulted in a Publisher exception
java.lang.IllegalStateException - if the selection list has already been removed, or if its containing folder has been removed
java.lang.IllegalArgumentException - if the values contain an empty string
java.rmi.RemoteException - if there was a communication problem during the execution of the remote method call


For additional information on the Oracle® WebCenter Interaction Development Kit, including tutorials, blogs, code samples and more, see the Oracle Technology Network (http://www.oracle.com/technology/index.html).

Copyright ©2010 Oracle® Corporation. All Rights Reserved.