com.filenet.wcm.apps.server.util
Class WcmDesignerPropertiesUtil

java.lang.Object
  extended bycom.filenet.wcm.apps.server.util.WcmPropertiesUtil
      extended bycom.filenet.wcm.apps.server.util.WcmDesignerPropertiesUtil
Direct Known Subclasses:
WebContentPropertiesUtil

public class WcmDesignerPropertiesUtil
extends WcmPropertiesUtil


Field Summary
protected static java.util.HashMap filterPropertiesMap
           
static java.lang.String XPath_ALL_PROPDESC
           
static java.lang.String XPath_PROPDESCS
           
static java.lang.String XPath_PROPERTIES
           
 
Constructor Summary
WcmDesignerPropertiesUtil()
           
 
Method Summary
static void addCompoundDocumentStatePropDesc(org.w3c.dom.Document etPropDescs, org.w3c.dom.Document propertiesDoc, org.w3c.dom.Document propDescsDoc)
           
static org.w3c.dom.Document createPropDescs(org.w3c.dom.Document propertiesDoc, org.w3c.dom.Document propDescsDoc)
          Updates the Document with values returned in the request object.
static java.lang.String[] getPropDescsList(org.w3c.dom.Document propDescs)
          Retrieve property descriptions as symbolic names list in order
static java.lang.String[] getPropertiesList(org.w3c.dom.Document outputDoc, org.w3c.dom.Document propDescs)
          Retrieve properties list as display names in order of property descriptions
static boolean isValidPropDesc(org.w3c.dom.Node propDescNode, boolean ignoreIsHidden, boolean ignoreIsReadOnly)
          Returns true if the property description is being exposed by the UI for updating.
 void organizePropertyDescritionsByDisplayName(org.w3c.dom.Document domPropDescs, java.lang.String[] organizedPropDescs)
          Helper method to reordere the property description list based on the passed in order.
 void organizePropertyDescritionsBySymbolicName(org.w3c.dom.Document domPropDescs, java.lang.String[] organizedPropDescs)
          Helper method to reordere the property description list based on the passed in order.
static boolean setPropDescElementValue(org.w3c.dom.Element propDescCE, org.w3c.dom.Element propDescET, java.lang.String element, boolean override)
          Helper method for setting the value of a property description element.
static boolean setPropDescValue(org.w3c.dom.Element property, org.w3c.dom.Element propDesc, java.lang.String tag)
          Helper method for setting the value of a property description element.
static boolean setPropDescValue(org.w3c.dom.Element property, org.w3c.dom.Element propDesc, java.lang.String tag, boolean override)
          Helper method for setting the value of a property description element.
 void updateEntryTemplatePropertiesXMLs(com.filenet.wcm.toolkit.server.dp.WcmAuthoringDataProvider adp, WcmAuthoringState authorState, com.filenet.wcm.toolkit.server.util.WcmEntryTemplate entryTemplate, int mode)
           
 void updateProp(org.w3c.dom.Document outputDoc, org.w3c.dom.Document propDescsDoc, javax.servlet.http.HttpServletRequest request, java.lang.String symName)
          Updates the document property with value returned in the request object.
 boolean updatePropDescs(org.w3c.dom.Document propDescsCE, org.w3c.dom.Document propDescsET, boolean includeAccessAttributes)
          Update property description xml with the meta data information specified in the entry template property description information.
 boolean updatePropDescs(org.w3c.dom.Document propDescsCE, org.w3c.dom.Document propDescsET, boolean includeAccessAttributes, boolean setStateNode)
          Update property description xml with the meta data information specified in the entry template property description information.
 void updateProperty(org.w3c.dom.Document outputDoc, java.lang.String id, java.lang.String dataType, java.lang.String symName, java.lang.String tag, java.lang.String newValue)
          Can used this method to set a user specified behavior into the property description element.
 boolean updateProps(org.w3c.dom.Document outputDoc, org.w3c.dom.Document propDescsDoc, javax.servlet.http.HttpServletRequest request)
          Updates the Document with values returned in the request object.
 java.util.ArrayList validate(org.w3c.dom.Document outputDoc, org.w3c.dom.Document propDescsDoc, boolean hiddenPage, java.util.Locale locale, com.filenet.wcm.toolkit.server.base.WcmController controller, java.lang.String moduleName)
          Checks the output XML Document to validate each entered value and to see if all of the hidden, readonly property has been filled.
 
Methods inherited from class com.filenet.wcm.apps.server.util.WcmPropertiesUtil
addAllPropValues, addDefaultValues, addPropValues, getCompoundDocumentState, getCustomObjectName, getDocumentName, getFolderName, getPropertiesUtil, getTopClassId, initializeClientProps, isEndNode, moveDown, moveDown, moveUp, moveUp, openExceptionPage, openExceptionPage, openExceptionPage, testFolderChars, updateComponentRelationshipClass, updateCustomObjectClass, updateDocClass, updateFolderClass, updateLinkClass, updateProp, updatePropChoice, updateProps, updateProps, updatePropValues, updateSecurityPolicyClass, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XPath_PROPERTIES

public static final java.lang.String XPath_PROPERTIES
See Also:
Constant Field Values

XPath_PROPDESCS

public static final java.lang.String XPath_PROPDESCS
See Also:
Constant Field Values

XPath_ALL_PROPDESC

public static final java.lang.String XPath_ALL_PROPDESC
See Also:
Constant Field Values

filterPropertiesMap

protected static java.util.HashMap filterPropertiesMap
Constructor Detail

WcmDesignerPropertiesUtil

public WcmDesignerPropertiesUtil()
Method Detail

updateProps

public boolean updateProps(org.w3c.dom.Document outputDoc,
                           org.w3c.dom.Document propDescsDoc,
                           javax.servlet.http.HttpServletRequest request)
                    throws java.lang.Exception
Updates the Document with values returned in the request object.

Parameters:
outputDoc - The output XML Document.
propDescsDoc - The property descriptions XML Document.
request - The HttpServletRequest object.
Returns:
A boolean indicating if the properties were changed.
Throws:
java.lang.Exception

isValidPropDesc

public static boolean isValidPropDesc(org.w3c.dom.Node propDescNode,
                                      boolean ignoreIsHidden,
                                      boolean ignoreIsReadOnly)
                               throws java.lang.Exception
Returns true if the property description is being exposed by the UI for updating.

Parameters:
propDescNode - The property description node.
ignoreIsHidden - true to ignore the ignoreIsHidden flag.
ignoreIsReadOnly - to ignore the isReadOnly flag.
Returns:
A boolean indicating if the property description is valid
Throws:
java.lang.Exception

updateProp

public void updateProp(org.w3c.dom.Document outputDoc,
                       org.w3c.dom.Document propDescsDoc,
                       javax.servlet.http.HttpServletRequest request,
                       java.lang.String symName)
                throws java.lang.Exception
Updates the document property with value returned in the request object.

Parameters:
outputDoc - The output XML Document.
propDescsDoc - The property descriptions XML Document.
request - The HttpServletRequest object.
Throws:
java.lang.Exception

updateEntryTemplatePropertiesXMLs

public void updateEntryTemplatePropertiesXMLs(com.filenet.wcm.toolkit.server.dp.WcmAuthoringDataProvider adp,
                                              WcmAuthoringState authorState,
                                              com.filenet.wcm.toolkit.server.util.WcmEntryTemplate entryTemplate,
                                              int mode)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

updatePropDescs

public boolean updatePropDescs(org.w3c.dom.Document propDescsCE,
                               org.w3c.dom.Document propDescsET,
                               boolean includeAccessAttributes,
                               boolean setStateNode)
                        throws java.lang.Exception
Update property description xml with the meta data information specified in the entry template property description information.

Parameters:
propDescsCE - The property descriptions as xml from the content engine.
propDescsET - The property descriptions as xml from the entry template.
includeAccessAttributes - if true then isReadonly, isHidden, and isValReq will copy to propDescCE from propDecET
setStateNode - if true then add a state node to the prop descs XML if needed.
Returns:
A boolean indicating if the property descriptions were changed
Throws:
java.lang.Exception - if there were errors updating the xml

updatePropDescs

public boolean updatePropDescs(org.w3c.dom.Document propDescsCE,
                               org.w3c.dom.Document propDescsET,
                               boolean includeAccessAttributes)
                        throws java.lang.Exception
Update property description xml with the meta data information specified in the entry template property description information.

Parameters:
propDescsCE - The property descriptions as xml from the content engine.
propDescsET - The property descriptions as xml from the entry template.
includeAccessAttributes - if true then isReadonly, isHidden, and isValReq will copy to propDescCE from propDecET
Returns:
A boolean indicating if the property descriptions were changed
Throws:
java.lang.Exception - if there were errors updating the xml

setPropDescElementValue

public static boolean setPropDescElementValue(org.w3c.dom.Element propDescCE,
                                              org.w3c.dom.Element propDescET,
                                              java.lang.String element,
                                              boolean override)
Helper method for setting the value of a property description element.

Parameters:
propDescCE - Element holding property description from content engine
propDescET - Element holding property description from entry template
element - String holding xml element tag to look for.
override - boolean flag used to determine whether to set the element value
Returns:
boolean.

addCompoundDocumentStatePropDesc

public static void addCompoundDocumentStatePropDesc(org.w3c.dom.Document etPropDescs,
                                                    org.w3c.dom.Document propertiesDoc,
                                                    org.w3c.dom.Document propDescsDoc)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

createPropDescs

public static org.w3c.dom.Document createPropDescs(org.w3c.dom.Document propertiesDoc,
                                                   org.w3c.dom.Document propDescsDoc)
                                            throws java.lang.Exception
Updates the Document with values returned in the request object.

Parameters:
propertiesDoc - The properties XML Document.
propDescsDoc - The property descriptions XML Document.
Returns:
A boolean indicating if the properties were changed.
Throws:
java.lang.Exception

setPropDescValue

public static boolean setPropDescValue(org.w3c.dom.Element property,
                                       org.w3c.dom.Element propDesc,
                                       java.lang.String tag)
Helper method for setting the value of a property description element.

Parameters:
property -
propDesc -
tag -
Returns:
boolean.

setPropDescValue

public static boolean setPropDescValue(org.w3c.dom.Element property,
                                       org.w3c.dom.Element propDesc,
                                       java.lang.String tag,
                                       boolean override)
Helper method for setting the value of a property description element.

Parameters:
property -
propDesc -
tag -
Returns:
boolean.

updateProperty

public void updateProperty(org.w3c.dom.Document outputDoc,
                           java.lang.String id,
                           java.lang.String dataType,
                           java.lang.String symName,
                           java.lang.String tag,
                           java.lang.String newValue)
                    throws java.lang.Exception
Can used this method to set a user specified behavior into the property description element.

Parameters:
outputDoc - Output xml.
id - Property Id
dataType - Property Data Type
symName - Property Symbolic Name
tag - xml tag to update
newValue - New Property value
Throws:
java.lang.Exception

validate

public java.util.ArrayList validate(org.w3c.dom.Document outputDoc,
                                    org.w3c.dom.Document propDescsDoc,
                                    boolean hiddenPage,
                                    java.util.Locale locale,
                                    com.filenet.wcm.toolkit.server.base.WcmController controller,
                                    java.lang.String moduleName)
                             throws java.lang.Exception
Checks the output XML Document to validate each entered value and to see if all of the hidden, readonly property has been filled.

Parameters:
outputDoc - The output XML document.
propDescsDoc - The property descriptions XML document.
hiddenPage - property page is hidden therefore needs to report all field that is required but no value has been entered.
locale - Client locale
Returns:
exception list if its size is zero means no Exception is thrown.
Throws:
com.filenet.wcm.toolkit.util.WcmException - Thrown when a required property is not set.
java.lang.Exception

getPropertiesList

public static java.lang.String[] getPropertiesList(org.w3c.dom.Document outputDoc,
                                                   org.w3c.dom.Document propDescs)
                                            throws java.lang.Exception
Retrieve properties list as display names in order of property descriptions

Parameters:
outputDoc - Document object holding list of property objects.
propDescs - Document object holding list of property descriptions
Returns:
A list of property display names
Throws:
java.lang.Exception - if there were errors

organizePropertyDescritionsByDisplayName

public void organizePropertyDescritionsByDisplayName(org.w3c.dom.Document domPropDescs,
                                                     java.lang.String[] organizedPropDescs)
                                              throws java.lang.Exception
Helper method to reordere the property description list based on the passed in order.

Parameters:
domPropDescs - The property descriptions as XML to reorder.
organizedPropDescs - the list of symbolic property names in the correct order
Throws:
java.lang.Exception - if there were errors.

getPropDescsList

public static java.lang.String[] getPropDescsList(org.w3c.dom.Document propDescs)
                                           throws java.lang.Exception
Retrieve property descriptions as symbolic names list in order

Parameters:
propDescs - Document object holding list of property descriptions
Returns:
A list of symbolic property names
Throws:
java.lang.Exception - if there were errors

organizePropertyDescritionsBySymbolicName

public void organizePropertyDescritionsBySymbolicName(org.w3c.dom.Document domPropDescs,
                                                      java.lang.String[] organizedPropDescs)
                                               throws java.lang.Exception
Helper method to reordere the property description list based on the passed in order.

Parameters:
domPropDescs - The property descriptions as XML to reorder.
organizedPropDescs - the list of symbolic property names in the correct order
Throws:
java.lang.Exception - if there were errors.


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