Interface Choice
-
- All Superinterfaces:
- DependentObject, EngineObject, RepositoryObject, java.io.Serializable
public interface Choice extends RepositoryObject, EngineObject, DependentObject
Represents a single choice item in a choice list that can be assigned to a property, or represents a group node for a nested collection of choice items within a choice list. A choice item is a single possible value, or choice, in a choice list. A choice item can be of two possible types: integer or string. An integer-type choice item holds a single integer value and can be assigned only to an integer-valued property. A string-type choice item holds a single string value and can be assigned only to a string-valued property.A
Choice
object is a dependently persistable object; it has nosave
method and therefore cannot be independently saved. Because any givenChoice
object is dependent on the independently persistablecom.filenet.api.admin.ChoiceList
object to which it belongs, its state is not saved until you call thesave
method of theChoiceList
object that owns it. For a givenChoice
object to belong to acom.filenet.api.admin.ChoiceList
object, it must be added to thecom.filenet.api.collection.ChoiceList
collection that is returned by thecom.filenet.api.admin.ChoiceList
object's ChoiceValues property.The type of data that a
Choice
object can represent is determined by theChoiceType
constant value that you specify with its ChoiceType property. This property determines whether aChoice
object represents an integer-type choice item, a string-type choice item, a group node for a nested collection of integer-type choice items, or a group node for a nested collection of string-type choice items.Locale support is provided by the DisplayNames property, using the same mechanism that
ClassDefinition
andPropertyTemplate
objects use. However, unlike those objects, theChoice
object does not have a DescriptiveTexts property. To provide locale support for aChoice
object, set its DisplayNames property to aLocalizedStringList
object containing a collection ofLocalizedString
objects. Each object in this collection represents a locale-specific, user-readable display name that can be used for aChoice
object; set its LocaleName property to a locale ID and its LocalizedText property to the locale-specific text for the display name. Once you have set the DisplayNames property, the server will automatically set the value of the DisplayName property to the LocalizedText property value of theLocalizedString
object in theLocalizedStringList
collection that corresponds to the object store's default locale.A
Choice
object's display name, or label, identifies it and is stored by its DisplayName property. You can either set the DisplayName property directly or you can set it indirectly by setting the DisplayNames property. Setting the DisplayNames property is the preferred method. You must set either aChoice
object's DisplayName property or its DisplayNames property; you cannot set both. If you set the DisplayName property directly, the server will automatically create aLocalizedString
object with its LocaleName property set to the object store's default locale and add it as a single item in the DisplayNames property'sLocalizedStringList
collection. If you set the DisplayName property directly, locale support will be bypassed and the language of its text may not match the specified locale. For example, if you store English text (en-us) in the DisplayName property and the default locale is French (fr-fr), the DisplayNames property will return a collection containing a singleLocalizedString
object that specifies a French locale with English text. Note that this behavior is unique toChoice
objects.A
Choice
object's display name, which is always a string value, should not be confused with its value, which can be a string, an integer, or a collection ofChoice
objects (when aChoice
object acts as a group node). AChoice
object's display name is assigned with the DisplayName property, while its value is assigned using the appropriate property, depending on its type: ChoiceIntegerValue for integer-type choice items, ChoiceStringValue for string-type choice items, or ChoiceValues for group nodes. Although the server does not check the display names and values of the choice items within a given choice list for uniqueness, it is recommended that they be unique to avoid ambiguity.To create a
Choice
object, call theFactory.Choice.createInstance
method. In order to save the state of a newChoice
object (when you save thecom.filenet.api.admin.ChoiceList
object to which it belongs), you must, at a minimum, set its ChoiceType and DisplayNames properties. The DisplayNames property can be either set directly, by setting it to aLocalizedStringList
object; or set indirectly, by setting the DisplayName property. To create a list collection ofChoice
objects (com.filenet.api.collection.ChoiceList
object), call theFactory.Choice.createList
method.Metadata
-
-
Method Summary
Methods Modifier and Type Method and Description java.lang.Integer
get_ChoiceIntegerValue()
Returns the value of the ChoiceIntegerValue property.java.lang.String
get_ChoiceStringValue()
Returns the value of the ChoiceStringValue property.ChoiceType
get_ChoiceType()
Returns the value of the ChoiceType property.ChoiceList
get_ChoiceValues()
Returns the value of the ChoiceValues property.java.lang.String
get_DisplayName()
Returns the value of the DisplayName property.LocalizedStringList
get_DisplayNames()
Returns the value of the DisplayNames property.Id
get_Id()
Returns the value of the Id property.java.lang.String
get_Name()
Returns the value of the Name property.void
set_ChoiceIntegerValue(java.lang.Integer value)
Sets the value of the ChoiceIntegerValue property.void
set_ChoiceStringValue(java.lang.String value)
Sets the value of the ChoiceStringValue property.void
set_ChoiceType(ChoiceType value)
Sets the value of the ChoiceType property.void
set_ChoiceValues(ChoiceList value)
Sets the value of the ChoiceValues property.void
set_DisplayName(java.lang.String value)
Sets the value of the DisplayName property.void
set_DisplayNames(LocalizedStringList value)
Sets the value of the DisplayNames property.-
Methods inherited from interface com.filenet.api.core.RepositoryObject
getObjectStore
-
Methods inherited from interface com.filenet.api.core.EngineObject
get_ClassDescription, getClassName, getConnection, getProperties, getSuperClasses
-
-
-
-
Method Detail
-
get_DisplayName
java.lang.String get_DisplayName()
Returns the value of the DisplayName property. For more information, see DisplayName Property.
-
set_DisplayName
void set_DisplayName(java.lang.String value)
Sets the value of the DisplayName property. For more information, see DisplayName Property.
-
get_DisplayNames
LocalizedStringList get_DisplayNames()
Returns the value of the DisplayNames property. For more information, see DisplayNames Property.
-
set_DisplayNames
void set_DisplayNames(LocalizedStringList value)
Sets the value of the DisplayNames property. For more information, see DisplayNames Property.
-
get_Id
Id get_Id()
Returns the value of the Id property. For more information, see Id Property.
-
get_Name
java.lang.String get_Name()
Returns the value of the Name property. For more information, see Name Property.
-
get_ChoiceType
ChoiceType get_ChoiceType()
Returns the value of the ChoiceType property. For more information, see ChoiceType Property.
-
set_ChoiceType
void set_ChoiceType(ChoiceType value)
Sets the value of the ChoiceType property. For more information, see ChoiceType Property.
-
get_ChoiceIntegerValue
java.lang.Integer get_ChoiceIntegerValue()
Returns the value of the ChoiceIntegerValue property. For more information, see ChoiceIntegerValue Property.
-
set_ChoiceIntegerValue
void set_ChoiceIntegerValue(java.lang.Integer value)
Sets the value of the ChoiceIntegerValue property. For more information, see ChoiceIntegerValue Property.
-
get_ChoiceStringValue
java.lang.String get_ChoiceStringValue()
Returns the value of the ChoiceStringValue property. For more information, see ChoiceStringValue Property.
-
set_ChoiceStringValue
void set_ChoiceStringValue(java.lang.String value)
Sets the value of the ChoiceStringValue property. For more information, see ChoiceStringValue Property.
-
get_ChoiceValues
ChoiceList get_ChoiceValues()
Returns the value of the ChoiceValues property. For more information, see ChoiceValues Property.
-
set_ChoiceValues
void set_ChoiceValues(ChoiceList value)
Sets the value of the ChoiceValues property. For more information, see ChoiceValues Property.
-
-