public class MaxPropCache extends java.lang.Object implements MaximoCache, FixedLoggers
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPLEVEL_MTSECURE |
static java.lang.String |
PROPLEVEL_PRIVATE
Maximo value for private security level from PROPSECURELEVEL domain.
|
static java.lang.String |
PROPLEVEL_PUBLIC
Maximo value for public security level from PROPSECURELEVEL domain.
|
static java.lang.String |
PROPLEVEL_SECURE |
static java.lang.String[] |
requiredInFile
Names of properties that must be specified in the properties file input to init(Properties).
|
APPLOGGER, CRONTASKLOGGER, CRONTASKMGRLOGGER, CRONTASKMGRSQLLOGGER, DBCONNECTIONLOGGER, DDLOGGER, DMLOGGER, EVENTLOGGER, EXCEPTIONLOGGER, MAILLOGGER, MAXIMOLOGGER, MTLOGGER, NULLMBOPOINTER, SECURITY, SENDFAILEDLOGGER, SERVICELOGGER, SQLLOGGER
appenderPrefix, LOGGERNAME_APP, LOGGERNAME_CRONTASK, LOGGERNAME_CRONTASKMGR, LOGGERNAME_DBCONNECTION, LOGGERNAME_DD, LOGGERNAME_DM, LOGGERNAME_DMPREVIEW, LOGGERNAME_EVENT, LOGGERNAME_EXCEPTION, LOGGERNAME_MAIL, LOGGERNAME_MAXIMO, LOGGERNAME_MT, LOGGERNAME_NULLMBOPOINTER, LOGGERNAME_SECURITY, LOGGERNAME_SENDFAILED, LOGGERNAME_SERVICE, LOGGERNAME_SQL, LOGGERNAME_SQL_CRONTASKMGR, LOGGERNAME_TXN, loggerPrefix
Constructor and Description |
---|
MaxPropCache() |
Modifier and Type | Method and Description |
---|---|
boolean |
canTenantSee(java.lang.String propName)
Returns false if propName is a hidden property (only DA and landlord can access and hidden to tenants).
|
java.util.Set |
getEncryptedProps()
Return the names of all the encrypted properties.
|
java.util.Set |
getFilePropNames()
Return the names of properties that were loaded from the properties file
(as opposed to the database).
|
java.lang.String |
getName()
Return
MAXPROP . |
java.util.Set |
getPrivateProps()
Return the names of all the private properties.
|
java.util.Properties |
getProperties()
Return all properties that have been loaded into cache.
|
java.lang.String |
getProperty(java.lang.String propName)
Return the value for a specified property name.
|
java.lang.String |
getProperty(java.lang.String propName,
boolean checkExists)
Return the value for a specified property name.
|
java.lang.String |
getProperty(java.lang.String propName,
java.lang.String lang)
Return the cached property value for the given language code.
|
java.lang.String |
getProperty(java.lang.String propName,
java.lang.String lang,
UserInfo userInfo,
java.util.UUID uuid) |
java.lang.String |
getProperty(java.lang.String propName,
UserInfo userInfo,
java.util.UUID uuid) |
java.lang.Object |
getPropertyAsObject(java.lang.String propName)
Return the object value for a specified property name.
|
java.lang.String |
getPublicProperty(java.lang.String propName) |
java.lang.String |
getPublicProperty(java.lang.String propName,
java.lang.String lang)
Return a property that is flagged as public.
|
void |
init()
Does nothing, must call
init . |
void |
init(java.util.Properties propsFromFile)
Initialize all the cache objects to new and empty,
and set loaded = False.
|
boolean |
isEncrypted(java.lang.String propName)
Return True if this property is flagged as "encrypted."
For most properties, this will return False.
|
boolean |
isMTSecure(java.lang.String propName)
Return True if this property is flagged as "mtsecure."
For most properties, this will return False.
|
boolean |
isPrivate(java.lang.String propName)
Return True if this property is flagged as "private."
For most properties, this will return False.
|
boolean |
isPublic(java.lang.String propName)
Return True if this property is flagged as "public."
For most properties, this will return False.
|
void |
override(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.String schemaOwner)
Called after
#init(Properties)init from CommonShell
to support command-line parameters for database connectivity. |
boolean |
propertyExistsInCache(java.lang.String propName)
Identifies whether the property exists in cache.
|
boolean |
propertyExistsInCache(java.lang.String propName,
java.lang.String lang)
Identifies whether the property exists in cache.
|
void |
reload()
Reload cache for all properties.
|
void |
reload(java.lang.String key)
Reload cache for the comma-delimited list of property names.
|
void |
reloadFromFile()
Reload properties from the maximo.properties file.
|
java.lang.String |
singleToDoubleQuotes(java.lang.String in)
Change single quote to two single quotes.
|
public static java.lang.String[] requiredInFile
public static java.lang.String PROPLEVEL_PUBLIC
public static java.lang.String PROPLEVEL_PRIVATE
public static java.lang.String PROPLEVEL_SECURE
public static java.lang.String PROPLEVEL_MTSECURE
public void init() throws MXException
init
.init
in interface MaximoCache
MXException
public void init(java.util.Properties propsFromFile) throws java.lang.Exception
java.lang.Exception
MaximoCache.init()
public void override(java.lang.String url, java.lang.String user, java.lang.String password, java.lang.String schemaOwner) throws java.lang.Exception
#init(Properties)init
from CommonShell
to support command-line parameters for database connectivity.url
- Override value for mxe.db.urluser
- Override value for mxe.db.userpassword
- Override value for mxe.db.passwordschemaOwner
- Override value for mxe.db.schemaownerjava.lang.Exception
public void reload() throws MXException
reload
in interface MaximoCache
MXException
MaximoCache.reload()
,
reloadCache(java.lang.String)
public void reload(java.lang.String key) throws MXException
reload
in interface MaximoCache
key
- Comma-delimited list of property names to be reloaded.
If this is null or empty, nothing will be reloaded.MXException
MaximoCache.reload()
,
reloadCache(java.lang.String)
public java.lang.String getName()
MAXPROP
.getName
in interface MaximoCache
MaximoCache.getName()
public void reloadFromFile() throws java.lang.Exception
java.lang.Exception
DBManager.reloadProperties(java.util.Properties)
public java.util.Properties getProperties()
public java.lang.String getProperty(java.lang.String propName)
If the property is not defined, this will return null. If the property is defined but has no value, this will return the empty string.
propname
- Property namepublic java.lang.String getProperty(java.lang.String propName, boolean checkExists)
If the property is not defined, this will return null. If the property is defined but has no value, this will return the empty string.
propname
- Property namepublic java.lang.Object getPropertyAsObject(java.lang.String propName) throws MXException
propname
- Property nameMXException
public java.lang.String getProperty(java.lang.String propName, java.lang.String lang)
If the property is not defined, this will return null. If the property is defined but has no value, this will return the empty string.
propName
- Property namelang
- Language codepublic boolean propertyExistsInCache(java.lang.String propName)
getProperty
method
to get a value.propname
- Property namepublic java.lang.String getPublicProperty(java.lang.String propName)
public java.lang.String getPublicProperty(java.lang.String propName, java.lang.String lang)
propName
- Property namelang
- Language codegetProperty(String)
public java.lang.String getProperty(java.lang.String propName, java.lang.String lang, UserInfo userInfo, java.util.UUID uuid)
public java.lang.String getProperty(java.lang.String propName, UserInfo userInfo, java.util.UUID uuid)
public boolean propertyExistsInCache(java.lang.String propName, java.lang.String lang)
getProperty
method
to get a value.propname
- Property namelang
- Language code. If language code is not applicable
then call the method getProperty
.public boolean canTenantSee(java.lang.String propName)
propName
- public boolean isEncrypted(java.lang.String propName)
propname
- Property namepublic java.util.Set getEncryptedProps()
public boolean isPublic(java.lang.String propName)
propname
- Property namepublic boolean isPrivate(java.lang.String propName)
propname
- Property namepublic boolean isMTSecure(java.lang.String propName)
propname
- Property namepublic java.util.Set getPrivateProps()
public java.util.Set getFilePropNames()
public java.lang.String singleToDoubleQuotes(java.lang.String in)
Util
.