|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.appinfo.AbstractInitAwareApplicationInfo
public abstract class AbstractInitAwareApplicationInfo
Abstract ApplicationInfo implementation with base mechanisms related to initlialization. Class should be extended by every ApplicationInfo implementation with initilization.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
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 | |
|---|---|
AbstractInitAwareApplicationInfo()
|
|
| Method Summary | |
|---|---|
String |
getBuildDate()
Returns creation date of current build. |
String |
getBuildNumber()
Returns current build number (np. |
String |
getName()
Returns application name. |
String |
getScmRevision()
Returns current SCM revision. |
String |
getVersion()
Returns application version. |
protected abstract void |
initClass()
Performs internal class initialization. |
void |
initInfo()
Starts initialization process of ApplicationInfo instance. |
boolean |
isInited()
Returns information if class is already initialized. |
protected void |
printErrorWithStackTrace(String errorMessage,
Exception exception)
Artificial construction logging given error message and stacktrace. |
protected void |
setBuildDate(String buildDate)
|
protected void |
setBuildNumber(String buildNumber)
|
protected void |
setName(String name)
|
protected void |
setScmRevision(String scmRevision)
|
protected void |
setVersion(String version)
|
void |
standaloneSafeInit()
Initializes applicationInfo in a safe way - no exception is thrown. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger log
| Constructor Detail |
|---|
public AbstractInitAwareApplicationInfo()
| Method Detail |
|---|
public boolean isInited()
isInited in interface InitAwareApplicationInfo
public final void initInfo()
throws InitializationException
initInfo in interface InitAwareApplicationInfoInitializationException - problem with initialization
protected abstract void initClass()
throws InitializationException
InitializationException - problem with initializationpublic void standaloneSafeInit()
protected void printErrorWithStackTrace(String errorMessage,
Exception exception)
errorMessage - error messageexception - exceptionpublic String getName()
ApplicationInfo
getName in interface ApplicationInfopublic String getVersion()
ApplicationInfo
getVersion in interface ApplicationInfopublic String getBuildNumber()
ApplicationInfo
getBuildNumber in interface ApplicationInfopublic String getBuildDate()
ApplicationInfo
getBuildDate in interface ApplicationInfopublic String getScmRevision()
ApplicationInfo
getScmRevision in interface ApplicationInfoprotected void setName(String name)
protected void setVersion(String version)
protected void setBuildNumber(String buildNumber)
protected void setBuildDate(String buildDate)
protected void setScmRevision(String scmRevision)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||