Class StateManager
- java.lang.Object
-
- com.jalios.jcms.exploitation.state.StateManager
-
- All Implemented Interfaces:
JPropertiesListener
public class StateManager extends java.lang.Object implements JPropertiesListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStateManager.JPlatformState
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StateManageraddNotifier(StateNotifier stateNotifier)static StateManagergetInstance()java.lang.StringgetMessage()java.util.Collection<StateNotifier>getNotifiers()returns an unmodifiable collection of notifier, useaddNotifier(StateNotifier)/removeNotifier(StateNotifier)methods to update itprotected static java.util.Map<java.lang.String,java.lang.String>getProperties(java.lang.String propertyPrefix)protected static java.lang.StringgetProperty(java.lang.String propertyName, java.lang.String defaultValue)StateManager.JPlatformStategetState()java.lang.StringgetWebappPath()voidinit()booleanisAlive()booleanisError()booleanisReady()booleanisStartup()booleanisUnknown()voidpropertiesChange(JProperties properties)Invoked after properties have been modified in JCMS and save on disk.StateManagerremoveNotifier(StateNotifier stateNotifier)voidsetMessage(java.lang.String message)StateManagersetState(StateManager.JPlatformState state, java.lang.String message)voidsetWebappPath(java.lang.String webappPath)voidshutdown()
-
-
-
Method Detail
-
getInstance
public static StateManager getInstance()
-
getWebappPath
public java.lang.String getWebappPath()
-
setWebappPath
public void setWebappPath(java.lang.String webappPath)
-
getMessage
public java.lang.String getMessage()
-
setMessage
public void setMessage(java.lang.String message)
-
getProperty
protected static java.lang.String getProperty(java.lang.String propertyName, java.lang.String defaultValue)
-
getProperties
protected static java.util.Map<java.lang.String,java.lang.String> getProperties(java.lang.String propertyPrefix)
-
propertiesChange
public void propertiesChange(JProperties properties)
Description copied from interface:JPropertiesListenerInvoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getPropertiesorchannel.getProperty.- Specified by:
propertiesChangein interfaceJPropertiesListener- Parameters:
properties- the properties which have been submitted to change
-
getNotifiers
public java.util.Collection<StateNotifier> getNotifiers()
returns an unmodifiable collection of notifier, useaddNotifier(StateNotifier)/removeNotifier(StateNotifier)methods to update it- Returns:
- an unmodifiable collection of notifier
-
removeNotifier
public StateManager removeNotifier(StateNotifier stateNotifier)
-
addNotifier
public StateManager addNotifier(StateNotifier stateNotifier)
-
setState
public StateManager setState(StateManager.JPlatformState state, java.lang.String message)
-
getState
public StateManager.JPlatformState getState()
-
isError
public boolean isError()
-
isStartup
public boolean isStartup()
-
isAlive
public boolean isAlive()
-
isReady
public boolean isReady()
-
isUnknown
public boolean isUnknown()
-
init
public void init()
-
shutdown
public void shutdown()
-
-