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 class
StateManager.JPlatformState
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StateManager
addNotifier(StateNotifier stateNotifier)
static StateManager
getInstance()
java.lang.String
getMessage()
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.String
getProperty(java.lang.String propertyName, java.lang.String defaultValue)
StateManager.JPlatformState
getState()
java.lang.String
getWebappPath()
void
init()
boolean
isAlive()
boolean
isError()
boolean
isReady()
boolean
isStartup()
boolean
isUnknown()
void
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.StateManager
removeNotifier(StateNotifier stateNotifier)
void
setMessage(java.lang.String message)
StateManager
setState(StateManager.JPlatformState state, java.lang.String message)
void
setWebappPath(java.lang.String webappPath)
void
shutdown()
-
-
-
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:JPropertiesListener
Invoked 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.getProperties
orchannel.getProperty
.- Specified by:
propertiesChange
in 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()
-
-