Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content
Class PropertyDefinition

    java.lang.Object
      com.bea.content.ContentEntity
          com.bea.content.PropertyDefinition

All Implemented Interfaces
  Serializable

    public class PropertyDefinition

extends ContentEntity

PropertyDefinition defines the shape of a Property. It describes the Property type (binary, boolean, string, double, calendar, long, link), whether it is required, whether it is editable, the default value and restricted values, if applicable.

A PropertyDefinition may contain a PropertyChoice array. This is a list of values that may be selected for a Property's values.

Rules for a PropertyDefinition are as follows.

- If the PropertyDefinition contains a reference, it may not be multi-valued, or of types link or binary.
- If the PropertyDefinition is of type binary, it may not be multi-valued or restricted and may only have one PropertyChoice.
- If the PropertyDefinition is of type boolean, it may not be multi-valued.
- If the PropertyDefinition is of type link, it may not have PropertyChoice(s), or be set as the primary property.
- If the PropertyDefinition is restricted then the Property's value(s) must be contained in the PropertyChoice list. For example: consider a PropertyDefinition named "color". It has PropertyChoices "blue", "green", and "red". If the PropertyDefinition is restricted then the value of a Property defined by this PropertyDefinition may not have a value that isn't "green", "red", or "blue".

  See Also
    Serialized Form

  Field Summary
  `static int` | `INHERITED` A constant which defines a property definition type.
  `static int` | `NATIVE` A constant which defines a property definition type.
  `static int` | `OVERRIDDEN` A constant which defines a property definition type.

  Fields inherited from class com.bea.content.ContentEntity
  `id`

  Constructor Summary
  `PropertyDefinition(ID nestedObjectClassId, ID id, String name, int type, boolean isMandatory, boolean isMultiValued, String description)` Constructs PropertyDefinition without PropertyChoices that represents a nested `ObjectClass`.
  `PropertyDefinition(ID id, String name, String reference, int type, boolean isReadOnly, boolean isRestricted, boolean isMandatory, boolean isMultiValued, boolean isPrimary, String description)` Constructs PropertyDefinition without PropertyChoices.
  `PropertyDefinition(PropertyChoice[] propertyChoices, ID id, String name, String reference, int type, boolean isReadOnly, boolean isRestricted, boolean isMandatory, boolean isMultiValued, boolean isPrimary, String description)` Constructs the PropertyDefinition with all attributes.

  Method Summary
  `String` | `getDescription()` Gets the description.
  `String` | `getName()` Returns the name of this PropertyDefinition.
  `ID` | `getNestedObjectClassId()` Gets the nested object class id that this property definition represents.
  `PropertyChoice[]` | `getPropertyChoices()` Returns the array of PropertyChoices.
  `int` | `getPropertyDefinitionType()` Gets the property definition type for this definition.
  `String` | `getReference()` Returns a means by which all Properties for this PropertyDefinition may be referenced.In the BEA Repository, this is the column name for an explicit property.
  `int` | `getType()` Gets the defined data type.
  `boolean` | `isMandatory()` Returns true if a value for the Property is required.
  `void` | `isMandatory(boolean isMandatory)` Set to true if a value for the Property is required, or false otherwise.
  `boolean` | `isMultiValued()` Returns true if the Property can have multiple values.
  `void` | `isMultiValued(boolean isMultiValued)` Set to true if the Property can have multiple values, false otherwise.
  `boolean` | `isNested()` This indicates if a property definition which is a part of the object class due to the definition's object class nesting another object class as one of its property definitions.
  `boolean` | `isPrimary()` Returns true if this PropertyDefinition represents the primary PropertyDefinition for its ObjectClass.
  `void` | `isPrimary(boolean isPrimary)` Set to true if this PropertyDefinition represents the primary PropertyDefinition for its ObjectClass.
  `boolean` | `isReadOnly()` Returns true if a value for the Property can be edited.
  `void` | `isReadOnly(boolean isReadOnly)` Set to true if a value for the Property can be edited, or false otherwise.
  `boolean` | `isRestricted()` Returns true if a value for the Property is restricted to the available choices.
  `void` | `isRestricted(boolean isRestricted)` Set to true if a value for the Property is restricted to the available choices, or false otherwise.
  `boolean` | `isSearchable()` Returns true if a value for the Property should be indexed when nodes of this type are indexed in the search engine.
  `void` | `isSearchable(boolean isSearchable)` Set to true if properties of this definition should be searchable, false otherwise.
  `void` | `setDescription(String description)` Sets the description.
  `void` | `setName(String name)` Sets the name of this PropertyDefinition.
  `void` | `setNestedObjectClassId(ID nestedObjectClassId)` Sets the nested object class id that this property definition represents.
  `void` | `setPropertyChoices(PropertyChoice[] propertyChoices)` Sets the array of PropertyChoices.
  `void` | `setReference(String reference)` Sets a means by which all Properties for this PropertyDefinition may be referenced.
  `void` | `setType(int type)` Sets the defined data type id.
  `String` | `toString()` Returns the PropertyDefinition attributs as a String.

  Methods inherited from class com.bea.content.ContentEntity
  `getId, setId`

  Methods inherited from class java.lang.Object
  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  Field Detail

  ### NATIVE

      public static final int NATIVE

    A constant which defines a property definition type. A native type indicates a property definition explicitly defined on a given object class. The definition was not a part of the object class via object class inheritance.

    See Also
      Constants Summary

  ### INHERITED

      public static final int INHERITED

    A constant which defines a property definition type. An inherited type indicates a property definition which is a part of the object class due to the definition's object class extending another object class.

    See Also
      Constants Summary

  ### OVERRIDDEN

      public static final int OVERRIDDEN

    A constant which defines a property definition type. An overridden type indicates a property definition which was inherited and then was further modified to override the original definition in some fashion.

    See Also
      Constants Summary

  Constructor Detail

  ### PropertyDefinition

      public PropertyDefinition(PropertyChoice[] propertyChoices,
                                ID id,
                                String name,
                                String reference,
                                int type,
                                boolean isReadOnly,
                                boolean isRestricted,
                                boolean isMandatory,
                                boolean isMultiValued,
                                boolean isPrimary,
                                String description)

    Constructs the PropertyDefinition with all attributes.

    Parameters
      `propertyChoices` - - available value choices for a Property that is defined by this PropertyDefinition.
      `id` - - the unique id for this PropertyDefinition
      `name` - - the name of this PropertyDefinition that is unique relative to its ObjectClass.
      `reference` - - an external reference for all Properties defined by this PropertyDefinition. In the BEA Repository, this is the column name for an explicit property.
      `type` - - the type of this PropertyDefinition.
      `isReadOnly` - - true if a Property defined by this PropertyDefinition is intended to not be writable, false otherwise.
      `isRestricted` - - true if a Property defined by this PropertyDefinition may only contain value(s) defined in this PropertyDefinitions PropertyChoice array, false otherwise
      `isMandatory` - - true if a Property defined by this PropertyDefinition must contain a non-null value and in the case of a String must not be empty, false otherwise
      `isMultiValued` - - true if a Property defined by this PropertyDefinition may contain multiple values, false otherwise.
      `isPrimary` - - true if the PropertyDefinition is the Primary PropertyDefinition for the ObjectClass.
      `description` - - a description of this PropertyDefinition.

  ### PropertyDefinition

      public PropertyDefinition(ID id,
                                String name,
                                String reference,
                                int type,
                                boolean isReadOnly,
                                boolean isRestricted,
                                boolean isMandatory,
                                boolean isMultiValued,
                                boolean isPrimary,
                                String description)

    Constructs PropertyDefinition without PropertyChoices.

    Parameters
      `id` - - the unique id for this PropertyDefinition
      `name` - - the name of this PropertyDefinition that is unique relative to its ObjectClass.
      `reference` - - an external reference for all Properties defined by this PropertyDefinition. In the BEA Repository, this is the column name for an explicit property.
      `type` - - the type of this PropertyDefinition.
      `isReadOnly` - - true if a Property defined by this PropertyDefinition is intended to not be writable, false otherwise.
      `isRestricted` - - true if a Property defined by this PropertyDefinition may only contain value(s) defined in this PropertyDefinitions PropertyChoice array, false otherwise
      `isMandatory` - - true if a Property defined by this PropertyDefinition must contain a non-null value and in the case of a String must not be empty, false otherwise.
      `isMultiValued` - - true if a Property defined by this PropertyDefinition may contain multiple values, false otherwise.
      `isPrimary` - - true if the PropertyDefinition is the Primary PropertyDefinition for the ObjectClass.
      `description` - - a description of this PropertyDefinition.

  ### PropertyDefinition

      public PropertyDefinition(ID nestedObjectClassId,
                                ID id,
                                String name,
                                int type,
                                boolean isMandatory,
                                boolean isMultiValued,
                                String description)

    Constructs PropertyDefinition without PropertyChoices that represents a nested `ObjectClass`. There is no way to set `propertyChoices`, `isReadOnly`, `reference`, `isRestricted`, or `isPrimary` variables, as they have to be `null` or `false` for a nested type.

    Parameters
      `nestedObjectClassId` - - the unique id of the nested `ObjectClass` that this PropertyDefinition represents.
      `id` - - the unique id for this PropertyDefinition
      `name` - - the name of this PropertyDefinition that is unique relative to its ObjectClass.
      `type` - - the type of this PropertyDefinition.
      `isMandatory` - - true if a Property defined by this PropertyDefinition must contain a non-null value and in the case of a String must not be empty, false otherwise.
      `isMultiValued` - - true if a Property defined by this PropertyDefinition may contain multiple values, false otherwise.
      `description` - - a description of this PropertyDefinition.

  Method Detail

  ### getDescription

      public String getDescription()

    Gets the description.

  ### setDescription

      public void setDescription(String description)

    Sets the description.

  ### getPropertyChoices

      public PropertyChoice[] getPropertyChoices()

    Returns the array of PropertyChoices.

  ### setPropertyChoices

      public void setPropertyChoices(PropertyChoice[] propertyChoices)

    Sets the array of PropertyChoices.

  ### getName

      public String getName()

    Returns the name of this PropertyDefinition. If this is a nested type, the name will reflect the nested hierarchy with `Property.NESTED_DELIMITER` between each parent and child property definition name. The delimiter is not valid for use within the actual name, only to seperate the parent/child names.

  ### setName

      public void setName(String name)

    Sets the name of this PropertyDefinition. If this is a nested type, the name will reflect the nested hierarchy with `Property.NESTED_DELIMITER` between each parent and child property definition name. The delimiter is not valid for use within the actual name, only to seperate the parent/child names.

  ### getReference

      public String getReference()

    Returns a means by which all Properties for this PropertyDefinition may be referenced.In the BEA Repository, this is the column name for an explicit property. Null if no such reference exists.

  ### setReference

      public void setReference(String reference)

    Sets a means by which all Properties for this PropertyDefinition may be referenced. In the BEA Repository, this is the column name for an explicit property.

  ### getType

      public int getType()

    Gets the defined data type. See `Property` for the constants that define the types.

  ### setType

      public void setType(int type)

    Sets the defined data type id. See `Property` for the constants that define the types.

  ### getNestedObjectClassId

      public ID getNestedObjectClassId()

    Gets the nested object class id that this property definition represents.

  ### setNestedObjectClassId

      public void setNestedObjectClassId(ID nestedObjectClassId)

    Sets the nested object class id that this property definition represents.

  ### getPropertyDefinitionType

      public int getPropertyDefinitionType()

    Gets the property definition type for this definition. This will be one of `PropertyDefinition.NATIVE`, `PropertyDefinition.INHERITED` or `PropertyDefinition.OVERRIDDEN`. This is system managed and therefore is not settable.

    Returns
      The property definition type.

  ### isReadOnly

      public boolean isReadOnly()

    Returns true if a value for the Property can be edited.

  ### isReadOnly

      public void isReadOnly(boolean isReadOnly)

    Set to true if a value for the Property can be edited, or false otherwise.

  ### isRestricted

      public boolean isRestricted()

    Returns true if a value for the Property is restricted to the available choices.

  ### isRestricted

      public void isRestricted(boolean isRestricted)

    Set to true if a value for the Property is restricted to the available choices, or false otherwise.

  ### isMultiValued

      public boolean isMultiValued()

    Returns true if the Property can have multiple values.

  ### isMultiValued

      public void isMultiValued(boolean isMultiValued)

    Set to true if the Property can have multiple values, false otherwise.

  ### isMandatory

      public boolean isMandatory()

    Returns true if a value for the Property is required.

  ### isMandatory

      public void isMandatory(boolean isMandatory)

    Set to true if a value for the Property is required, or false otherwise.

  ### isSearchable

      public boolean isSearchable()

    Returns true if a value for the Property should be indexed when nodes of this type are indexed in the search engine.

  ### isSearchable

      public void isSearchable(boolean isSearchable)

    Set to true if properties of this definition should be searchable, false otherwise.

  ### isNested

      public boolean isNested()

    This indicates if a property definition which is a part of the object class due to the definition's object class nesting another object class as one of its property definitions. Root level ontainer types, the property definition which was defined as nesting another object class, will not be marked as nested by this variable, just the property definitions from the nested object class and any further levels of nesting.

  ### isPrimary

      public boolean isPrimary()

    Returns true if this PropertyDefinition represents the primary PropertyDefinition for its ObjectClass. There may only be one primary PropertyDefinition per ObjectClass. The ObjectClass holds the true relationship to the primary PropertyDefinition. This is an indicator to describe that relationship.

  ### isPrimary

      public void isPrimary(boolean isPrimary)

    Set to true if this PropertyDefinition represents the primary PropertyDefinition for its ObjectClass. There may only be one primary PropertyDefinition per ObjectClass. The ObjectClass holds the true relationship to the primary PropertyDefinition. This is an indicator to describe that relationship.

  ### toString

      public String toString()

    Returns the PropertyDefinition attributs as a String.

    Overrides:
      `toString` in class `ContentEntity`

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

  Copyright © 2006 BEA Systems, Inc. All Rights Reserved