public class OwMainRoleManagerContext extends Object implements OwRoleManagerContext, OwAOContext
Main Role Manager Context Class Implementation. Instance stays active during session.
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
Constructor and Description |
---|
OwMainRoleManagerContext(OwMainAppContext mainContext) |
Modifier and Type | Method and Description |
---|---|
String |
createTempDir(String strPrefix_p)
creates a unique temp directory
|
void |
deleteTempDir(String strDir_p)
deletes a temp dir and all files within it
|
Object |
getApplicationAttribute(String key_p)
get a attribute from the application scope
|
OwBaseConfiguration |
getBaseConfiguration()
get the configuration information
|
String |
getBasePath()
get the base path to the application
|
String |
getClientID()
get a ID / name for the calling client
|
OwConfiguration |
getConfiguration() |
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
|
OwBaseUserInfo |
getCurrentUser()
get the current user
|
OwHistoryManager |
getHistoryManager()
get the history manager of the current logged in user
|
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 data source
|
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()
get the mandator manager of the current logged in user
|
OwNetwork |
getNetwork()
get the network interface of the current logged in user
|
OwAOProvider |
getUnmanagedAOProvider() |
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
|
boolean |
isRoleManaged() |
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
|
Object |
setApplicationAttribute(String key_p,
Object object_p)
set a attribute from the application scope
|
public OwMainRoleManagerContext(OwMainAppContext mainContext)
public URL getConfigURL(String strName_p) throws Exception
OwBaseInitializer
getConfigURL
in interface OwBaseInitializer
strName_p
- Name of the resource to look forException
public Object getApplicationAttribute(String key_p)
OwBaseInitializer
getApplicationAttribute
in interface OwBaseInitializer
Object
public Object setApplicationAttribute(String key_p, Object object_p)
OwBaseInitializer
setApplicationAttribute
in interface OwBaseInitializer
public OwBaseConfiguration getBaseConfiguration()
OwRoleManagerContext
getBaseConfiguration
in interface OwRoleManagerContext
public org.springframework.jdbc.core.JdbcTemplate getJDBCTemplate()
OwRoleManagerContext
getJDBCTemplate
in interface OwRoleManagerContext
public Locale getLocale()
OwRoleManagerContext
getLocale
in interface OwRoleManagerContext
public String localizeLabel(String strName_p)
OwRoleManagerContext
localizeLabel
in interface OwRoleManagerContext
strName_p
- name e.g. attribute name to look forpublic boolean hasLabel(String strName_p)
OwRoleManagerContext
hasLabel
in interface OwRoleManagerContext
strName_p
- name e.g. attribute name to look forpublic String localize(String strKey_p, String strText_p)
OwRoleManagerContext
localize
in interface OwRoleManagerContext
strKey_p
- Key value used to retrieve localized string from resourcestrText_p
- current language Textpublic String localize1(String strKey_p, String strText_p, String strAttribute1_p)
OwRoleManagerContext
localize1
in interface OwRoleManagerContext
strKey_p
- Key value used to retrieve localized string from resourcestrText_p
- current language TextstrAttribute1_p
- String that replaces %1 tokenspublic String localize2(String strKey_p, String strText_p, String strAttribute1_p, String strAttribute2_p)
OwRoleManagerContext
localize2
in interface OwRoleManagerContext
strKey_p
- Key value used to retrieve localized string from resourcestrText_p
- current language TextstrAttribute1_p
- String that replaces %1 tokensstrAttribute2_p
- String that replaces %2 tokenspublic String localize3(String strKey_p, String strText_p, String strAttribute1_p, String strAttribute2_p, String strAttribute3_p)
OwRoleManagerContext
localize3
in interface OwRoleManagerContext
strKey_p
- Key value used to retrieve localized string from resourcestrText_p
- current language TextstrAttribute1_p
- String that replaces %1 tokensstrAttribute2_p
- String that replaces %2 tokensstrAttribute3_p
- String that replaces %3 tokenspublic String getConfigurationName()
OwRoleManagerContext
getConfigurationName
in interface OwRoleManagerContext
public InputStream getXMLConfigDoc(String strName_p) throws Exception
OwRoleManagerContext
getXMLConfigDoc
in interface OwBaseInitializer
getXMLConfigDoc
in interface OwRoleManagerContext
strName_p
- Name of the resource to look forException
public String getBasePath()
OwRoleManagerContext
getBasePath
in interface OwBaseInitializer
getBasePath
in interface OwRoleManagerContext
public String getInitParameter(String strParamName_p)
OwRoleManagerContext
getInitParameter
in interface OwBaseInitializer
getInitParameter
in interface OwRoleManagerContext
strParamName_p
- Name of the requested parameterpublic OwBaseUserInfo getCurrentUser() throws Exception
OwRoleManagerContext
getCurrentUser
in interface OwRoleManagerContext
Exception
public void deleteTempDir(String strDir_p)
OwRoleManagerContext
deleteTempDir
in interface OwRoleManagerContext
strDir_p
- String directorypublic String createTempDir(String strPrefix_p) throws OwConfigurationException
OwRoleManagerContext
createTempDir
in interface OwRoleManagerContext
strPrefix_p
- String prefix to use for nameOwConfigurationException
public String getClientID()
OwRoleManagerContext
getClientID
in interface OwRoleManagerContext
public String getMandatorID()
OwRoleManagerContext
getMandatorID
in interface OwRoleManagerContext
public OwMandator getMandator()
OwRoleManagerContext
getMandator
in interface OwRoleManagerContext
public OwNetwork getNetwork()
OwRoleManagerContext
getNetwork
in interface OwAOContext
getNetwork
in interface OwRoleManagerContext
public OwHistoryManager getHistoryManager()
OwRoleManagerContext
getHistoryManager
in interface OwRoleManagerContext
public OwMandatorManager getMandatorManager()
OwRoleManagerContext
getMandatorManager
in interface OwRoleManagerContext
public OwAOProvider getUnmanagedAOProvider() throws OwConfigurationException
getUnmanagedAOProvider
in interface OwRoleManagerContext
OwConfigurationException
public OwConfiguration getConfiguration()
getConfiguration
in interface OwAOContext
public boolean isRoleManaged()
isRoleManaged
in interface OwAOContext
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.