Nitido Inc.

com.nitido.nimx.services.brand.sysdefault
Class BrandServiceImpl

java.lang.Object
  extended by com.nitido.nim.NiMKernelService
      extended by com.nitido.nim.BrandService
          extended by com.nitido.nimx.services.brand.sysdefault.BrandServiceImpl
All Implemented Interfaces:
NiMConstants

public class BrandServiceImpl
extends BrandService


Field Summary
 
Fields inherited from class com.nitido.nim.BrandService
_confService
 
Fields inherited from interface com.nitido.nim.NiMConstants
ACTION_CREATE_NUGGET, ACTION_CREATE_NUGGET_BY_NAME, ACTION_CRED_SPACE_ADD, ACTION_CRED_SPACE_GET_KEYS, ACTION_CRED_SPACE_GET_KEYS_START_WITH, ACTION_CRED_SPACE_GET_VALUE, ACTION_CRED_SPACE_GET_VALUES, ACTION_CRED_SPACE_MODIFY, ACTION_CRED_SPACE_REMOVE_VALUE, ACTION_CRED_SPACE_REMOVE_VALUES, ACTION_CRED_SPACE_REPLACE, ACTION_DEPROVISION_ENTITY, ACTION_ENTITY_CHANGE_CRED, ACTION_LOG_EVENT, ACTION_PROVISION_ENTITY, ACTION_USER_SPACE_ADD, ACTION_USER_SPACE_GET_KEYS, ACTION_USER_SPACE_GET_KEYS_START_WITH, ACTION_USER_SPACE_GET_VALUE, ACTION_USER_SPACE_GET_VALUES, ACTION_USER_SPACE_MODIFY, ACTION_USER_SPACE_REMOVE_VALUE, ACTION_USER_SPACE_REMOVE_VALUES, ACTION_USER_SPACE_REPLACE, CONF_PREFIX_SECURITY_ACCESS, CONF_PREFIX_SECURITY_ALLOW, CONF_PREFIX_SECURITY_ASSIGN, CONF_PREFIX_SECURITY_RESOURCE, PARAM_CHANGE_CRED, PARAM_DEPROVISION_CREDENTIAL, PARAM_EVENT_NAME, PARAM_MODIFIER_CONTAINER, PARAM_NUGGET_CREATE_CRED, PARAM_NUGGET_NAME, PARAM_NUGGET_SETTINGS, PARAM_NUGGET_TYPE, PARAM_PROVISION_DESCRIPTOR, PARAM_SPACE_KEY, PARAM_SPACE_KEYS_START_WITH, PARAM_SPACE_VALUE, PREFIX_ACCESS_CLASS_IN_PACKAGE
 
Constructor Summary
BrandServiceImpl(NiMKernelServiceVisa visa)
           
 
Method Summary
 java.util.List<Application> getApplications(java.util.List<java.lang.String> appIDs, Entity entity)
          Getting a list of application object based on the provided appIDs.
 Brand getBrand(NimletInput input, Entity user)
          Returns a brand object for this user.
 Brand getDomainBrand(java.lang.String domain)
          Get a brand object for a given domain without relying on input or an authenticated entity.
 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.util.List<Application> getSysDefaultApplicationList()
           
 Brand getSystemDefaultBrand()
          Getting the system default brand.
 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  void preloadLangBundles()
           
 
Methods inherited from class com.nitido.nim.BrandService
getBooleanPropertyWithDefault, getLongProperty, getLongPropertyWithDefault, getStringProperty, getStringPropertyWithDefault, loadLocaleMap, loadSysDefaultApps
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrandServiceImpl

public BrandServiceImpl(NiMKernelServiceVisa visa)
Method Detail

init

protected void init(NiMKernel kernel,
                    ConfigurationService confService)
             throws InitializationFailedException,
                    NiMException
Description copied from class: NiMKernelService
This method is used to initialize the kernel service. Extenders of this class must implement this method.

Overrides:
init in class BrandService
Parameters:
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.
Throws:
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.

preloadLangBundles

protected void preloadLangBundles()

getBrand

public Brand getBrand(NimletInput input,
                      Entity user)
Description copied from class: BrandService
Returns a brand object for this user. The brand is determined based on the domain of the request and the active brand ID from the user space. Depending on the values of those properties a brand object is constructed for the user. If both the domain and active brand are valid then that brand is returned. If the domain is not valid then the system default Brand is returned. If the active brand is not valid then an attempt is made to retrieve the default brand for the domain. The Brand object also contains a list of applications that are configured for the brand.

Specified by:
getBrand in class BrandService
Parameters:
input - the current request's nimlet input object. If this brand object is required for an unauthenticated entity it may be left null.
user - the current user
Returns:
the Brand object

getDomainBrand

public Brand getDomainBrand(java.lang.String domain)
Description copied from class: BrandService
Get a brand object for a given domain without relying on input or an authenticated entity.

Specified by:
getDomainBrand in class BrandService
Parameters:
domain - domain whose default brand is to be retrieved
Returns:
the default brand for a given domain, or the system default brand if the domain was not found

getSystemDefaultBrand

public Brand getSystemDefaultBrand()
Description copied from class: BrandService
Getting the system default brand. This method is called by NiM.getSystemDefaultBrand().

Specified by:
getSystemDefaultBrand in class BrandService

getMessage

public java.lang.String getMessage(java.lang.String domainID,
                                   java.lang.String brandID,
                                   java.lang.String msgID,
                                   java.lang.String locale,
                                   java.lang.Object... msgParams)
Description copied from class: BrandService
Translates a message to given locale based on the brand's dictionary

Specified by:
getMessage in class BrandService
Parameters:
domainID - the requesting user's domainID (used for fail over for
brandID - the ID of the brand (this brand's dictionary will be used to retrieve the message) the error message)
msgID - the ID of the message
locale - the locale for which to retrieve this message
msgParams - variable argument which can take an array of objects, or 1 or more objects, or not be supplied at all
Returns:
the text of the message in the specified locale

getSystemDefaultLocale

public java.lang.String getSystemDefaultLocale()
Description copied from class: BrandService
Getting the system default locale string. This method should return a character string that represent the locale as defined in ISO 639. This string is usually a 2 character string.

Specified by:
getSystemDefaultLocale in class BrandService

getSysDefaultApplicationList

protected java.util.List<Application> getSysDefaultApplicationList()

getApplications

public java.util.List<Application> getApplications(java.util.List<java.lang.String> appIDs,
                                                   Entity entity)
Description copied from class: BrandService
Getting a list of application object based on the provided appIDs.

Specified by:
getApplications in class BrandService
Parameters:
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.
entity - 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.

Nitido NiM 2.5 Java API

These JavaDoc pages are generated for release/nim_2_5-2.5.44

Copyright © 1999-2009 Nitido Inc.    Proprietary and Confidential.    All Rights Reserved.