Class StateManager

java.lang.Object
com.jalios.jcms.ChannelListener
com.jalios.jcms.exploitation.state.StateManager
All Implemented Interfaces:
PluginComponent, JPropertiesListener, Comparable

public class StateManager extends ChannelListener implements JPropertiesListener
  • Method Details

    • initFromStartupProperties

      public void initFromStartupProperties()
    • getInstance

      public static StateManager getInstance()
    • getWebappPath

      public String getWebappPath()
    • setWebappPath

      public void setWebappPath(String webappPath)
    • getMessage

      public String getMessage()
    • setMessage

      public void setMessage(String message)
    • getProperty

      protected static String getProperty(String propertyName, String defaultValue)
    • getProperties

      protected static Map<String,String> getProperties(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 or channel.getProperty.

      Specified by:
      propertiesChange in interface JPropertiesListener
      Parameters:
      properties - the properties which have been submitted to change
    • getNotifiers

      public Collection<StateNotifier> getNotifiers()
      returns an unmodifiable collection of notifier, use addNotifier(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, 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()
    • handleFinalize

      public void handleFinalize()
      Description copied from class: ChannelListener
      Called when the channel is finalized
      Overrides:
      handleFinalize in class ChannelListener