com.filenet.wcm.toolkit.server.util.xml
Class WcmXMLProperties

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.util.xml.WcmDocumentImpl
      extended bycom.filenet.wcm.toolkit.server.util.xml.WcmXMLObject
          extended bycom.filenet.wcm.toolkit.server.util.xml.WcmXMLProperties
Direct Known Subclasses:
WcmXMLSecurityPolicy, WcmXMLSubscription, XMLLinks

public class WcmXMLProperties
extends WcmXMLObject

WcmXMLObject derived class for manipulating the Properties specific XML


Field Summary
static java.lang.String ELEM_PROPERTY
          XPath for a property
 
Fields inherited from class com.filenet.wcm.toolkit.server.util.xml.WcmXMLObject
ELEM_CLASSID, ELEM_CLASSNAME, ELEM_OBJECT, ELEM_OBJECTSTORE
 
Fields inherited from class com.filenet.wcm.toolkit.server.util.xml.WcmDocumentImpl
ELEM_OBJECTSET, thisDoc
 
Constructor Summary
WcmXMLProperties(org.w3c.dom.Document newXMLProperties)
          Constructor takes the Document object to implement
 
Method Summary
 void addMultiObjectValues(java.lang.String symName, int objectType, java.lang.String[] values, java.lang.String[] nameValues)
          Add Multiple Object Values to a Property sValues and sNameValues arrays must be in the same order and the same size.
 void addMultiValues(java.lang.String id, java.lang.String symName, java.lang.String propType, java.lang.String[] values, boolean reqUniElem)
          Deprecated. use same method with additional locale parameter instad - Workplace need this to construct correct message otherwise you have to use another method that catch this method throws exception and extract its message use toString(locale).
 void addMultiValues(java.lang.String id, java.lang.String symName, java.lang.String propType, java.lang.String[] values, boolean reqUniElem, java.util.Locale locale)
          Add multiple values to the indicated multi value property
 org.w3c.dom.Element createComponentRelationshipElement()
          Create the Component Relationship Element
 org.w3c.dom.Element createCustomObjectElement()
          Create the customobject Element
 org.w3c.dom.Element createDocumentElement()
          Create the document Element
 org.w3c.dom.Element createFolderElement()
          Create the folder Element
 org.w3c.dom.Element createLinkElement()
          Create the Link Element
 org.w3c.dom.Element createPropertiesElement(org.w3c.dom.Element objectElement)
          Create the properties Element
 org.w3c.dom.Element createPropertyElement(java.lang.String id, java.lang.String value, java.lang.String nameValue, int objectType, java.lang.String symName, java.lang.String propType, boolean isMultiVal)
          Create a property Element with the given values
 org.w3c.dom.Element createPropertyElement(java.lang.String id, java.lang.String value, java.lang.String nameValue, int objectType, java.lang.String symName, java.lang.String propType, boolean isMultiVal, boolean addModifiedState)
          Create a property Element with the given values
 org.w3c.dom.Element createPropertyElement(java.lang.String id, java.lang.String value, java.lang.String symName, java.lang.String propType, boolean isMultiVal)
          Create a property Element with the given values
 org.w3c.dom.Element createPropertyElement(java.lang.String id, java.lang.String value, java.lang.String symName, java.lang.String propType, boolean isMultiVal, boolean addModifiedState)
          Create a property Element with the given values
 org.w3c.dom.Element getComponentRelationship()
          Returns the Component Relationship Element or creates a new one
 org.w3c.dom.Element getCustomObject()
          Returns the customobject Element or creates a new one
 org.w3c.dom.Element getDocument()
          Returns the document Element or creates a new one
 org.w3c.dom.Element getFolder()
          Returns the folder Element or creates a new one
 org.w3c.dom.Element getLink()
          Returns the Link Element or creates a new one
 org.w3c.dom.Element getPropertiesElement()
          Returns the properties Element or creates it if it doesn't already exist
 org.w3c.dom.Element getPropertyByID(java.lang.String id)
          Returns the property with the given ID
 org.w3c.dom.Element getPropertyByID(java.lang.String id, java.lang.String xPath)
          Returns the property or sub Element with the given ID and appended XPath
 org.w3c.dom.Element getPropertyByName(java.lang.String symName)
          Retrieves the Property Element with the given symname
 org.w3c.dom.Element getPropertyByName(java.lang.String symName, java.lang.String xPath)
          Retrieves the property or sub value using the given XPath with the indicated symname
 java.lang.String getPropertySymnameById(java.lang.String id)
          Retrieves the symname value of the object property with the given id.
 java.lang.String getPropertyValueByID(java.lang.String id)
          Retrieves the value of the property with the given ID.
 java.lang.String getPropertyValueByName(java.lang.String symName)
          Retrieves the value of the property with the given name.
 java.lang.String getPropertyValueByName(java.lang.String symName, java.lang.String xPath)
          Retrieves the value of the property with the given name using the given XPath.
 java.lang.String getPropertyValueIdByName(java.lang.String symName)
          Retrieves the Id value of the object property with the given name.
static WcmXMLProperties getXMLProperties()
          get method returns a new instance of this object
static WcmXMLProperties getXMLProperties(org.w3c.dom.Document newXMLProperties)
          get method creates or contains the Document as one of this type
 void removeAllPropValues(java.lang.String symName)
          Removes all of the property values from the property with the given ID.
 void removeObjectValuesByName(java.lang.String symName, java.lang.String[] values)
          Removes the given object values from the Document property with the given name.
 void removeProperties()
          Remove all properties
 void removePropertyByName(java.lang.String symName)
          Removes the property value from the property with the given symbolic name.
 void removePropValues(java.lang.String symName, java.lang.String[] values)
          Removes the given values from the Document property with the given id.
 void removeValuesByName(java.lang.String symName)
          Removes all of the property values from the property with the given symbolic name.
 void removeValuesByName(java.lang.String symName, java.lang.String[] values)
          Removes the given values from the Document property with the given name.
 boolean setObjectElement(java.lang.String symName, java.lang.String value, java.lang.String nameValue, int objectType)
          Set an object valued property
 boolean setObjectElement(java.lang.String symName, java.lang.String value, java.lang.String objectStoreName, java.lang.String nameValue, int objectType)
           
 void setPropertyByID(java.lang.String id, java.lang.String xPath, java.lang.String value)
          Sets the Property or sub value with the given ID and XPath to the indicated value
 void setPropertyByName(java.lang.String symName, java.lang.String value)
          Sets the Property or sub value with the given ID and XPath to the indicated value
 void setPropertyByName(java.lang.String symName, java.lang.String xPath, java.lang.String value)
          Sets the Property or sub value with the given ID and XPath to the indicated value
 boolean setPropertyElement(java.lang.String id, java.lang.String symName, java.lang.String value, java.lang.String propType, boolean isMultiVal, java.util.Locale locale)
          update or create a new property element with the given information
 
Methods inherited from class com.filenet.wcm.toolkit.server.util.xml.WcmXMLObject
getClassdescElement, getClassId, getClassName, getObjectElement, getObjectId, getObjectStoreElement, getObjectStoreId, getObjectTagValue, getObjectXPath, getXMLObject, getXMLObject, setClassDescription, setObjectStoreId, setObjectTagValue, setObjectXPath
 
Methods inherited from class com.filenet.wcm.toolkit.server.util.xml.WcmDocumentImpl
createCDATAChildElement, createChildElement, createChildElement, createNamespace, getDocumentImpl, getElement, getElement, getElementText, getNodeList, getThis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEM_PROPERTY

public static final java.lang.String ELEM_PROPERTY
XPath for a property

See Also:
Constant Field Values
Constructor Detail

WcmXMLProperties

public WcmXMLProperties(org.w3c.dom.Document newXMLProperties)
Constructor takes the Document object to implement

Parameters:
newXMLProperties - The new Document object
Method Detail

getXMLProperties

public static WcmXMLProperties getXMLProperties()
get method returns a new instance of this object

Returns:
WcmXMLProperties The new WcmXMLProperties object

getXMLProperties

public static WcmXMLProperties getXMLProperties(org.w3c.dom.Document newXMLProperties)
get method creates or contains the Document as one of this type

Parameters:
newXMLProperties - The Document to contain
Returns:
WcmXMLProperties The new WcmXMLProperties object

getDocument

public org.w3c.dom.Element getDocument()
                                throws java.lang.Exception
Returns the document Element or creates a new one

Returns:
The document Element
Throws:
java.lang.Exception

createDocumentElement

public org.w3c.dom.Element createDocumentElement()
                                          throws java.lang.Exception
Create the document Element

Returns:
The new document Element
Throws:
java.lang.Exception

getFolder

public org.w3c.dom.Element getFolder()
                              throws java.lang.Exception
Returns the folder Element or creates a new one

Returns:
The folder Element
Throws:
java.lang.Exception

createFolderElement

public org.w3c.dom.Element createFolderElement()
                                        throws java.lang.Exception
Create the folder Element

Returns:
The new folder Element
Throws:
java.lang.Exception

getCustomObject

public org.w3c.dom.Element getCustomObject()
                                    throws java.lang.Exception
Returns the customobject Element or creates a new one

Returns:
The customobject Element
Throws:
java.lang.Exception

createCustomObjectElement

public org.w3c.dom.Element createCustomObjectElement()
                                              throws java.lang.Exception
Create the customobject Element

Returns:
The new customobject Element
Throws:
java.lang.Exception

getLink

public org.w3c.dom.Element getLink()
                            throws java.lang.Exception
Returns the Link Element or creates a new one

Returns:
The Link Element
Throws:
java.lang.Exception

createLinkElement

public org.w3c.dom.Element createLinkElement()
                                      throws java.lang.Exception
Create the Link Element

Returns:
The new Link Element
Throws:
java.lang.Exception

getComponentRelationship

public org.w3c.dom.Element getComponentRelationship()
                                             throws java.lang.Exception
Returns the Component Relationship Element or creates a new one

Returns:
The omponent Relationship Element
Throws:
java.lang.Exception

createComponentRelationshipElement

public org.w3c.dom.Element createComponentRelationshipElement()
                                                       throws java.lang.Exception
Create the Component Relationship Element

Returns:
The new Link Element
Throws:
java.lang.Exception

removeProperties

public void removeProperties()
                      throws java.lang.Exception
Remove all properties

Throws:
java.lang.Exception

getPropertiesElement

public org.w3c.dom.Element getPropertiesElement()
                                         throws java.lang.Exception
Returns the properties Element or creates it if it doesn't already exist

Returns:
The properties Element
Throws:
java.lang.Exception

createPropertiesElement

public org.w3c.dom.Element createPropertiesElement(org.w3c.dom.Element objectElement)
Create the properties Element

Parameters:
objectElement - The folder or Document Element
Returns:
The properties Element

createPropertyElement

public org.w3c.dom.Element createPropertyElement(java.lang.String id,
                                                 java.lang.String value,
                                                 java.lang.String symName,
                                                 java.lang.String propType,
                                                 boolean isMultiVal)
                                          throws java.lang.Exception
Create a property Element with the given values

Parameters:
id - The new property ID
value - The new property value
symName - The new property symbolic name
propType - The new property property type
isMultiVal - Indicates if the new property is multi-valued
Returns:
The new Property Element
Throws:
java.lang.Exception

createPropertyElement

public org.w3c.dom.Element createPropertyElement(java.lang.String id,
                                                 java.lang.String value,
                                                 java.lang.String symName,
                                                 java.lang.String propType,
                                                 boolean isMultiVal,
                                                 boolean addModifiedState)
                                          throws java.lang.Exception
Create a property Element with the given values

Parameters:
id - The new property ID
value - The new property value
symName - The new property symbolic name
propType - The new property property type
isMultiVal - Indicates if the new property is multi-valued
addModifiedState - boolean flag for adding the ELEM_STATE xml information to the property node
Returns:
The new Property Element
Throws:
java.lang.Exception

createPropertyElement

public org.w3c.dom.Element createPropertyElement(java.lang.String id,
                                                 java.lang.String value,
                                                 java.lang.String nameValue,
                                                 int objectType,
                                                 java.lang.String symName,
                                                 java.lang.String propType,
                                                 boolean isMultiVal)
                                          throws java.lang.Exception
Create a property Element with the given values

Parameters:
id - The new property ID
value - The new property value
nameValue - The name value for an object property
objectType - The objecttype for an object property
symName - The new property symbolic name
propType - The new property property type
isMultiVal - Indicates if the new property is multi-valued
Returns:
The new Property Element
Throws:
java.lang.Exception

createPropertyElement

public org.w3c.dom.Element createPropertyElement(java.lang.String id,
                                                 java.lang.String value,
                                                 java.lang.String nameValue,
                                                 int objectType,
                                                 java.lang.String symName,
                                                 java.lang.String propType,
                                                 boolean isMultiVal,
                                                 boolean addModifiedState)
                                          throws java.lang.Exception
Create a property Element with the given values

Parameters:
id - The new property ID
value - The new property value
nameValue - The name value for an object property
objectType - The objecttype for an object property
symName - The new property symbolic name
propType - The new property property type
isMultiVal - Indicates if the new property is multi-valued
addModifiedState - boolean flag for adding the ELEM_STATE xml information to the property node
Returns:
The new Property Element
Throws:
java.lang.Exception

setPropertyElement

public boolean setPropertyElement(java.lang.String id,
                                  java.lang.String symName,
                                  java.lang.String value,
                                  java.lang.String propType,
                                  boolean isMultiVal,
                                  java.util.Locale locale)
                           throws java.lang.Exception
update or create a new property element with the given information

Parameters:
id - Id of the property to update
symName - Symbolic name of the property to update
value - Value to give the property
propType - Property type of the property
isMultiVal - Is the property multi valued
locale - client locale, only necessary for float property types
Returns:
true if the value was changed
Throws:
java.lang.Exception

setObjectElement

public boolean setObjectElement(java.lang.String symName,
                                java.lang.String value,
                                java.lang.String nameValue,
                                int objectType)
                         throws java.lang.Exception
Set an object valued property

Parameters:
symName - Symbolic name of the property to update
value - Value to give the property
nameValue - Name value of the object property
objectType - Type of the object
Returns:
true if the value was changed
Throws:
java.lang.Exception

setObjectElement

public boolean setObjectElement(java.lang.String symName,
                                java.lang.String value,
                                java.lang.String objectStoreName,
                                java.lang.String nameValue,
                                int objectType)
                         throws java.lang.Exception
Parameters:
symName - Symbolic name of the property to update
value - Value to give the property
objectStoreName - Object Store of the object property
nameValue - Name value of the object property
objectType - Type of the object
Returns:
true if the value was changed
Throws:
java.lang.Exception

addMultiObjectValues

public void addMultiObjectValues(java.lang.String symName,
                                 int objectType,
                                 java.lang.String[] values,
                                 java.lang.String[] nameValues)
                          throws java.lang.Exception
Add Multiple Object Values to a Property sValues and sNameValues arrays must be in the same order and the same size.

Parameters:
symName - Symbolic name of Property to add objects to
objectType - Object type of multiple objects
values - IDs of objects
nameValues - Name values of objects
Throws:
java.lang.Exception - Exception on Error

addMultiValues

public void addMultiValues(java.lang.String id,
                           java.lang.String symName,
                           java.lang.String propType,
                           java.lang.String[] values,
                           boolean reqUniElem)
                    throws java.lang.Exception
Deprecated. use same method with additional locale parameter instad - Workplace need this to construct correct message otherwise you have to use another method that catch this method throws exception and extract its message use toString(locale).

Add multiple values to the indicated multi value property

Parameters:
id - ID of the multi value property
symName - symbolic name of the multi value property
propType - Property Type of property
values - String array of values
reqUniElem - indicates if this property requires unique elements
Throws:
java.lang.Exception

addMultiValues

public void addMultiValues(java.lang.String id,
                           java.lang.String symName,
                           java.lang.String propType,
                           java.lang.String[] values,
                           boolean reqUniElem,
                           java.util.Locale locale)
                    throws java.lang.Exception
Add multiple values to the indicated multi value property

Parameters:
id - ID of the multi value property
symName - symbolic name of the multi value property
propType - Property Type of property
values - String array of values
reqUniElem - indicates if this property requires unique elements
Throws:
java.lang.Exception

removePropValues

public void removePropValues(java.lang.String symName,
                             java.lang.String[] values)
                      throws java.lang.Exception
Removes the given values from the Document property with the given id.

Parameters:
symName - The symbolic name of the property to remove values from.
values - The array of values to remove.
Throws:
java.lang.Exception

removeValuesByName

public void removeValuesByName(java.lang.String symName,
                               java.lang.String[] values)
                        throws java.lang.Exception
Removes the given values from the Document property with the given name.

Parameters:
symName - The name of the property to remove values from.
values - The array of values to remove.
Throws:
java.lang.Exception

removeObjectValuesByName

public void removeObjectValuesByName(java.lang.String symName,
                                     java.lang.String[] values)
                              throws java.lang.Exception
Removes the given object values from the Document property with the given name.

Parameters:
symName - The name of the property to remove values from.
values - The array of ids to remove.
Throws:
java.lang.Exception

removeAllPropValues

public void removeAllPropValues(java.lang.String symName)
                         throws java.lang.Exception
Removes all of the property values from the property with the given ID.

Parameters:
symName - The symbolic name of the property to change.
Throws:
java.lang.Exception

removePropertyByName

public void removePropertyByName(java.lang.String symName)
                          throws java.lang.Exception
Removes the property value from the property with the given symbolic name.

Parameters:
symName - The symbolic name of the property to change.
Throws:
java.lang.Exception

removeValuesByName

public void removeValuesByName(java.lang.String symName)
                        throws java.lang.Exception
Removes all of the property values from the property with the given symbolic name.

Parameters:
symName - The symbolic name of the property to change.
Throws:
java.lang.Exception

getPropertyValueByID

public java.lang.String getPropertyValueByID(java.lang.String id)
                                      throws java.lang.Exception
Retrieves the value of the property with the given ID.

Parameters:
id - The ID of the property whose value we want to retrieve.
Returns:
The value of the given property.
Throws:
java.lang.Exception

getPropertyValueByName

public java.lang.String getPropertyValueByName(java.lang.String symName)
                                        throws java.lang.Exception
Retrieves the value of the property with the given name.

Parameters:
symName - The symbolic name of the property whose value we want to retrieve.
Returns:
The value of the given property.
Throws:
java.lang.Exception

getPropertySymnameById

public java.lang.String getPropertySymnameById(java.lang.String id)
                                        throws java.lang.Exception
Retrieves the symname value of the object property with the given id.

Parameters:
id - The id of the property whose symname we want to retrieve.
Returns:
The symname of the given property.
Throws:
java.lang.Exception

getPropertyValueIdByName

public java.lang.String getPropertyValueIdByName(java.lang.String symName)
                                          throws java.lang.Exception
Retrieves the Id value of the object property with the given name.

Parameters:
symName - The symbolic name of the property whose value we want to retrieve.
Returns:
The value of the given property.
Throws:
java.lang.Exception

getPropertyValueByName

public java.lang.String getPropertyValueByName(java.lang.String symName,
                                               java.lang.String xPath)
                                        throws java.lang.Exception
Retrieves the value of the property with the given name using the given XPath.

Parameters:
symName - The symbolic name of the property whose value we want to retrieve.
xPath - The XPath to append to the property plus symname XPath
Returns:
The value of the given property.
Throws:
java.lang.Exception

getPropertyByName

public org.w3c.dom.Element getPropertyByName(java.lang.String symName,
                                             java.lang.String xPath)
                                      throws java.lang.Exception
Retrieves the property or sub value using the given XPath with the indicated symname

Parameters:
symName - The symname of the required property
xPath - The XPath to append to the property plus symname XPath
Returns:
The property Element
Throws:
java.lang.Exception

getPropertyByName

public org.w3c.dom.Element getPropertyByName(java.lang.String symName)
                                      throws java.lang.Exception
Retrieves the Property Element with the given symname

Parameters:
symName - The symname of the required property
Returns:
The Property Element with the given symname
Throws:
java.lang.Exception

setPropertyByName

public void setPropertyByName(java.lang.String symName,
                              java.lang.String value)
                       throws java.lang.Exception
Sets the Property or sub value with the given ID and XPath to the indicated value

Parameters:
symName - The symbolic name of the property to set
value - The new value to use
Throws:
java.lang.Exception

setPropertyByName

public void setPropertyByName(java.lang.String symName,
                              java.lang.String xPath,
                              java.lang.String value)
                       throws java.lang.Exception
Sets the Property or sub value with the given ID and XPath to the indicated value

Parameters:
symName - The symbolic name of the property to set
xPath - extra XPath filter
value - The new value to use
Throws:
java.lang.Exception

setPropertyByID

public void setPropertyByID(java.lang.String id,
                            java.lang.String xPath,
                            java.lang.String value)
                     throws java.lang.Exception
Sets the Property or sub value with the given ID and XPath to the indicated value

Parameters:
id - The ID of the property to set
xPath - The XPath string to append to the property plus ID XPath
value - The new value to use
Throws:
java.lang.Exception

getPropertyByID

public org.w3c.dom.Element getPropertyByID(java.lang.String id,
                                           java.lang.String xPath)
                                    throws java.lang.Exception
Returns the property or sub Element with the given ID and appended XPath

Parameters:
id - The ID of the required property
xPath - The XPath string to append to the XPath statement
Returns:
The property or sub Element indicated by the total XPath statement
Throws:
java.lang.Exception

getPropertyByID

public org.w3c.dom.Element getPropertyByID(java.lang.String id)
                                    throws java.lang.Exception
Returns the property with the given ID

Parameters:
id - The ID of the property to retrieve
Returns:
The property Element with the given ID
Throws:
java.lang.Exception


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.