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

java.lang.Object
  extended bycom.filenet.wcm.apps.server.util.PropertiesFilterUtil

public class PropertiesFilterUtil
extends java.lang.Object


Field Summary
static java.lang.String DEFAULT_OBJECT_STORE_NAME
           
static java.lang.String MODE_RECORDS_MANAGEMENT
           
static java.lang.String MODE_WORKPLACE
           
protected static java.lang.String XPath_ALL_PROPDESC
           
protected static java.lang.String XPath_PROPDESCS
           
protected static java.lang.String XPath_PROPERTIES
           
 
Constructor Summary
PropertiesFilterUtil()
           
 
Method Summary
 void copyFromDefault(java.lang.String defaultObjectStore, java.lang.String objectStoreName, java.lang.String objectType, org.w3c.dom.Document xml)
           
 org.w3c.dom.Document createDefaultXML()
          Create default filter properties
 void filterPropertiesBySymbolicName(org.w3c.dom.Document domProps, java.lang.String[] organizedPropDescs, java.lang.String[] propertyLabels)
          Helper method to reorder the property description list based on the passed in order.
 void filterPropertyDescritionsBySymbolicName(org.w3c.dom.Document domPropDescs, java.lang.String[] organizedPropDescs, java.lang.String[] propertyLabels)
          Helper method to reorder the property description list based on the passed in order.
 java.lang.String getClassId(org.w3c.dom.Document classXML, int type)
           
 java.lang.String getLabel(java.lang.String objectStoreName, java.lang.String type, java.lang.String symName, java.util.Locale locale, org.w3c.dom.Document filteredProperties, org.w3c.dom.Document propDescs)
           
static java.lang.String[] getPropDescsList(org.w3c.dom.Document filteredProperties, java.lang.String objectStoreName, java.lang.String objectType, java.util.Locale locale)
          Retrieve property descriptions as symbolic names list in order
static java.lang.String[] getPropLabelsList(org.w3c.dom.Document filteredProperties, org.w3c.dom.Document propDescs, java.lang.String objectStoreName, java.lang.String objectType, java.util.Locale locale)
          Retrieve filtered property labels as symbolic names list in order
 boolean isObjectExist(java.lang.String objectStoreName, java.lang.String objectType, org.w3c.dom.Document xml)
           
 boolean isObjectExist(java.lang.String mode, java.lang.String objectStoreName, java.lang.String objectType, javax.servlet.ServletContext context, java.util.Locale locale)
           
 boolean isObjectStoreExist(java.lang.String objectStoreName, org.w3c.dom.Document xml)
           
 boolean isObjectStoreExist(java.lang.String mode, java.lang.String objectStoreName, javax.servlet.ServletContext context, java.util.Locale locale)
           
 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.
 org.w3c.dom.Document readFromFile(java.lang.String mode, java.util.Locale locale, javax.servlet.ServletContext context)
          Read the properties file from local storage indicated by mode parameter
 void removeObject(java.lang.String mode, java.lang.String objectStoreName, java.lang.String objectType, javax.servlet.ServletContext context, java.util.Locale locale)
           
 boolean updateProps(java.lang.String objectStoreName, java.lang.String type, java.util.Locale locale, org.w3c.dom.Document filteredProps, org.w3c.dom.Document propDescsDoc, javax.servlet.http.HttpServletRequest request)
          Updates the Document with values returned in the request object.
 void writeToFile(java.lang.String mode, org.w3c.dom.Document xml, java.util.Locale locale, javax.servlet.ServletContext context)
          Save the Template to local storage indicated by mode parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_OBJECT_STORE_NAME

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

MODE_RECORDS_MANAGEMENT

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

MODE_WORKPLACE

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

XPath_PROPERTIES

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

XPath_PROPDESCS

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

XPath_ALL_PROPDESC

protected static final java.lang.String XPath_ALL_PROPDESC
See Also:
Constant Field Values
Constructor Detail

PropertiesFilterUtil

public PropertiesFilterUtil()
Method Detail

getPropDescsList

public static java.lang.String[] getPropDescsList(org.w3c.dom.Document filteredProperties,
                                                  java.lang.String objectStoreName,
                                                  java.lang.String objectType,
                                                  java.util.Locale locale)
                                           throws java.lang.Exception
Retrieve property descriptions as symbolic names list in order

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

getPropLabelsList

public static java.lang.String[] getPropLabelsList(org.w3c.dom.Document filteredProperties,
                                                   org.w3c.dom.Document propDescs,
                                                   java.lang.String objectStoreName,
                                                   java.lang.String objectType,
                                                   java.util.Locale locale)
                                            throws java.lang.Exception
Retrieve filtered property labels as symbolic names list in order

Parameters:
filteredProperties - 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.

filterPropertyDescritionsBySymbolicName

public void filterPropertyDescritionsBySymbolicName(org.w3c.dom.Document domPropDescs,
                                                    java.lang.String[] organizedPropDescs,
                                                    java.lang.String[] propertyLabels)
                                             throws java.lang.Exception
Helper method to reorder 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.

filterPropertiesBySymbolicName

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

Parameters:
domProps - 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.

getLabel

public java.lang.String getLabel(java.lang.String objectStoreName,
                                 java.lang.String type,
                                 java.lang.String symName,
                                 java.util.Locale locale,
                                 org.w3c.dom.Document filteredProperties,
                                 org.w3c.dom.Document propDescs)
                          throws java.lang.Exception
Throws:
java.lang.Exception

updateProps

public boolean updateProps(java.lang.String objectStoreName,
                           java.lang.String type,
                           java.util.Locale locale,
                           org.w3c.dom.Document filteredProps,
                           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:
objectStoreName - Object store name
type - Object type; "document", "folder", or "custom"
locale - Locale
filteredProps - The filtered system properties XML Document.
propDescsDoc - The property descriptions XML Document.
request - The HttpServletRequest object.
Returns:
A boolean indicating if the filtered properties were changed.
Throws:
java.lang.Exception

createDefaultXML

public org.w3c.dom.Document createDefaultXML()
                                      throws java.lang.Exception
Create default filter properties

Returns:
A boolean indicating if the filtered properties were changed.
Throws:
java.lang.Exception

isObjectStoreExist

public boolean isObjectStoreExist(java.lang.String objectStoreName,
                                  org.w3c.dom.Document xml)
                           throws java.lang.Exception
Throws:
java.lang.Exception

isObjectExist

public boolean isObjectExist(java.lang.String objectStoreName,
                             java.lang.String objectType,
                             org.w3c.dom.Document xml)
                      throws java.lang.Exception
Throws:
java.lang.Exception

isObjectStoreExist

public boolean isObjectStoreExist(java.lang.String mode,
                                  java.lang.String objectStoreName,
                                  javax.servlet.ServletContext context,
                                  java.util.Locale locale)
                           throws java.lang.Exception
Throws:
java.lang.Exception

isObjectExist

public boolean isObjectExist(java.lang.String mode,
                             java.lang.String objectStoreName,
                             java.lang.String objectType,
                             javax.servlet.ServletContext context,
                             java.util.Locale locale)
                      throws java.lang.Exception
Throws:
java.lang.Exception

readFromFile

public org.w3c.dom.Document readFromFile(java.lang.String mode,
                                         java.util.Locale locale,
                                         javax.servlet.ServletContext context)
                                  throws java.lang.Exception
Read the properties file from local storage indicated by mode parameter

Parameters:
mode - mode to indicate local storage path and file name ("WEB-INF/filteredproperteis.xml")
Throws:
java.lang.Exception

writeToFile

public void writeToFile(java.lang.String mode,
                        org.w3c.dom.Document xml,
                        java.util.Locale locale,
                        javax.servlet.ServletContext context)
                 throws java.lang.Exception
Save the Template to local storage indicated by mode parameter

Parameters:
mode - mode to indicate local storage path and file name ("WEB-INF/filteredproperteis.xml")
Throws:
java.lang.Exception

getClassId

public java.lang.String getClassId(org.w3c.dom.Document classXML,
                                   int type)
                            throws java.lang.Exception
Throws:
java.lang.Exception

copyFromDefault

public void copyFromDefault(java.lang.String defaultObjectStore,
                            java.lang.String objectStoreName,
                            java.lang.String objectType,
                            org.w3c.dom.Document xml)
                     throws java.lang.Exception
Throws:
java.lang.Exception

removeObject

public void removeObject(java.lang.String mode,
                         java.lang.String objectStoreName,
                         java.lang.String objectType,
                         javax.servlet.ServletContext context,
                         java.util.Locale locale)
                  throws java.lang.Exception
Throws:
java.lang.Exception


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