com.wewebu.ow.server.ecm
Interface OwRepositoryContext

All Superinterfaces:
OwBaseInitializer
All Known Subinterfaces:
OwHistoryManagerContext, OwNetworkContext
All Known Implementing Classes:
OwMainAppContext

public interface OwRepositoryContext
extends OwBaseInitializer

Interface for the ECM Repository context.
The context keeps basic configuration, localization and environment information and is independent to the web context.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Nested Class Summary
static class OwRepositoryContext.OwConfigChangeEvent
           Delegates OwConfigChangeEventListener notifications to the subscribed listeners.
static interface OwRepositoryContext.OwConfigChangeEventListener
           Interface of config change event listeners that get notifications about changes in configuration.
 
Method Summary
 void addConfigChangeEventListener(OwRepositoryContext.OwConfigChangeEventListener listener_p)
          add a config change event listener to be notified about config changes
 String createTempDir(String strPrefix_p)
          creates a unique temp directory
 void deleteTempDir(String strDir_p)
          deletes a temp dir and all files within it
 String getBasePath()
          get the base path to the application
 String getClientID()
          get a ID / name for the calling client browser
 String getClientWildCard(int wildcardtype_p)
          get a wild card to be used in the client for the given wild card type
 String getConfigurationName()
          get a name for the configuration to use can be used to distinguish different applications
 URL getConfigURL(String strName_p)
          get the URL to the configuration file
 String getInitParameter(String strParamName_p)
          get a parameter from the config file
 org.springframework.jdbc.core.JdbcTemplate getJDBCTemplate()
          get a spring JDBC template for the default DataSource
 Locale getLocale()
          get the current locale, which can be used as a prefix/postfix to distinguish localization resources
 OwMandator getMandator()
          get the mandator interface of the current logged in user
 String getMandatorID()
          get a ID / name for the calling mandator
 OwMandatorManager getMandatorManager()
          retrieve the MandatorManager reference
 InputStream getXMLConfigDoc(String strName_p)
          loads a XML Document either from local file, external file or from a JNDI context
 boolean hasLabel(String strName_p)
          check if a display label is defined for the given symbol name
 String localize(String strKey_p, String strText_p)
          localizes a string
 String localize1(String strKey_p, String strText_p, String strAttribute1_p)
          localizes a string with additional parameter that is replaced with %1
 String localize2(String strKey_p, String strText_p, String strAttribute1_p, String strAttribute2_p)
          localizes a string with additional parameter that is replaced with %1
 String localize3(String strKey_p, String strText_p, String strAttribute1_p, String strAttribute2_p, String strAttribute3_p)
          localizes a string with additional parameter that is replaced with %1
 String localizeLabel(String strName_p)
          optionally translate a name into a readable label, used for property class names in ECM adaptors which do not support separate displaynames
 
Methods inherited from interface com.wewebu.ow.server.conf.OwBaseInitializer
getApplicationAttribute, setApplicationAttribute
 

Method Detail

addConfigChangeEventListener

void addConfigChangeEventListener(OwRepositoryContext.OwConfigChangeEventListener listener_p)
add a config change event listener to be notified about config changes

Parameters:
listener_p -

getJDBCTemplate

org.springframework.jdbc.core.JdbcTemplate getJDBCTemplate()
get a spring JDBC template for the default DataSource

Returns:
the Spring JdbcTemplate

getLocale

Locale getLocale()
get the current locale, which can be used as a prefix/postfix to distinguish localization resources

Returns:
Locale

localizeLabel

String localizeLabel(String strName_p)
optionally translate a name into a readable label, used for property class names in ECM adaptors which do not support separate displaynames

Parameters:
strName_p - name e.g. attribute name to look for
Returns:
translated Display name if found in label file or the given attribute name if nothing could be translated.

hasLabel

boolean hasLabel(String strName_p)
check if a display label is defined for the given symbol name

Parameters:
strName_p - name e.g. attribute name to look for
Returns:
true = displayname is defined for symbol

localize

String localize(String strKey_p,
                String strText_p)
localizes a string

Parameters:
strKey_p - Key value used to retrieve localized string from resource
strText_p - current language Text
Returns:
String localized strText_p

localize1

String localize1(String strKey_p,
                 String strText_p,
                 String strAttribute1_p)
localizes a string with additional parameter that is replaced with %1

Parameters:
strKey_p - Key value used to retrieve localized string from resource
strText_p - current language Text
strAttribute1_p - String that replaces %1 tokens
Returns:
String localized strText_p

localize2

String localize2(String strKey_p,
                 String strText_p,
                 String strAttribute1_p,
                 String strAttribute2_p)
localizes a string with additional parameter that is replaced with %1

Parameters:
strKey_p - Key value used to retrieve localized string from resource
strText_p - current language Text
strAttribute1_p - String that replaces %1 tokens
strAttribute2_p - String that replaces %2 tokens
Returns:
String localized strText_p

localize3

String localize3(String strKey_p,
                 String strText_p,
                 String strAttribute1_p,
                 String strAttribute2_p,
                 String strAttribute3_p)
localizes a string with additional parameter that is replaced with %1

Parameters:
strKey_p - Key value used to retrieve localized string from resource
strText_p - current language Text
strAttribute1_p - String that replaces %1 tokens
strAttribute2_p - String that replaces %2 tokens
strAttribute3_p - String that replaces %3 tokens
Returns:
String localized strText_p

getConfigurationName

String getConfigurationName()
get a name for the configuration to use can be used to distinguish different applications

Returns:
String a name for the configuration, or "default" to use default

getXMLConfigDoc

InputStream getXMLConfigDoc(String strName_p)
                            throws Exception
loads a XML Document either from local file, external file or from a JNDI context

Specified by:
getXMLConfigDoc in interface OwBaseInitializer
Parameters:
strName_p - Name of the resource to look for
Returns:
OwXMLUtil wrapped DOM Node, or null if not found
Throws:
Exception

getConfigURL

URL getConfigURL(String strName_p)
                 throws Exception
get the URL to the configuration file

Specified by:
getConfigURL in interface OwBaseInitializer
Parameters:
strName_p - Name of the resource to look for
Returns:
URL of the configuration file
Throws:
Exception

getBasePath

String getBasePath()
get the base path to the application

Specified by:
getBasePath in interface OwBaseInitializer
Returns:
String

getInitParameter

String getInitParameter(String strParamName_p)
get a parameter from the config file

Specified by:
getInitParameter in interface OwBaseInitializer
Parameters:
strParamName_p - Name of the requested parameter
Returns:
parameter value, or null if not set.

deleteTempDir

void deleteTempDir(String strDir_p)
deletes a temp dir and all files within it

Parameters:
strDir_p - String directory

createTempDir

String createTempDir(String strPrefix_p)
                     throws Exception
creates a unique temp directory

Parameters:
strPrefix_p - String prefix to use for name
Returns:
Returns the created tempDir.
Throws:
OwConfigurationException
Exception

getClientID

String getClientID()
get a ID / name for the calling client browser

Returns:
String

getMandatorID

String getMandatorID()
get a ID / name for the calling mandator

Returns:
String mandator or null if no mandator is supported

getMandator

OwMandator getMandator()
get the mandator interface of the current logged in user

Returns:
OwMandator or null if not yet defined

getMandatorManager

OwMandatorManager getMandatorManager()
retrieve the MandatorManager reference

Returns:
OwMandatorManager

getClientWildCard

String getClientWildCard(int wildcardtype_p)
get a wild card to be used in the client for the given wild card type

Parameters:
wildcardtype_p - as defined in OwWildCardDefinition.WILD_CARD_TYPE_...
Returns:
wildcard string or null if not wildcard is defined on the client


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.