com.ail.core
Class NullService

java.lang.Object
  extended by com.ail.core.Type
      extended by com.ail.core.Service
          extended by com.ail.core.NullService
All Implemented Interfaces:
ConfigurationOwner, CoreUser, java.io.Serializable, java.lang.Cloneable

public class NullService
extends Service

This entry point does nothing. It is intended to be use in place of a real entry point when either one has to be configured, but no functionality is required, or as a placeholder when the real entry point isn't yet ready.

Version:
$Revision: 1.2 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ail.core.Type
jXPathContext, NOT_PERSISTED
 
Constructor Summary
NullService()
           
 
Method Summary
 CommandArg getArgs()
          Get the arguments used by this entry point.
 Configuration getConfiguration()
          Default entry point implementation of the getConfiguration method.
 java.lang.String getConfigurationNamespace()
          Default entry point implementation of the getConfigurationNamespace method.
 Core getCore()
          This entry point has no Core requirements, so simply return null.
 Version getVersion()
          Return the version details of this entry point.
 VersionEffectiveDate getVersionEffectiveDate()
          A default entry point implemention returning the version effective date.
 void invoke()
          Invoke the entry point's business logic.
 void resetConfiguration()
          Default entry point implementation of the resetConfiguration method.
 void setArgs(CommandArg args)
          Set the arguments to be used by this entry point's business logic.
 void setConfiguration(Configuration configuration)
          Default entry point implementation of the setConfiguration method.
 
Methods inherited from class com.ail.core.Service
getSecurityPrincipal
 
Methods inherited from class com.ail.core.Type
addAttribute, clone, deleteLock, deleteSerialVersion, fetchJXPathContext, getAttribute, getAttribute, getAttributeCount, getForeignSystemId, getLock, getSerialVersion, getSystemId, hasLock, hasSerialVersion, hasSystemId, isPersisted, markAsNotPersisted, mergeWithDataFrom, removeAttribute, removeAttribute, setAttribute, setForeignSystemId, setLock, setSerialVersion, setSystemId, xpathGet, xpathGet, xpathIterate, xpathSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullService

public NullService()
Method Detail

getVersion

public Version getVersion()
Return the version details of this entry point.

Specified by:
getVersion in class Service
Returns:
Version specification

invoke

public void invoke()
Description copied from class: Service
Invoke the entry point's business logic. This is the core of the entry point. Before this method is called, setArgs() will have been called to supply the entry point with the arguments it will process. After invoke() has been called, getArgs() will be called to retrieve the results.

Specified by:
invoke in class Service

getCore

public Core getCore()
This entry point has no Core requirements, so simply return null.

Specified by:
getCore in class Service
Returns:
null

setArgs

public void setArgs(CommandArg args)
Description copied from class: Service
Set the arguments to be used by this entry point's business logic.

Specified by:
setArgs in class Service
Parameters:
args - Arguments for the entry point to process.

getArgs

public CommandArg getArgs()
Description copied from class: Service
Get the arguments used by this entry point. "Arguments" in this context are both the objects passed into the entry point, and the objects returned by it. The entry point user will call getArgs() to retrieve the entry points results.

Specified by:
getArgs in class Service
Returns:
The results of executing the entry point.

setConfiguration

public void setConfiguration(Configuration configuration)
Description copied from class: Service
Default entry point implementation of the setConfiguration method. This method takes care of saving configrations on the behalf of the entry point.

Specified by:
setConfiguration in interface ConfigurationOwner
Overrides:
setConfiguration in class Service
Parameters:
configuration - The configuration to save.

getVersionEffectiveDate

public VersionEffectiveDate getVersionEffectiveDate()
Description copied from class: Service
A default entry point implemention returning the version effective date. Entry points with a critical dependency on selecting the version effective date should override this method. The default behaviour is to use the version effective date from the CallersCore supplied in the Args passed to the service. If that is null, then the date now is used.

Specified by:
getVersionEffectiveDate in interface CoreUser
Overrides:
getVersionEffectiveDate in class Service
Returns:
Date date to use.

getConfiguration

public Configuration getConfiguration()
Description copied from class: Service
Default entry point implementation of the getConfiguration method. This method takes care of loading configurations on the behalf of the entry point.

Specified by:
getConfiguration in interface ConfigurationOwner
Overrides:
getConfiguration in class Service
Returns:
The loaded configuration.

getConfigurationNamespace

public java.lang.String getConfigurationNamespace()
Description copied from class: Service
Default entry point implementation of the getConfigurationNamespace method. The name of the entry point class is returned.

Specified by:
getConfigurationNamespace in interface CoreUser
Overrides:
getConfigurationNamespace in class Service
Returns:
The classes namespace

resetConfiguration

public void resetConfiguration()
Description copied from class: Service
Default entry point implementation of the resetConfiguration method. This implementation loads the default config from the class resource file named "DefaultConfig.xml". For an entry point named 'RedService', the resource 'RedDefaultConfig.xml' is loaded.

Specified by:
resetConfiguration in interface ConfigurationOwner
Overrides:
resetConfiguration in class Service