com.plumtree.remote.prc
Interface IDocumentProperties


public interface IDocumentProperties

Interface that manipulates document properties. Note that it is possible to set invalid properties (i.e. non-document properties) on objects of this type; however this should not be done as will result in unexpected behaviour upon saving of the object.


Method Summary
 java.util.Date getDateValue(int propertyID)
          Gets a document property as a date.
 double getDoubleValue(int propertyID)
          Gets a document property as a double.
 int[] getIDs()
          Gets the available property IDs.
 int getIntegerValue(int propertyID)
          Gets a document property as an int.
 java.lang.String getStringValue(int propertyID)
          Gets a document property as a String.
 java.lang.Object getValue(int propertyID)
          Gets a document property as an Object.
 boolean hasValue(int propertyID)
          Determines whether a specific value is present.
 void remove(int propertyID)
          Removes a document property.
 void setDateValue(int propertyID, java.util.Date value)
          Sets a document property as a date.
 void setDoubleValue(int propertyID, double value)
          Sets a document property as a double.
 void setIntegerValue(int propertyID, int value)
          Sets a document property as an int.
 void setStringValue(int propertyID, java.lang.String value)
          Sets a document property as a String.
 

Method Detail

getIDs

public int[] getIDs()
Gets the available property IDs.

Returns:
the available property IDs, an empty array if none exist

getValue

public java.lang.Object getValue(int propertyID)
Gets a document property as an Object.

Parameters:
propertyID - the property ID for which to get a value
Returns:
the document property value

getStringValue

public java.lang.String getStringValue(int propertyID)
Gets a document property as a String.

Parameters:
propertyID - the property ID for which to get a value
Returns:
the document property value
Throws:
java.lang.ClassCastException - if the property type is not a String

setStringValue

public void setStringValue(int propertyID,
                           java.lang.String value)
Sets a document property as a String. Note: Type checking for Property values does not occur, thus setting a Property value using an incorrect object type can result in an inconsistent state.

Parameters:
propertyID - the ID of the property to set
value - the value to set the property to

getIntegerValue

public int getIntegerValue(int propertyID)
Gets a document property as an int.

Parameters:
propertyID - the property ID for which to get a value
Returns:
the document property value
Throws:
java.lang.ClassCastException - if the property type is not an int

setIntegerValue

public void setIntegerValue(int propertyID,
                            int value)
Sets a document property as an int. Note: Type checking for Property values does not occur, thus setting a Property value using an incorrect object type can result in an inconsistent state.

Parameters:
propertyID - the property ID of the int property to set
value - the value to set the property to

getDateValue

public java.util.Date getDateValue(int propertyID)
Gets a document property as a date.

Parameters:
propertyID - the property ID for which to get a value
Returns:
the document property value
Throws:
java.lang.ClassCastException - if the property type is not a date

setDateValue

public void setDateValue(int propertyID,
                         java.util.Date value)
Sets a document property as a date. Note: Type checking for Property values does not occur, thus setting a Property value using an incorrect object type can result in an inconsistent state.

Parameters:
propertyID - the property ID of the date property to set
value - the value to set the property to

getDoubleValue

public double getDoubleValue(int propertyID)
Gets a document property as a double.

Parameters:
propertyID - the property ID for which to get a value
Returns:
the document property value
Throws:
java.lang.ClassCastException - if the property type is not a double

setDoubleValue

public void setDoubleValue(int propertyID,
                           double value)
Sets a document property as a double. Note: Type checking for Property values does not occur, thus setting a Property value using an incorrect object type can result in an inconsistent state.

Parameters:
propertyID - the property ID of the double property to set
value - the value to set the property to

hasValue

public boolean hasValue(int propertyID)
Determines whether a specific value is present.

Parameters:
propertyID - the property ID of the property to check
Returns:
true if and only if the value is present

remove

public void remove(int propertyID)
Removes a document property.

Parameters:
propertyID - the property ID of the property to remove


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.