com.filenet.wcm.toolkit.server.util.prefs
Class WcmConfiguration

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.util.prefs.WcmConfiguration
All Implemented Interfaces:
java.io.Serializable, WcmConfigurationInterface

public class WcmConfiguration
extends java.lang.Object
implements WcmConfigurationInterface, java.io.Serializable

This class providers access to site and user preferences

See Also:
Serialized Form

Field Summary
protected static java.lang.String APPLICATION_ENGINE_ADMINS
           
protected  java.lang.String appName
           
protected static java.lang.String basePath
           
protected static WcmBootstrapPrefs bootstrap
           
protected  boolean bUseLocalFile
           
protected  java.lang.String configFilePath
           
protected  WcmServerCredentials credentials
           
protected  WcmDataStore dataStore
           
protected static boolean ENABLE_DEBUG_TRACE
           
protected  java.lang.String objectStoreName
           
protected static java.lang.String PREFS_DOCUMENT_CLASS
           
static java.lang.String PREFS_DOCUMENT_CLASS_ID
           
protected static java.lang.String PREFS_FILE_NAME
           
protected static java.lang.String PREFS_FOLDER_CLASS
           
protected static java.lang.String PREFS_FOLDER_NAME
           
protected static java.lang.String PREFS_MIME_TYPE
           
protected static java.util.Map prefsFoldersExist
           
protected  com.filenet.wcm.api.Session session
           
protected  com.filenet.wcm.api.Document sitePrefsDocument
           
protected  java.lang.String sitePrefsDocumentName
           
protected static java.util.Map sitePrefsMap
           
protected  java.lang.String sitePrefsMapKey
           
protected  WcmPrefsObject userPrefs
           
protected  com.filenet.wcm.api.Document userPrefsDocument
           
protected  java.lang.String userPrefsDocumentName
           
 
Constructor Summary
WcmConfiguration(WcmDataStore ds, java.lang.String prefsObjectStoreName, java.lang.String applicationName)
           
 
Method Summary
protected  com.filenet.wcm.api.Document addNewDocument(WcmPrefsObject content, java.lang.String documentTitle, boolean site, com.filenet.wcm.api.Permissions permissions)
           
 java.lang.String addSitePrefsDocument()
          Adds new Site preferences document
 java.lang.String addUserPrefsDocument()
          Adds new User Preferences Document
 void cancelCheckoutSitePreferences()
          Cancels checkout of Site Preferences document
 void checkinSitePreferences()
          Checks in Site Preferences
 java.lang.String checkoutSitePreferences()
          Checks out Site Preferences
 java.lang.String createNewSitePrefs()
          Creates new Site Preferences Document
 java.lang.String createNewUserPrefs()
           
protected  com.filenet.wcm.api.Folder createPreferencesFolder()
           
protected static void debugTrace(java.lang.Object o)
           
static java.lang.String getBasePath()
          Deprecated. use application context to get resource files
static WcmBootstrapPrefs getBootstrapPrefs()
          Returns WcmBootstrapPrefs object
protected  com.filenet.wcm.api.Permissions getSitePreferencesPermissions()
           
 WcmPrefsObject getSitePrefsObject()
          Returns Site Preferences Object
 WcmPrefsObject getUserPrefsObject()
          Returns User Preferences Object
 void initialize(WcmDataStore ds, java.lang.String prefsObjectStoreName, java.lang.String applicationName)
          Initializes WcmConfiguration
static boolean isEProcessConfigured()
          Returns true if eProcess is enabled in bootstrap.properties
 boolean isSitePreferencesCheckedOut()
          Returns true if site preferences document is checked out
static void loadBootstrap(java.util.Locale locale, javax.servlet.ServletContext context)
          Loads bootstrap
static void loadBootstrap(java.util.Locale locale, java.lang.String filePath)
          Loads bootstrap
static void loadBootstrap(javax.servlet.ServletContext context)
          Loads bootstrap
static void loadBootstrap(java.lang.String filePath)
          Loads bootstrap
 void loadSitePreferences()
          Lodas Site Preferences
 void loadUserPreferences()
          Loads user preferences from the Object Store
static void reloadBootstrap()
          Reloads bootstrap
static void reloadBootstrap(java.util.Locale locale)
          Reloads bootstrap
 void resetSitePreferences(java.lang.String applicationName)
           
protected  com.filenet.wcm.api.TransportInputStream retrieveDocument(com.filenet.wcm.api.Document document)
           
protected  com.filenet.wcm.api.TransportInputStream retrieveDocument(java.lang.String docName)
           
protected  com.filenet.wcm.api.TransportInputStream retrieveDocumentByPath(java.lang.String path)
           
 void saveBootstrapPreferences()
           
 java.lang.String saveSitePreferences()
          Saves Site Preferences
 java.lang.String saveSitePreferences(boolean keepCheckout)
          Saves Site Preferences
 java.lang.String saveUserPreferences()
          Saves User Preferences
static void setBasePath(java.lang.String path)
          Deprecated. use application context to get resource files
protected  void setSitePrefsObject(WcmPrefsObject pSitePrefs)
           
protected  void setUserPrefsObject(WcmPrefsObject pUserPrefs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFS_DOCUMENT_CLASS_ID

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

PREFS_DOCUMENT_CLASS

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

PREFS_FOLDER_CLASS

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

PREFS_FOLDER_NAME

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

PREFS_MIME_TYPE

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

PREFS_FILE_NAME

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

APPLICATION_ENGINE_ADMINS

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

ENABLE_DEBUG_TRACE

protected static final boolean ENABLE_DEBUG_TRACE
See Also:
Constant Field Values

bootstrap

protected static WcmBootstrapPrefs bootstrap

basePath

protected static java.lang.String basePath

sitePrefsMap

protected static java.util.Map sitePrefsMap

prefsFoldersExist

protected static java.util.Map prefsFoldersExist

userPrefs

protected WcmPrefsObject userPrefs

userPrefsDocument

protected com.filenet.wcm.api.Document userPrefsDocument

sitePrefsDocument

protected com.filenet.wcm.api.Document sitePrefsDocument

credentials

protected WcmServerCredentials credentials

session

protected com.filenet.wcm.api.Session session

userPrefsDocumentName

protected java.lang.String userPrefsDocumentName

sitePrefsDocumentName

protected java.lang.String sitePrefsDocumentName

bUseLocalFile

protected boolean bUseLocalFile

appName

protected java.lang.String appName

objectStoreName

protected java.lang.String objectStoreName

sitePrefsMapKey

protected java.lang.String sitePrefsMapKey

dataStore

protected WcmDataStore dataStore

configFilePath

protected java.lang.String configFilePath
Constructor Detail

WcmConfiguration

public WcmConfiguration(WcmDataStore ds,
                        java.lang.String prefsObjectStoreName,
                        java.lang.String applicationName)
                 throws java.lang.Exception
Method Detail

initialize

public void initialize(WcmDataStore ds,
                       java.lang.String prefsObjectStoreName,
                       java.lang.String applicationName)
                throws java.lang.Exception
Initializes WcmConfiguration

Parameters:
ds -
prefsObjectStoreName -
applicationName -
Throws:
java.lang.Exception

resetSitePreferences

public void resetSitePreferences(java.lang.String applicationName)

retrieveDocument

protected com.filenet.wcm.api.TransportInputStream retrieveDocument(java.lang.String docName)

retrieveDocumentByPath

protected com.filenet.wcm.api.TransportInputStream retrieveDocumentByPath(java.lang.String path)

retrieveDocument

protected com.filenet.wcm.api.TransportInputStream retrieveDocument(com.filenet.wcm.api.Document document)

saveBootstrapPreferences

public void saveBootstrapPreferences()
                              throws java.lang.Exception
Throws:
java.lang.Exception

addUserPrefsDocument

public java.lang.String addUserPrefsDocument()
                                      throws java.lang.Exception
Adds new User Preferences Document

Returns:
document id
Throws:
java.lang.Exception

createNewUserPrefs

public java.lang.String createNewUserPrefs()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

loadUserPreferences

public void loadUserPreferences()
                         throws java.lang.Exception
Description copied from interface: WcmConfigurationInterface
Loads user preferences from the Object Store

Specified by:
loadUserPreferences in interface WcmConfigurationInterface
Throws:
java.lang.Exception

reloadBootstrap

public static void reloadBootstrap(java.util.Locale locale)
                            throws java.io.IOException
Reloads bootstrap

Parameters:
locale - the client locale
Throws:
java.io.IOException

reloadBootstrap

public static void reloadBootstrap()
                            throws java.io.IOException
Reloads bootstrap

Throws:
java.io.IOException

loadBootstrap

public static void loadBootstrap(java.util.Locale locale,
                                 java.lang.String filePath)
                          throws java.io.IOException
Loads bootstrap

Parameters:
locale -
filePath -
Throws:
java.io.IOException

loadBootstrap

public static void loadBootstrap(java.lang.String filePath)
                          throws java.io.IOException
Loads bootstrap

Parameters:
filePath -
Throws:
java.io.IOException

loadBootstrap

public static void loadBootstrap(java.util.Locale locale,
                                 javax.servlet.ServletContext context)
                          throws java.io.IOException
Loads bootstrap

Parameters:
context -
Throws:
java.io.IOException

loadBootstrap

public static void loadBootstrap(javax.servlet.ServletContext context)
                          throws java.io.IOException
Loads bootstrap

Parameters:
context -
Throws:
java.io.IOException

isEProcessConfigured

public static boolean isEProcessConfigured()
Returns true if eProcess is enabled in bootstrap.properties

Returns:
boolean

loadSitePreferences

public void loadSitePreferences()
                         throws java.lang.Exception
Lodas Site Preferences

Specified by:
loadSitePreferences in interface WcmConfigurationInterface
Throws:
java.lang.Exception

getSitePreferencesPermissions

protected com.filenet.wcm.api.Permissions getSitePreferencesPermissions()
                                                                 throws java.lang.Exception
Throws:
java.lang.Exception

addSitePrefsDocument

public java.lang.String addSitePrefsDocument()
                                      throws java.lang.Exception
Adds new Site preferences document

Returns:
document id
Throws:
java.lang.Exception

createNewSitePrefs

public java.lang.String createNewSitePrefs()
                                    throws java.lang.Exception
Creates new Site Preferences Document

Returns:
document id
Throws:
java.lang.Exception

saveSitePreferences

public java.lang.String saveSitePreferences()
                                     throws java.lang.Exception
Saves Site Preferences

Specified by:
saveSitePreferences in interface WcmConfigurationInterface
Returns:
document id
Throws:
java.lang.Exception

saveSitePreferences

public java.lang.String saveSitePreferences(boolean keepCheckout)
                                     throws java.lang.Exception
Saves Site Preferences

Parameters:
keepCheckout - boolean true to keep the site preferences checked out.
Returns:
document id
Throws:
java.lang.Exception

saveUserPreferences

public java.lang.String saveUserPreferences()
                                     throws java.lang.Exception
Saves User Preferences

Specified by:
saveUserPreferences in interface WcmConfigurationInterface
Returns:
document id
Throws:
java.lang.Exception

cancelCheckoutSitePreferences

public void cancelCheckoutSitePreferences()
Cancels checkout of Site Preferences document


isSitePreferencesCheckedOut

public boolean isSitePreferencesCheckedOut()
Returns true if site preferences document is checked out

Returns:
true or false

checkoutSitePreferences

public java.lang.String checkoutSitePreferences()
                                         throws java.lang.Exception
Checks out Site Preferences

Returns:
document id
Throws:
java.lang.Exception

checkinSitePreferences

public void checkinSitePreferences()
                            throws java.lang.Exception
Checks in Site Preferences

Throws:
java.lang.Exception

addNewDocument

protected com.filenet.wcm.api.Document addNewDocument(WcmPrefsObject content,
                                                      java.lang.String documentTitle,
                                                      boolean site,
                                                      com.filenet.wcm.api.Permissions permissions)
                                               throws java.lang.Exception
Throws:
java.lang.Exception

createPreferencesFolder

protected com.filenet.wcm.api.Folder createPreferencesFolder()

debugTrace

protected static void debugTrace(java.lang.Object o)

setBasePath

public static void setBasePath(java.lang.String path)
Deprecated. use application context to get resource files


getBasePath

public static java.lang.String getBasePath()
Deprecated. use application context to get resource files


getBootstrapPrefs

public static WcmBootstrapPrefs getBootstrapPrefs()
Returns WcmBootstrapPrefs object

Returns:
WcmBootstrapPrefs

setSitePrefsObject

protected void setSitePrefsObject(WcmPrefsObject pSitePrefs)

getSitePrefsObject

public WcmPrefsObject getSitePrefsObject()
Returns Site Preferences Object

Specified by:
getSitePrefsObject in interface WcmConfigurationInterface
Returns:
WcmPrefsObject

setUserPrefsObject

protected void setUserPrefsObject(WcmPrefsObject pUserPrefs)

getUserPrefsObject

public WcmPrefsObject getUserPrefsObject()
Returns User Preferences Object

Specified by:
getUserPrefsObject in interface WcmConfigurationInterface
Returns:
WcmPrefsObject


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