Nitido Inc.

com.nitido.nim
Class NiMKernel

java.lang.Object
  extended by com.nitido.nim.NiMKernel
All Implemented Interfaces:
NiMConstants, NiMKernelConstants

public final class NiMKernel
extends java.lang.Object
implements NiMConstants, NiMKernelConstants

This class is the factory of all kernel services running the JVM. Kernel services provide the actual implementations for all public methods of the NiM interface. This class is responsible for instantiating and initializing the services described in the nim descriptor file.


Field Summary
 
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
 
Fields inherited from interface com.nitido.nim.NiMKernelConstants
AUTHENTICATION, BRAND, CHECK_EARLIEST_VERSION, CHECK_EXPIRY_DATE, CHECK_HOST_NAME, CHECK_IP, CHECK_LATEST_VERSION, CLASS_LOADER, CONF_KEY_PREFIX_CORE_SERVICE, CONF_KEY_PREFIX_OPTIONAL_SERVICE, CONFIGURATION, DATA_CONTROL, ENTITLEMENT, ENTITY, EVENT_MONITOR, JVM_KEY_DESCRIPTOR, JVM_KEY_LICENSE_DATA, JVM_KEY_LICENSE_PUBLICKEY, JVM_KEY_NODE_ID, LEN_CONF_KEY_PREFIX_CORE_SERVICE, LEN_CONF_KEY_PREFIX_OPTIONAL_SERVICE, LOG, MSG_LICENSE_DATA_NOT_DEFINED, MSG_LICENSE_DATA_NOT_FILE, MSG_LICENSE_DATA_NOT_FOUND, MSG_LICENSE_DATA_NOT_READABLE, MSG_PUBLIC_KEY_NOT_DEFINED, MSG_PUBLIC_KEY_NOT_FILE, MSG_PUBLIC_KEY_NOT_FOUND, MSG_PUBLIC_KEY_NOT_READABLE, NOTIFICATION, NUGGET, PROVISION, UNIQUE_ID
 
Method Summary
 boolean checkEarliestVersion(java.lang.String checkValue)
          Validates the NiM's current version number is bigger or equals to the number specified in checkValue parameter.
 boolean checkExpiryDate(java.lang.String expiryDate)
          Validates the expiryDate of NiM.
 boolean checkHostName(java.lang.String hostName)
          Validates the HostName of the host NiM is running on.
 boolean checkIP(java.lang.String ip)
          Validates the IP of the host NiM is running on.
 boolean checkLatestVersion(java.lang.String checkValue)
          Validates the NiM's current version number is smaller or equals to the number specified in checkValue parameter.
 java.lang.String getApplicationId()
          This method returns the identifier associated to the running NiM application.
 AuthenticationService getAuthenticationService()
          This method returns the reference to the Authentication Service used by the NiM environment to authenticate entities in the system.
 BrandService getBrandService()
          This method returns the reference to the Brand Service that provides access to brands and applications configured in this installation.
 ClassLoaderService getClassLoaderService()
          This method returns the reference to the Class Loader Service used by the NiM environment.
 ConfigurationService getConfigurationService()
          This method returns the reference to the Configuration Service used by the NiM environment.
 DataControlService getDataControlService()
          This method returns the reference to the DataControl Service used by the NiM environment to instantiate entity data controls.
 EntitlementService getEntitlementService()
          This method returns the reference to the Entitlement Service used by the NiM environment to check entity entitlements.
 EntityService getEntityService()
          This method returns the reference to the Entity Service used by the NiM environment to instantiate and authenticate entities.
 java.lang.String getEnvironmentId()
          This method returns the identifier associated to the environment where the running NiM application has been deployed as specified in the NiMDescriptor.xml.
 EventMonitorService getEventMonitorService()
          This method returns the reference to the EventMonitor Service used by the NiM environement to log application level events.
protected static NiMKernel getInstance()
          This method returns the instance of the NiMKernel in the running JVM.
 LogService getLogService()
          This method returns the reference to the Logging Service used by the NiM environment.
 java.lang.String getNodeId()
          This method returns the node identifier where the NiM application has been deployed.
 NotificationService getNotificationService()
          This method returns the reference to the Notification Service that sends out notifications to internal and external users.
 NuggetService getNuggetService()
          This method returns the reference to the Nugget Service used by the NiM environment to load Nuggets.
 NiMKernelService getOptionalService(java.lang.String serviceName)
          This method returns the reference to the optional kernel service that matches the given service name.
 ProvisionService getProvisionService()
          This method returns the reference to the Provision Service that provision and deprovision entities.
 java.lang.String getRevisionId()
          This method returns the revision identifier of the running NiM application.
 UniqueIdService getUniqueIdService()
          This method returns the reference to the Unique Id Service that generates unique id.
 boolean hasLicenseToLoadNugget(java.lang.String s)
          This method is used by the NiMKernel to check if the NiM application has the license to load the given Nugget.
protected  void initLicensing()
           
protected static boolean isCoreService(java.lang.String serviceName)
          Check if the specified service name is a core service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

protected static final NiMKernel getInstance()
This method returns the instance of the NiMKernel in the running JVM. It is important to remember there can only be one NiMKernel instance per JVM.

Returns:
The reference to the running NiMKernel instance in the JVM.

getApplicationId

public final java.lang.String getApplicationId()
This method returns the identifier associated to the running NiM application.

Returns:
The identifier associated to the running NiM application.

getEnvironmentId

public final java.lang.String getEnvironmentId()
This method returns the identifier associated to the environment where the running NiM application has been deployed as specified in the NiMDescriptor.xml.

Returns:
The identifier associated to the application environment.

getNodeId

public final java.lang.String getNodeId()
This method returns the node identifier where the NiM application has been deployed. Currently, the node id is retrieved from JVM environment variable "com.nitido.nim.nodeid".

Returns:
The identifier associated to the node running the NiM application.

getRevisionId

public final java.lang.String getRevisionId()
This method returns the revision identifier of the running NiM application. Currently this identifier is taken from the NiMDescriptor.xml file.

Returns:
The revision identifier of the running NiM application.

getAuthenticationService

public final AuthenticationService getAuthenticationService()
This method returns the reference to the Authentication Service used by the NiM environment to authenticate entities in the system.

Returns:
Reference to the AuthenticationService object.

getClassLoaderService

public final ClassLoaderService getClassLoaderService()
This method returns the reference to the Class Loader Service used by the NiM environment.

Returns:
Reference to the ClassLoaderService object.

getConfigurationService

public final ConfigurationService getConfigurationService()
This method returns the reference to the Configuration Service used by the NiM environment.

Returns:
Reference to the ConfigurationService object.

getDataControlService

public final DataControlService getDataControlService()
This method returns the reference to the DataControl Service used by the NiM environment to instantiate entity data controls.

Returns:
Reference to the DataControlService object.

getEntityService

public final EntityService getEntityService()
This method returns the reference to the Entity Service used by the NiM environment to instantiate and authenticate entities.

Returns:
Reference to the EntityService object.

getEntitlementService

public final EntitlementService getEntitlementService()
This method returns the reference to the Entitlement Service used by the NiM environment to check entity entitlements.

Returns:
Reference to the EntitlementService object.

getEventMonitorService

public final EventMonitorService getEventMonitorService()
This method returns the reference to the EventMonitor Service used by the NiM environement to log application level events.

Returns:
Reference to the EventMonitorService object.

getLogService

public final LogService getLogService()
This method returns the reference to the Logging Service used by the NiM environment.

Returns:
Reference to the LogService object.

getNuggetService

public final NuggetService getNuggetService()
This method returns the reference to the Nugget Service used by the NiM environment to load Nuggets.

Returns:
Reference to the NuggetService object.

getProvisionService

public final ProvisionService getProvisionService()
                                           throws NiMException
This method returns the reference to the Provision Service that provision and deprovision entities.

Returns:
Reference to the ProvisionService object.
Throws:
NiMException

getUniqueIdService

public final UniqueIdService getUniqueIdService()
This method returns the reference to the Unique Id Service that generates unique id.

Returns:
Reference to the UniqueIdService object.

getNotificationService

public final NotificationService getNotificationService()
This method returns the reference to the Notification Service that sends out notifications to internal and external users.

Returns:
Reference to the NotificationService object.

getBrandService

public final BrandService getBrandService()
This method returns the reference to the Brand Service that provides access to brands and applications configured in this installation.

Returns:
Reference to the BrandService object.

getOptionalService

public final NiMKernelService getOptionalService(java.lang.String serviceName)
This method returns the reference to the optional kernel service that matches the given service name.

Parameters:
serviceName - The name of the optional kernel service.
Returns:
Reference to the optional kernel service associated to the given name.

isCoreService

protected static final boolean isCoreService(java.lang.String serviceName)
Check if the specified service name is a core service.

Returns:
true if the service is one of:
  • Authentication
  • ClassLoader
  • Configuration
  • DataControl
  • Entitlement
  • Entity
  • EventMonitor
  • License
  • Log
  • Nugget

initLicensing

protected void initLicensing()
                      throws NiMRuntimeException
Throws:
NiMRuntimeException

hasLicenseToLoadNugget

public boolean hasLicenseToLoadNugget(java.lang.String s)
This method is used by the NiMKernel to check if the NiM application has the license to load the given Nugget.

Parameters:
s - nugget class name to load.
Returns:
true if the given license allows the NiM application to load the given Nugget otherwise it returns false.

checkIP

public boolean checkIP(java.lang.String ip)
Validates the IP of the host NiM is running on.

Parameters:
ip - String representation of valid IP in License.
Returns:
boolean true for valid, false otherwise.

checkHostName

public boolean checkHostName(java.lang.String hostName)
Validates the HostName of the host NiM is running on.

Parameters:
hostName - String representation of valid HostName in License.
Returns:
boolean true for valid, false otherwise.

checkExpiryDate

public boolean checkExpiryDate(java.lang.String expiryDate)
Validates the expiryDate of NiM.

Parameters:
expiryDate - String representation of NiM expiry date in License.
Returns:
boolean true for valid, false otherwise.

checkEarliestVersion

public boolean checkEarliestVersion(java.lang.String checkValue)
Validates the NiM's current version number is bigger or equals to the number specified in checkValue parameter. (i.e. compares the current version against the earliest version the license allows.)

Parameters:
checkValue - A string represents

checkLatestVersion

public boolean checkLatestVersion(java.lang.String checkValue)
Validates the NiM's current version number is smaller or equals to the number specified in checkValue parameter. (i.e. compares the current version against the latest version the license allows.)

Parameters:
checkValue - A string represents

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.