Package jmri.web.server
Class WebServerPreferences
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.beans.PreferencesBean
-
- jmri.web.server.WebServerPreferences
-
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,InstanceManagerAutoDefault
public class WebServerPreferences extends PreferencesBean implements InstanceManagerAutoDefault
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALLOW_REMOTE_CONFIG
static java.lang.String
CLICK_DELAY
static java.lang.String
DISABLE_FRAME_SERVER
static java.lang.String
DISALLOWED_FRAMES
static java.lang.String
FRAME
static java.lang.String
PORT
static java.lang.String
RAILROAD_NAME
static java.lang.String
READONLY_POWER
static java.lang.String
REDIRECT_FRAMES
static java.lang.String
REFRESH_DELAY
static java.lang.String
SIMPLE
static java.lang.String
USE_AJAX
static java.lang.String
USE_ZERO_CONF
static java.lang.String
WEB_SERVER_PREFERENCES
-
Fields inherited from class jmri.beans.PreferencesBean
DIRTY, RESTART_REQUIRED
-
Fields inherited from class jmri.beans.Bean
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description WebServerPreferences()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowRemoteConfig()
int
getClickDelay()
java.lang.String
getDefaultRailroadName()
Get the default railroad name.java.lang.String[]
getDisallowedFrames()
int
getPort()
java.lang.String
getRailroadName()
Get the name of the railroad.int
getRefreshDelay()
boolean
isDefaultRailroadName()
Test if the railroad name has been set by user.boolean
isDisableFrames()
boolean
isReadonlyPower()
Can the power state be set from web clients?boolean
isRedirectFramesToPanels()
Are requests for frames redirected to panels when frames are disabled?boolean
isSimple()
boolean
isUseAjax()
boolean
isUseZeroConf()
void
save()
void
setAllowRemoteConfig(boolean value)
void
setClickDelay(int value)
void
setDisableFrames(boolean disableFrames)
Set whether or not frames are returned when requests for frames are made from web pages.void
setDisallowedFrames(java.lang.String[] disallowedFrames)
void
setPort(int value)
void
setRailroadName(java.lang.String railroadName)
Set the railroad name.void
setReadonlyPower(boolean readonlyPower)
Set if the power state can be set from web clients.void
setRedirectFramesToPanels(boolean redirectFramesToPanels)
Set whether or not requests for frames should be redirected to panels when frames are disabled.void
setRefreshDelay(int value)
void
setSimple(boolean value)
void
setUseAjax(boolean useAjax)
void
setUseZeroConf(boolean value)
-
Methods inherited from class jmri.beans.PreferencesBean
firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getProfile, isDirty, isRestartRequired, setIsDirty, setRestartRequired
-
Methods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
-
-
-
Field Detail
-
DISALLOWED_FRAMES
public static final java.lang.String DISALLOWED_FRAMES
- See Also:
- Constant Field Values
-
WEB_SERVER_PREFERENCES
public static final java.lang.String WEB_SERVER_PREFERENCES
- See Also:
- Constant Field Values
-
FRAME
public static final java.lang.String FRAME
- See Also:
- Constant Field Values
-
PORT
public static final java.lang.String PORT
- See Also:
- Constant Field Values
-
CLICK_DELAY
public static final java.lang.String CLICK_DELAY
- See Also:
- Constant Field Values
-
REFRESH_DELAY
public static final java.lang.String REFRESH_DELAY
- See Also:
- Constant Field Values
-
USE_AJAX
public static final java.lang.String USE_AJAX
- See Also:
- Constant Field Values
-
SIMPLE
public static final java.lang.String SIMPLE
- See Also:
- Constant Field Values
-
RAILROAD_NAME
public static final java.lang.String RAILROAD_NAME
- See Also:
- Constant Field Values
-
ALLOW_REMOTE_CONFIG
public static final java.lang.String ALLOW_REMOTE_CONFIG
- See Also:
- Constant Field Values
-
READONLY_POWER
public static final java.lang.String READONLY_POWER
- See Also:
- Constant Field Values
-
DISABLE_FRAME_SERVER
public static final java.lang.String DISABLE_FRAME_SERVER
- See Also:
- Constant Field Values
-
REDIRECT_FRAMES
public static final java.lang.String REDIRECT_FRAMES
- See Also:
- Constant Field Values
-
USE_ZERO_CONF
public static final java.lang.String USE_ZERO_CONF
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebServerPreferences
public WebServerPreferences()
-
-
Method Detail
-
save
public void save()
-
getClickDelay
public int getClickDelay()
-
setClickDelay
public void setClickDelay(int value)
-
getRefreshDelay
public int getRefreshDelay()
-
setRefreshDelay
public void setRefreshDelay(int value)
-
getDisallowedFrames
public java.lang.String[] getDisallowedFrames()
-
isUseAjax
public boolean isUseAjax()
-
setUseAjax
public void setUseAjax(boolean useAjax)
-
isSimple
public boolean isSimple()
-
setSimple
public void setSimple(boolean value)
-
isUseZeroConf
public boolean isUseZeroConf()
-
setUseZeroConf
public void setUseZeroConf(boolean value)
-
allowRemoteConfig
public boolean allowRemoteConfig()
-
setAllowRemoteConfig
public void setAllowRemoteConfig(boolean value)
-
isReadonlyPower
public boolean isReadonlyPower()
Can the power state be set from web clients?- Returns:
- true if web clients are barred from setting power state; false if allowed
-
setReadonlyPower
public void setReadonlyPower(boolean readonlyPower)
Set if the power state can be set from web clients.- Parameters:
readonlyPower
- true to bar setting power from web clients; false to allow
-
setDisallowedFrames
public void setDisallowedFrames(java.lang.String[] disallowedFrames)
-
getPort
public int getPort()
-
setPort
public void setPort(int value)
-
getRailroadName
public java.lang.String getRailroadName()
Get the name of the railroad.- Returns:
- the railroad name
-
setRailroadName
public void setRailroadName(java.lang.String railroadName)
Set the railroad name.- Parameters:
railroadName
- the railroadName to set
-
isDefaultRailroadName
public boolean isDefaultRailroadName()
Test if the railroad name has been set by user.- Returns:
- true if user has not set the railroad name.
-
getDefaultRailroadName
public java.lang.String getDefaultRailroadName()
Get the default railroad name. This method exists solely to support unit testing.- Returns:
- The default railroad name
-
isDisableFrames
public boolean isDisableFrames()
- Returns:
- true if displaying frames in web pages is disabled, false otherwise
-
setDisableFrames
public void setDisableFrames(boolean disableFrames)
Set whether or not frames are returned when requests for frames are made from web pages.- Parameters:
disableFrames
- true to prevent frames from being displayed in web pages
-
isRedirectFramesToPanels
public boolean isRedirectFramesToPanels()
Are requests for frames redirected to panels when frames are disabled?- Returns:
- true if frames should be redirected to panels, false otherwise
-
setRedirectFramesToPanels
public void setRedirectFramesToPanels(boolean redirectFramesToPanels)
Set whether or not requests for frames should be redirected to panels when frames are disabled.- Parameters:
redirectFramesToPanels
- true if frames should be redirected to panels, false otherwise
-
-