|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nim.NiMKernelService
com.nitido.nim.BrandService
public abstract class BrandService
The BrandService provides access to branding (multi-tentant) and application (class-of-service) configuration for the system.
Field Summary | |
---|---|
protected ConfigurationService |
_confService
Reference to the configuration service |
Constructor Summary | |
---|---|
BrandService(NiMKernelServiceVisa visa)
Default constructor. |
Method Summary | |
---|---|
abstract java.util.List<Application> |
getApplications(java.util.List<java.lang.String> appIDs,
Entity user)
Getting a list of application object based on the provided appIDs. |
protected boolean |
getBooleanPropertyWithDefault(java.lang.String confKey,
boolean defValue)
Retrieve a boolean property from the system configuration (with default value). |
abstract Brand |
getBrand(NimletInput input,
Entity user)
Returns a brand object for this user. |
abstract Brand |
getDomainBrand(java.lang.String domain)
Get a brand object for a given domain without relying on input or an authenticated entity. |
protected long |
getLongProperty(java.lang.String confKey,
boolean checkMin,
long minValue)
Retrieve a Long property from the system configuration. |
protected long |
getLongPropertyWithDefault(java.lang.String confKey,
boolean checkMin,
long minValue,
long defValue)
Retrieve a long property from the system configuration (with default value). |
abstract java.lang.String |
getMessage(java.lang.String domainID,
java.lang.String brandID,
java.lang.String msgID,
java.lang.String locale,
java.lang.Object... msgParams)
Translates a message to given locale based on the brand's dictionary |
protected java.lang.String |
getStringProperty(java.lang.String confKey)
Retrieve a String property from the system configuration. |
protected java.lang.String |
getStringPropertyWithDefault(java.lang.String confKey,
java.lang.String defValue)
Retrieve a String property from the system configuration (with default value). |
abstract Brand |
getSystemDefaultBrand()
Getting the system default brand. |
abstract java.lang.String |
getSystemDefaultLocale()
Getting the system default locale string. |
protected void |
init(NiMKernel kernel,
ConfigurationService confService)
This method is used to initialize the kernel service. |
protected java.util.Map<java.lang.String,java.lang.String> |
loadLocaleMap()
|
protected java.util.List<java.lang.String> |
loadSysDefaultApps()
Loads a list of system default application IDs from the NiM configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ConfigurationService _confService
Constructor Detail |
---|
public BrandService(NiMKernelServiceVisa visa)
visa
- kernel service visaMethod Detail |
---|
protected void init(NiMKernel kernel, ConfigurationService confService) throws InitializationFailedException, NiMException
NiMKernelService
init
in class NiMKernelService
kernel
- Reference to the NiMKernel object that instantiated the
service.confService
- A reference to the configuration service. All the service
implementations (except ConfigurationService)
should retrieve the setting information from it.
InitializationFailedException
- If unable to initialize the kernel service.
NiMException
- If service initialization can not be done due to failure in
establish a connection to the back-end service. Not all
service implementation will throw this exception.public abstract Brand getBrand(NimletInput input, Entity user)
user
- the current userinput
- the current request's nimlet input object. If this brand object is
required for an unauthenticated entity it may be left null.
public abstract Brand getDomainBrand(java.lang.String domain)
domain
- domain whose default brand is to be retrieved
public abstract java.lang.String getMessage(java.lang.String domainID, java.lang.String brandID, java.lang.String msgID, java.lang.String locale, java.lang.Object... msgParams)
domainID
- the requesting user's domainID (used for fail over forbrandID
- the ID of the brand (this brand's dictionary will be used
to retrieve the message)
the error message)msgID
- the ID of the messagelocale
- the locale for which to retrieve this messagemsgParams
- variable argument which can take an array of objects, or
1 or more objects, or not be supplied at all
public abstract Brand getSystemDefaultBrand()
public abstract java.util.List<Application> getApplications(java.util.List<java.lang.String> appIDs, Entity user)
appIDs
- the list of application IDs to be retrieved.
If this parameter is null, the method should use the system default
application ID list instead.user
- the User's entity object. It is used to populate the
user specific preference for each application. If this parameter is
null, the method should use the system default preference for the
application.public abstract java.lang.String getSystemDefaultLocale()
protected java.lang.String getStringProperty(java.lang.String confKey) throws InitializationFailedException
confKey
- the key for the property
InitializationFailedException
- if a property value for the provided key was not foundprotected long getLongProperty(java.lang.String confKey, boolean checkMin, long minValue) throws InitializationFailedException
confKey
- the key for the propertycheckMin
- boolean flag to indicate whether to check for the
minimum value of a valid value.minValue
- the minimum value of a valid value.
InitializationFailedException
- if the property value for the provided key was
not found or is not a valid Longprotected boolean getBooleanPropertyWithDefault(java.lang.String confKey, boolean defValue)
confKey
- the key for the propertydefValue
- the default value
InitializationFailedException
- if a property value for the provided key was not foundprotected java.lang.String getStringPropertyWithDefault(java.lang.String confKey, java.lang.String defValue)
confKey
- the key for the propertydefValue
- the default value
InitializationFailedException
- if a property value for the provided key was not foundprotected long getLongPropertyWithDefault(java.lang.String confKey, boolean checkMin, long minValue, long defValue)
confKey
- the key for the property.checkMin
- boolean flag to indicate whether to check for the
minimum value of a valid value.minValue
- the minimum value of a valid value.defValue
- the default value
InitializationFailedException
- if a property value for the provided key was not foundprotected java.util.List<java.lang.String> loadSysDefaultApps()
protected java.util.Map<java.lang.String,java.lang.String> loadLocaleMap()
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.