net.sf.appinfo
Class ChainedApplicationInfo

java.lang.Object
  extended by net.sf.appinfo.AbstractInitAwareApplicationInfo
      extended by net.sf.appinfo.ChainedApplicationInfo
All Implemented Interfaces:
ApplicationInfo, InitAwareApplicationInfo

public class ChainedApplicationInfo
extends AbstractInitAwareApplicationInfo

ApplicationInfo implementation which can use the first initialized ApplicationInfo in a chain. Class intended to be directly used in application. It collects one or more ApplicationInfo objects in a chain and returns data from the first initialized (or able to initialize). The first in a chain could be a ApplicationInfo object which reads data from manifest file in JAR/WAR. Later instance using default application info given is static artifical manifest file placed in resources for use in development versions run from IDE. To be at the end of a chain FallbackApplicationInfo class was designed. Its initialization cannot fail nad therefor there is no risk to prevent IoC context from start. There is a default appInfo's Spring bean configuration in resources (appInfoDefaultContext.xml). It can be add to application's Spring conext configuration. More information is placed inside xml.

Since:
0.4.0
Author:
Marcin ZajÄ…czkowski, 2010-10-08
See Also:
AbstractInitAwareApplicationInfo, InitAwareApplicationInfo, FallbackApplicationInfo

Field Summary
protected  org.slf4j.Logger logger
           
 
Fields inherited from class net.sf.appinfo.AbstractInitAwareApplicationInfo
log
 
Fields inherited from interface net.sf.appinfo.InitAwareApplicationInfo
DEFAULT_NOT_INITED
 
Fields inherited from interface net.sf.appinfo.ApplicationInfo
DEFAULT_BUILD_DATE, DEFAULT_BUILD_NUMBER, DEFAULT_NAME, DEFAULT_SCM_REVISION, DEFAULT_VERSION
 
Constructor Summary
ChainedApplicationInfo(InitAwareApplicationInfo... appInfos)
           
 
Method Summary
protected  void initClass()
          Performs internal class initialization.
 
Methods inherited from class net.sf.appinfo.AbstractInitAwareApplicationInfo
getBuildDate, getBuildNumber, getName, getScmRevision, getVersion, initInfo, isInited, printErrorWithStackTrace, setBuildDate, setBuildNumber, setName, setScmRevision, setVersion, standaloneSafeInit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger
Constructor Detail

ChainedApplicationInfo

public ChainedApplicationInfo(InitAwareApplicationInfo... appInfos)
Method Detail

initClass

protected void initClass()
                  throws InitializationException
Performs internal class initialization. Has to be implemented in every subclass.

Specified by:
initClass in class AbstractInitAwareApplicationInfo
Throws:
InitializationException - problem with initialization


Copyright © 2010-2011. All Rights Reserved.