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

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

public class SystemPropertiesFilterUtil
extends java.lang.Object


Constructor Summary
SystemPropertiesFilterUtil()
           
 
Method Summary
static org.w3c.dom.Document copyFromDefault(java.lang.String objectStoreName, java.lang.String objectType, org.w3c.dom.Document xml)
           
static void filterPropertiesBySymbolicName(org.w3c.dom.Document domProps, java.lang.String[] organizedPropDescs, java.util.Locale locale)
          Helper method to reorder the property description list based on the passed in order.
static void filterPropertyDescritionsBySymbolicName(org.w3c.dom.Document domPropDescs, java.lang.String[] organizedPropDescs, java.lang.String[] alwaysShowPropDescs, java.util.Locale locale)
          Helper method to reorder the property description list based on the passed in order.
static org.w3c.dom.Document getCustomLabels(org.w3c.dom.Document propDescsXML, java.util.Locale locale)
           
static java.lang.String[] getPropDefaultAndCustomLabelsList(org.w3c.dom.Document propDescs, java.lang.String[] propSymnames, java.util.Locale locale)
          Retrieve filtered property labels as symbolic names list in order
static java.lang.String[] getPropDescsList(org.w3c.dom.Document filteredProps, java.lang.String objectStoreName, java.lang.String objectType)
          Retrieve property descriptions as symbolic names list in order
static java.lang.String[] getPropDescsList(java.lang.String objectStoreName, java.lang.String objectType)
          Retrieve property descriptions as symbolic names list in order
static org.w3c.dom.Document getSystemPropertiesDocument()
           
static boolean isObjectExist(java.lang.String objectStoreName, java.lang.String objectType)
           
static boolean isObjectExist(java.lang.String objectStoreName, java.lang.String objectType, org.w3c.dom.Document filteredProps)
           
static void load(java.io.InputStream in)
           
static void load(java.lang.String path)
          Read the properties file from local storage indicated by mode parameter
static void main(java.lang.String[] args)
           
static org.w3c.dom.Document removeObject(java.lang.String objectStoreName, java.lang.String objectType, org.w3c.dom.Document xml)
           
static org.w3c.dom.Document replaceObject(java.lang.String objectStoreName, java.lang.String objectType, java.lang.String[] properties, org.w3c.dom.Document xml)
           
static void save(java.io.OutputStream os)
          Save the Template to local storage indicated by mode parameter
static void setSystemPropertiesDocument(org.w3c.dom.Document doc, java.lang.String objectStore, boolean rmEnabled)
           
static org.w3c.dom.Document updateProps(java.lang.String objectStoreName, java.lang.String type, org.w3c.dom.Document filteredProps, org.w3c.dom.Document propDescsXML, javax.servlet.http.HttpServletRequest request)
          Updates the Document with values returned in the request object.
protected static void writeConfigurableLabelsXML(java.lang.String fileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemPropertiesFilterUtil

public SystemPropertiesFilterUtil()
Method Detail

load

public static void load(java.lang.String path)
                 throws java.lang.Exception
Read the properties file from local storage indicated by mode parameter

Parameters:
path - - local storage path file name (\WEB-INF\SystemPropertiesView.xml)
Throws:
java.lang.Exception

load

public static void load(java.io.InputStream in)
                 throws java.lang.Exception
Throws:
java.lang.Exception

save

public static void save(java.io.OutputStream os)
                 throws java.lang.Exception
Save the Template to local storage indicated by mode parameter

Parameters:
os - output steam ( \WEB_INF\SystemPropertiesView.xml)
Throws:
java.lang.Exception

getSystemPropertiesDocument

public static org.w3c.dom.Document getSystemPropertiesDocument()
                                                        throws java.lang.Exception
Throws:
java.lang.Exception

setSystemPropertiesDocument

public static void setSystemPropertiesDocument(org.w3c.dom.Document doc,
                                               java.lang.String objectStore,
                                               boolean rmEnabled)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

getPropDescsList

public static java.lang.String[] getPropDescsList(java.lang.String objectStoreName,
                                                  java.lang.String objectType)
                                           throws java.lang.Exception
Retrieve property descriptions as symbolic names list in order

Parameters:
objectStoreName - - Object store name
objectType - - Object type
Returns:
A list of symbolic property names
Throws:
java.lang.Exception - if there were errors

getPropDescsList

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

Parameters:
objectStoreName - - Object store name
objectType - - Object type
Returns:
A list of symbolic property names
Throws:
java.lang.Exception - if there were errors

getPropDefaultAndCustomLabelsList

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

Parameters:
propSymnames - an array of symnames to get the custom names
Returns:
A list of custom property names
Throws:
java.lang.Exception - if there were errors

filterPropertyDescritionsBySymbolicName

public static void filterPropertyDescritionsBySymbolicName(org.w3c.dom.Document domPropDescs,
                                                           java.lang.String[] organizedPropDescs,
                                                           java.lang.String[] alwaysShowPropDescs,
                                                           java.util.Locale locale)
                                                    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
alwaysShowPropDescs - items in this array will always be shown even when they are marked as hidden.
Throws:
java.lang.Exception - if there were errors.

filterPropertiesBySymbolicName

public static void filterPropertiesBySymbolicName(org.w3c.dom.Document domProps,
                                                  java.lang.String[] organizedPropDescs,
                                                  java.util.Locale locale)
                                           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.

updateProps

public static org.w3c.dom.Document updateProps(java.lang.String objectStoreName,
                                               java.lang.String type,
                                               org.w3c.dom.Document filteredProps,
                                               org.w3c.dom.Document propDescsXML,
                                               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"
filteredProps - The filtered system properties XML Document.
request - The HttpServletRequest object.
Returns:
A boolean indicating if the filtered properties were changed.
Throws:
java.lang.Exception

isObjectExist

public static boolean isObjectExist(java.lang.String objectStoreName,
                                    java.lang.String objectType)
                             throws java.lang.Exception
Throws:
java.lang.Exception

isObjectExist

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

copyFromDefault

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

removeObject

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

replaceObject

public static org.w3c.dom.Document replaceObject(java.lang.String objectStoreName,
                                                 java.lang.String objectType,
                                                 java.lang.String[] properties,
                                                 org.w3c.dom.Document xml)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

getCustomLabels

public static org.w3c.dom.Document getCustomLabels(org.w3c.dom.Document propDescsXML,
                                                   java.util.Locale locale)
                                            throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

writeConfigurableLabelsXML

protected static void writeConfigurableLabelsXML(java.lang.String fileName)
                                          throws java.io.IOException
Throws:
java.io.IOException


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