public class OwConfiguration extends OwBaseConfiguration implements OwAttributeBag
Configuration class for the global application Configuration and Plugins.
NOTE: The Bootstrap Configuration and Plugin Descriptions will only be reloaded upon Application restart.
Also, if several identical Applications are deployed in one application server,
they need their own classloader, otherwise they will share the bootstrap Configuration and plugins.
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
Modifier and Type | Class and Description |
---|---|
protected class |
OwConfiguration.OwErrorView
simple message view class to display a exception when main plugin load failed
|
class |
OwConfiguration.OwMasterPluginInstance
plugin instance used as return value of createMasterPlugin function
|
OwBaseConfiguration.OwPluginTypeDefinition
Modifier and Type | Field and Description |
---|---|
static String |
ECM_ADAPTER_ELEMENT |
static String |
GLOBAL_PARAMETERS_ELEMENT |
static int |
IMPLEMENTATION_FIXPACK_VERSION
Deprecated.
since 4.2.0.0, use IMPLEMENTATION_HOTFIX_VERSION instead
|
static int |
IMPLEMENTATION_HOTFIX_VERSION
hot fix version number of the implementation
|
static int |
IMPLEMENTATION_MAJOR_VERSION
versioning since 4.2.0.0: MAJOR.MINOR.SERVICEPACK.HOTFIX
major version number of the implementation
|
static int |
IMPLEMENTATION_MINOR_VERSION
minor version number of the implementation
|
static String |
IMPLEMENTATION_RELEASE_TYPE
release type (rc1,rc2,alpha,beta)
|
static int |
IMPLEMENTATION_SERVICEPACK_VERSION
service pack version number of the implementation
|
static int |
IMPLEMENTATION_UPDATE_VERSION
Deprecated.
since 4.2.0.0 use IMPLEMENTATION_SERVICEPACK_VERSION instead
|
static int |
INTERFACE_MAJOR_VERSION
major version number of the used Interface
|
static int |
INTERFACE_MINOR_VERSION
minor version number of the used Interface
|
protected List |
m_AllowedDocumentFunctionPluginList
list of OwDocumentFunction plugins
|
protected Map |
m_AllowedDocumentFunctionPluginMap
backup map of OwDocumentFunction plugins
|
protected List |
m_AllowedMasterPluginList
list of the main plugins OwMasterPluginInstance instances
|
protected Map |
m_AllowedMasterPluginMap
backup map OwMasterPluginInstance plugins
|
protected List |
m_AllowedRecordFunctionPluginList
list OwRecordFunction plugins
|
protected Map |
m_AllowedRecordFunctionPluginMap
backup map OwRecordFunction plugins
|
protected OwMainAppContext |
m_Context
reference to the application context, used to read and write Configuration.
|
static String |
MAIN_PLUGIN_DOCUMENT_ID_EXTENSION
ID extension for the document of a main plugin to be added to the plugin ID
|
static String |
MAIN_PLUGIN_VIEW_ID_EXTENSION
ID extension for the document of a main plugin to be added to the plugin ID
|
static String |
MIME_TYPE_OPTION_PREFIX
prefix for the option id's for MIME types for the mandator selective configuration
|
static String |
MIMETYPES_CUSTOM_FILE_NAME
name of the properties file used to define own mimetypes, overriding the existing ones
|
static int |
PLUGINS_REQUIRE_CAN_MULTISELECT
flag indicating that at least one plugin can handle multiselection, see getPluginRequirementFlags()
|
static int |
PLUGINS_REQUIRE_CONTEXT_MENU
flag indicating that at least one plugin needs a context menu, see getPluginRequirementFlags()
|
static int |
SSL_MODE_NONE
SSL mode to use for requests
|
static int |
SSL_MODE_SESSION
SSL mode to use for requests
|
static String |
WORKDESK_APPLICATION_ID |
m_pluginTypeDefinitions, PLUGIN_NODE_CLASSNAME, PLUGIN_NODE_DESCRIPTION, PLUGIN_NODE_HELP, PLUGIN_NODE_ID, PLUGIN_NODE_NAME, PLUGIN_NODE_SETTINGS_SET, PLUGIN_NODE_VENDOR, PLUGIN_NODE_VERSION, PLUGIN_NODE_VIEW_CLASSNAME, PLUGIN_SETATTR_DISPLAY_NAME, PLUGIN_SETATTR_EDIT, PLUGIN_SETATTR_LIST, PLUGIN_SETATTR_MAX_SIZE, PLUGIN_SETATTR_SCOPE, PLUGINTYPE_APPLICATION, PLUGINTYPE_DOCUMENT_FUNCTION, PLUGINTYPE_MASTER, PLUGINTYPE_RECORD_FUNCTION
Constructor and Description |
---|
OwConfiguration() |
Modifier and Type | Method and Description |
---|---|
static void |
applicationInitalize(OwBaseInitializer initializer_p)
Init application config data upon startup,
make sure the servlet listener
OwConfigurationInitialisingContextListener is configured for your application. |
int |
attributecount()
get the number of attributes, or -1 if unknown
|
OwFieldManager |
createFieldManager()
create a new instance of the field manager
|
protected OwConfiguration.OwMasterPluginInstance |
createMasterPlugin(OwXMLUtil pluginNodeWrapper_p)
create a single main plugin of the given plugin node wrapper
|
protected OwConfiguration.OwMasterPluginInstance |
createMasterPlugin(String strDocClassName,
String strViewClassName,
OwXMLUtil pluginNodeWrapper_p)
create a single main plugin of the given plugin node wrapper
|
boolean |
displayLanguageSelection()
flag indication if language selection should be displayed
|
OwPlugin |
getAllowedPluginInstance(String strID_p)
get a plugin instance for the given ID
|
List |
getAllowedPlugins(String strType_p)
get a list of plugin description nodes by type
|
OwSettingsSet |
getAppSettings()
Retrieve the App Settings-Set for dynamic complex application settings
NOTE:
The OwSettings are used for complex settings for the plugins which are manually changed from time to time
by the user or the Administrator.
|
Object |
getAttribute(int index_p)
get a object at the specified index or throws OwObjectNotFoundException
|
Object |
getAttribute(String strName_p)
get the attribute with the given name or throws OwObjectNotFoundException
|
Collection |
getAttributeNames()
get all attribute names in the bag
|
List |
getAvailableLanguages()
get the list of language IDs for the user
|
static OwXMLUtil |
getBootstrap(OwBaseInitializer initializer_p) |
OwXMLUtil |
getBootstrapConfiguration()
get the bootstrap Configuration DOM node
|
static String |
getBuildNumber()
Get a readable string for buildNumber
|
Map |
getClientWildCardDefinitions()
get the client wildcard definitions to translate client wildcards to repository wildcards
|
String |
getComboboxRendererClassName()
Get the combobox renderer class name.
|
String |
getDefaultFolderClassName()
name of the default class used to create simple folders
|
String |
getDefaultLanguage()
the default language to be used, see also getDetectBrowserLocale()
|
OwXMLUtil |
getDefaultMIMENode(int iObjectType_p)
get the default MIME XML Entry for the given object type.
|
boolean |
getDetectBrowserLocale()
flag indicating if we use the browser language
and override the default locale, see also getDefaultLanguage()
|
OwDocumentFunction |
getDocumentFunction(String strID_p)
get a single document function by ID
|
List |
getDocumentFunctionPlugins()
get document function plugins plugins
|
static String |
getEditionString()
Get key string of the core system edition
|
OwXMLUtil |
getFieldManagerConfiguration()
get the fieldmanager configuration DOM node
|
OwGlobalParametersConfiguration |
getGlobalParameters()
Return the <globalParameters> node, if available,
or will return the root Bootstrap node.
|
OwHistoryManager |
getHistoryManager()
retrieve the HistoryManager object
|
OwXMLUtil |
getHistoryManagerConfiguration()
get the rolemanager configuration DOM node
|
org.springframework.jdbc.core.JdbcTemplate |
getJDBCTemplate()
get a spring JDBC template for the default DataSource
|
String |
getLayoutConfigurationBagPrefix()
Get the layout configuration bag prefix
|
String |
getLocalizedPluginDescription(OwXMLUtil pluginDescriptionNode_p)
get the localized description of a plugin
|
String |
getLocalizedPluginDescription(String strID_p)
get the localized description of a plugin
|
String |
getLocalizedPluginSettingTitle(Node settingDescriptionNode_p,
String strPluginName_p)
get the localized title of a plugin setting
|
String |
getLocalizedPluginTitle(OwXMLUtil pluginDescriptionNode_p)
get the localized title of a plugin
|
String |
getLocalizedPluginTitle(String strID_p)
get the localized title of a plugin
|
OwMandatorManager |
getMandatorManager()
retrieve the MandatorManager object
|
OwXMLUtil |
getMandatorManagerConfiguration()
get the mandatormanager configuration DOM node
|
OwConfiguration.OwMasterPluginInstance |
getMasterPlugin(String strID_p)
get a single record function by ID
|
List |
getMasterPlugins(boolean fExcludeListeners_p)
get a list of OwMasterPluginInstance
|
boolean |
getMessageBoxOnUserError()
the behavior for UI messages caused by user error
|
OwXMLUtil |
getMIMENode(String strMIMEType_p)
get the MIME XML Entry for the given MIMEType.
|
OwNetwork |
getNetwork()
retrieve the network object
|
OwXMLUtil |
getNetworkAdaptorConfiguration()
get the Network Adaptor Configuration DOM node
|
OwXMLUtil |
getPlugin(String strID_p)
get a plugin description by its key
|
List |
getRecordClassNames()
get the list of classnames that act as records
|
OwRecordFunction |
getRecordFunction(String strID_p)
get a single record function by ID
|
List |
getRecordFunctionPlugins()
get record function plugins plugins
|
OwRoleManager |
getRoleManager()
retrieve the RoleManager object
|
OwXMLUtil |
getRoleManagerConfiguration()
get the rolemanager configuration DOM node
|
Object |
getSafeAttribute(String strName_p,
Object default_p)
get the attribute with the given name, returns default if not found.
|
OwSettings |
getSettings()
retrieve the settings object for dynamic complex plugin settings
NOTE:
The OwSettings are used for complex settings for the plugins which are manually changed from time to time
by the user or the Administrator.
|
int |
getSSLMode()
get the SSL mode to use for requests
|
String |
getTempDir()
Get the temp dir defined in bootstrap configuration,
that can be used for upload.
|
OwAttributeBagWriteable |
getUserAttributeBag()
get the application wide scalar settings specific for the current user.
|
Set<OwContextBasedUOListenerFactory> |
getUserOperationListenerFactories()
Get the cached user operation listener factories.
|
static String |
getVersionString()
Return a string representing a version.
|
boolean |
hasAttribute(String strName_p)
check if attribute exists
|
void |
init(OwMainAppContext context_p)
Init called before login, creates a new instance of OwConfiguration
optionally set a prefix to distinguish several different applications.
|
boolean |
isDocmentFunctionRequirement(int iRequirement_p)
check the plugin requirement flag for document functions
|
boolean |
isDocumentFunctionAllowed(String strID_p)
check if document function with given ID is allowed
|
boolean |
isDynamicSplitInUse()
Get the configuration flag for dynamic split
|
boolean |
isMasterPluginAllowed(String strID_p)
check if master plugin with given ID is allowed
|
boolean |
isRecordFunctionAllowed(String strID_p)
check if record function with given ID is allowed
|
boolean |
isUseExtJsForDragAndDrop()
Do we use ExtJS for DnD or not?
|
void |
loginInit()
init called AFTER the user has logged in.
|
void |
refreshStaticConfiguration()
update the configuration data
|
boolean |
setMasterRole(String strRole_p)
set the new master role without logout
|
void |
updatePlugins()
update the plugins after the role has changed
called after plugins have been created with createPlugins();
|
getPluginTypeDefinitions, getPluginTypeDisplayName
public static int INTERFACE_MINOR_VERSION
public static int INTERFACE_MAJOR_VERSION
public static final int IMPLEMENTATION_MAJOR_VERSION
public static final int IMPLEMENTATION_MINOR_VERSION
public static final int IMPLEMENTATION_UPDATE_VERSION
public static final int IMPLEMENTATION_SERVICEPACK_VERSION
public static final int IMPLEMENTATION_FIXPACK_VERSION
public static final int IMPLEMENTATION_HOTFIX_VERSION
public static final String IMPLEMENTATION_RELEASE_TYPE
public static final String MIME_TYPE_OPTION_PREFIX
public static final String ECM_ADAPTER_ELEMENT
public static final String WORKDESK_APPLICATION_ID
public static final String MIMETYPES_CUSTOM_FILE_NAME
public static final String GLOBAL_PARAMETERS_ELEMENT
protected OwMainAppContext m_Context
protected List m_AllowedDocumentFunctionPluginList
protected Map m_AllowedDocumentFunctionPluginMap
protected List m_AllowedRecordFunctionPluginList
protected Map m_AllowedRecordFunctionPluginMap
protected List m_AllowedMasterPluginList
protected Map m_AllowedMasterPluginMap
public static final String MAIN_PLUGIN_DOCUMENT_ID_EXTENSION
public static final String MAIN_PLUGIN_VIEW_ID_EXTENSION
public static final int PLUGINS_REQUIRE_CONTEXT_MENU
public static final int PLUGINS_REQUIRE_CAN_MULTISELECT
public static final int SSL_MODE_NONE
public static final int SSL_MODE_SESSION
public static String getVersionString()
public static String getEditionString()
public static String getBuildNumber()
public void init(OwMainAppContext context_p) throws Exception
context_p
- OwMainAppContextException
public org.springframework.jdbc.core.JdbcTemplate getJDBCTemplate()
JdbcTemplate
public static void applicationInitalize(OwBaseInitializer initializer_p) throws OwConfigurationException
OwConfigurationInitialisingContextListener
is configured for your application.initializer_p
- OwConfigurationException
public void loginInit() throws Exception
Exception
public boolean setMasterRole(String strRole_p) throws Exception
Exception
public OwAttributeBagWriteable getUserAttributeBag() throws Exception
Exception
public OwSettings getSettings()
public OwSettingsSet getAppSettings() throws Exception
Exception
public OwNetwork getNetwork()
public OwMandatorManager getMandatorManager()
public OwRoleManager getRoleManager()
public OwHistoryManager getHistoryManager()
public OwFieldManager createFieldManager() throws Exception
Exception
public void updatePlugins() throws Exception
Exception
protected OwConfiguration.OwMasterPluginInstance createMasterPlugin(String strDocClassName, String strViewClassName, OwXMLUtil pluginNodeWrapper_p) throws Exception
strDocClassName
- Name of the document class for doc-view-modelstrViewClassName
- Name of the view class for doc-view-modelpluginNodeWrapper_p
- OwXMLUtil containing the plugin configuration node from owplugins.xmlException
- if master plugin can't be instantiatedprotected OwConfiguration.OwMasterPluginInstance createMasterPlugin(OwXMLUtil pluginNodeWrapper_p) throws Exception
pluginNodeWrapper_p
- Exception
public boolean isDocmentFunctionRequirement(int iRequirement_p)
iRequirement_p
- int flag as defined with PLUGINS_REQUIRE_...public List getMasterPlugins(boolean fExcludeListeners_p)
fExcludeListeners_p
- boolean true = do only return master plugins with views, false = return all pluginspublic List getDocumentFunctionPlugins()
public OwDocumentFunction getDocumentFunction(String strID_p) throws Exception
strID_p
- String ID of function as defined in plugin descriptorException
public boolean isDocumentFunctionAllowed(String strID_p)
strID_p
- String ID of function as defined in plugin descriptorpublic List getRecordFunctionPlugins()
public OwRecordFunction getRecordFunction(String strID_p) throws Exception
strID_p
- String ID of function as defined in plugin descriptorException
public boolean isRecordFunctionAllowed(String strID_p)
strID_p
- String ID of function as defined in plugin descriptorpublic OwConfiguration.OwMasterPluginInstance getMasterPlugin(String strID_p) throws Exception
strID_p
- String ID of function as defined in plugin descriptorException
public boolean isMasterPluginAllowed(String strID_p)
strID_p
- public OwPlugin getAllowedPluginInstance(String strID_p) throws Exception
strID_p
- String plugin IDException,
- OwAccessDeniedExceptionException
public static OwXMLUtil getBootstrap(OwBaseInitializer initializer_p)
initializer_p
- public OwXMLUtil getBootstrapConfiguration()
public OwXMLUtil getMandatorManagerConfiguration() throws Exception
Exception
public OwXMLUtil getNetworkAdaptorConfiguration() throws Exception
Exception
public OwXMLUtil getHistoryManagerConfiguration() throws Exception
Exception
public OwXMLUtil getRoleManagerConfiguration() throws Exception
Exception
public OwXMLUtil getFieldManagerConfiguration() throws Exception
Exception
public List getAllowedPlugins(String strType_p) throws Exception
Exception
public OwXMLUtil getPlugin(String strID_p) throws Exception
Exception
public Map getClientWildCardDefinitions()
public String getDefaultFolderClassName()
public List getRecordClassNames()
public List getAvailableLanguages()
public boolean displayLanguageSelection()
public String getDefaultLanguage()
getDetectBrowserLocale()
public boolean getDetectBrowserLocale()
getDefaultLanguage()
public boolean getMessageBoxOnUserError()
public OwXMLUtil getMIMENode(String strMIMEType_p) throws Exception
<?xml version="1.0" ?> <mimetable> <mime typ="text/xml"> <icon>xml.png</icon> <viewerservlet>{dwlurl}</viewerservlet> </mime> <!-- further MIME entries--> </mimetable>
strMIMEType_p
- OwObject MIMETypeException
public OwXMLUtil getDefaultMIMENode(int iObjectType_p) throws Exception
iObjectType_p
- ObjecttypeException
public int getSSLMode()
public String getTempDir() throws OwConfigurationException
System.getProperty("java.io.tmpdir")
.OwConfigurationException
- if temp directory path can not be detected.public String getLocalizedPluginSettingTitle(Node settingDescriptionNode_p, String strPluginName_p)
getLocalizedPluginSettingTitle
in class OwBaseConfiguration
settingDescriptionNode_p
- NodestrPluginName_p
- Stringpublic String getLocalizedPluginTitle(OwXMLUtil pluginDescriptionNode_p)
getLocalizedPluginTitle
in class OwBaseConfiguration
pluginDescriptionNode_p
- OwXMLUtil wrapperpublic String getLocalizedPluginTitle(String strID_p)
getLocalizedPluginTitle
in class OwBaseConfiguration
strID_p
- String plugin IDpublic String getLocalizedPluginDescription(OwXMLUtil pluginDescriptionNode_p)
getLocalizedPluginDescription
in class OwBaseConfiguration
pluginDescriptionNode_p
- OwXMLUtil wrapperpublic String getLocalizedPluginDescription(String strID_p)
getLocalizedPluginDescription
in class OwBaseConfiguration
strID_p
- String plugin IDpublic void refreshStaticConfiguration() throws OwConfigurationException
OwConfigurationException
public int attributecount()
OwAttributeBag
attributecount
in interface OwAttributeBag
public Object getAttribute(int index_p) throws Exception
OwAttributeBag
getAttribute
in interface OwAttributeBag
index_p
- int indexException
public Object getAttribute(String strName_p) throws Exception
OwAttributeBag
getAttribute
in interface OwAttributeBag
Exception
public Collection getAttributeNames()
OwAttributeBag
getAttributeNames
in interface OwAttributeBag
public Object getSafeAttribute(String strName_p, Object default_p)
OwAttributeBag
getSafeAttribute
in interface OwAttributeBag
public boolean hasAttribute(String strName_p)
OwAttributeBag
hasAttribute
in interface OwAttributeBag
public String getComboboxRendererClassName()
String
object representing the OwComboboxRenderer
implementation class name.public boolean isDynamicSplitInUse()
true
if dynamic split flag is set on true
public String getLayoutConfigurationBagPrefix()
public boolean isUseExtJsForDragAndDrop()
public Set<OwContextBasedUOListenerFactory> getUserOperationListenerFactories() throws Exception
OwContextBasedUOListenerFactory
objects, or null
if nothing is configured.Exception
public OwGlobalParametersConfiguration getGlobalParameters()
getBootstrapConfiguration()
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.