Oracle Content Management SDK

oracle.ifs.beans
Class PropertyDefinition

java.lang.Object
  |
  +--oracle.ifs.beans.LibraryObjectDefinition
        |
        +--oracle.ifs.beans.SystemObjectDefinition
              |
              +--oracle.ifs.beans.PropertyDefinition

public class PropertyDefinition
extends SystemObjectDefinition

A PropertyDefinition is used to hold the specification of a Property value associated with a PropertyBundle.

The PropertyDefinition are assigned to PropertyBundleDefinition either to create a new PropertyBundle or to modify an existing one. Methods are provided to set the name & value of the Property.

See Also:
Property

Constructor Summary
PropertyDefinition(LibrarySession session)
          Constructs a PropertyDefinition by explicitly capturing the session.
 
Method Summary
 int getDataType()
          Gets the data type of the new Property.
 java.lang.String getName()
          Gets the Name of the new Property that was set via setName().
 AttributeValue getValue()
          Gets the value of the new Property.
 void setName(java.lang.String name)
          Sets the Name of the new Property.
 void setValue(AttributeValue av)
          Sets the value and data type of the new Property.
 
Methods inherited from class oracle.ifs.beans.LibraryObjectDefinition
clone, getAttribute, getAttributes, getClassObject, getOption, getOptionKeys, removeAttribute, removeOption, setAttribute, setAttribute, setAttributeByUpperCaseName, setAttributes, setClassObject, setOption
 

Constructor Detail


PropertyDefinition

public PropertyDefinition(LibrarySession session)
                   throws IfsException
Constructs a PropertyDefinition by explicitly capturing the session.
Parameters:
session - the session
Throws:
IfsException - if the operation fails
Method Detail

getDataType

public final int getDataType()
                      throws IfsException
Gets the data type of the new Property.

Equivalent to:

 AttributeValue av = getValue();
 return (av == null) ?
     Attribute.ATTRIBUTEDATATYPE_UNKNOWN :
     av.getInteger(getSession());
Returns:
the data type
Throws:
IfsException - if the operation fails

getValue

public final AttributeValue getValue()
                              throws IfsException
Gets the value of the new Property.

This method returns an AttributeValue that represents the value of the Property. A null value is returned if this PropertyDefinition is being used to remove a Property from an existing PropertyBundle. In this case, a name will still have to be set, via setName(), to specify which Property is to be removed.

Returns:
the value, or null if this instance is being used to remove a Property
Throws:
IfsException - if the operation fails

setValue

public void setValue(AttributeValue av)
              throws IfsException
Sets the value and data type of the new Property.
Parameters:
av - the AttributeValue containing the new value; implies the data type.
Throws:
IfsException - if the operation fails

getName

public java.lang.String getName()
                         throws IfsException
Gets the Name of the new Property that was set via setName().
Returns:
The name of the Property
Throws:
IfsException - if operation fails.

setName

public void setName(java.lang.String name)
             throws IfsException
Sets the Name of the new Property. This override ensures that the NAME attribute setting is consistent with the Name value in the AttributeValue.
Overrides:
setName in class LibraryObjectDefinition
Parameters:
name - The name to be used for the new instance.
Throws:
IfsException - if operation fails.

Oracle Content Management SDK

(c) 2002 Copyright Oracle Corporation. All rights reserved.