public class Services extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_INIT_START |
static java.lang.String |
ACTION_SET_ADVANCED_SETTINGS |
static java.lang.String |
ACTION_SET_PORT |
static java.lang.String |
ACTION_START
Textual representation of the actions available.
|
static java.lang.String |
ACTION_STOP |
static java.lang.String |
PARAM_ACTION
Textural representation of the params available.
|
static java.lang.String |
PARAM_INIT_START |
static java.lang.String |
PARAM_PORT |
static java.lang.String |
PARAM_SERVICE |
static java.lang.String |
queryRetrieveName |
static java.lang.String |
remoteGUIName |
static int |
RES_INVALID_ACTION |
static int |
RES_INVALID_ACTION_PARAMETER |
static int |
RES_INVALID_SERVICE_NAME |
static int |
RES_NO_ACTION
The results indicating what was wrong with a performAction call.
|
static int |
RES_NO_SERVICE_NAME |
static int |
RES_OK |
static int |
RES_WARNING |
static java.lang.String |
storageName
The embedded services name.
|
static int |
SVC_INIT_START |
static int |
SVC_NO_ACTION
Types of actions to perform.
|
static int |
SVC_SET_PORT |
static int |
SVC_SET_SETTINGS |
static int |
SVC_START |
static int |
SVC_STOP |
static java.lang.String |
webServerName |
static java.lang.String |
webServicesName |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHTMLAdvancedSettingsFormRow(java.lang.String name,
java.lang.Object value,
java.lang.String help)
Returns a row for the advanced settings form.
|
java.lang.String |
getHTMLServiceAdvancedSettingsForm(HttpServletRequest request,
java.lang.String brokerURL,
java.lang.String elementID)
Based on the request, returns a String containing a form with all the
settings inputs boxes.
|
java.lang.String |
getHTMLServiceManagementTable(java.lang.String brokerURL,
java.lang.String advancedOptionsManagerURL)
Deprecated.
|
java.lang.String |
getHTMLServiceManagementTable(java.lang.String brokerURL,
java.lang.String advancedOptionsManagerURL,
java.lang.String id)
Deprecated.
|
java.lang.String |
getHTMLSettingHelp(java.lang.String fieldTitle,
java.lang.String help) |
static Services |
getInstance()
Returns the current instance of this class.
|
java.lang.String |
getRequestServiceName(HttpServletRequest request)
For a request, returns the name of the service/plugin required.
|
int |
performAction(HttpServletRequest request)
Performs a certain action to a service or plugin, and save the settings
if needed.
|
int |
performAction(int action,
java.lang.String svcName,
boolean initStart,
int port,
java.util.HashMap<java.lang.String,java.lang.String[]> advSettings)
Deprecated.
|
java.util.HashMap<java.lang.String,java.lang.Object> |
processAdvancedSettings(java.util.HashMap<java.lang.String,java.lang.Object> originalSettings,
java.util.HashMap<java.lang.String,java.lang.String[]> newSettings)
This converts and applies the new textual values into the
originalSettings HashMap, taking into account their original class/type.
|
void |
processServletRequest(HttpServletRequest request,
HttpServletResponse response)
Processes a request from a servlet to perform an action on a service or
plugin.
|
int |
processWebappRequest(HttpServletRequest request,
HttpServletResponse response)
Processes a request from a webapp to perform an action on a service or
plugin.
|
int |
queryRetrievePort()
Returns the QueryRetrieve service port.
|
boolean |
queryRetrieveStart()
Return if the QueryRetrieve service is started initially.
|
java.lang.String |
remoteGUIExtIP()
Returns the RemoteGUI service external IP.
|
int |
remoteGUIPort()
Returns the RemoteGUI service port.
|
void |
saveSettings()
Saves the settings for use between server inits.
|
void |
setQueryRetrievePort(int port)
Sets the QueryRetrieve service port.
|
void |
setQueryRetrieveStart(boolean start)
Sets if the QueryRetrieve service is started initially.
|
void |
setRemoteGUIExtIP(java.lang.String extIP)
Sets the RemoteGUI service external IP.
|
void |
setRemoteGUIPort(int port)
Sets the RemoteGUI service port.
|
void |
setStoragePort(int port)
Sets the Storage service port.
|
void |
setStorageStart(boolean start)
Sets if the Storage service is started initially.
|
void |
setWebServerPort(int port)
Sets the WebServer service port.
|
void |
setWebServerStart(boolean start)
Sets if the WebServer service is started initially.
|
void |
setWebServicesPort(int port)
Sets the WebServices service port.
|
void |
setWebServicesStart(boolean start)
Sets if the WebServices service is started initially.
|
int |
storagePort()
Returns the Storage service port.
|
boolean |
storageStart()
Return if the Storage service is started initially.
|
int |
webServerPort()
Returns the WebServer service port.
|
boolean |
webServerStart()
Return if the WebServer service is started initially.
|
int |
webServicesPort()
Returns the WebServices service port.
|
boolean |
webServicesStart()
Return if the WebServices service is started initially.
|
public static final int SVC_NO_ACTION
public static final int SVC_START
public static final int SVC_STOP
public static final int SVC_INIT_START
public static final int SVC_SET_PORT
public static final int SVC_SET_SETTINGS
public static final java.lang.String ACTION_START
public static final java.lang.String ACTION_STOP
public static final java.lang.String ACTION_INIT_START
public static final java.lang.String ACTION_SET_PORT
public static final java.lang.String ACTION_SET_ADVANCED_SETTINGS
public static final java.lang.String PARAM_ACTION
public static final java.lang.String PARAM_SERVICE
public static final java.lang.String PARAM_INIT_START
public static final java.lang.String PARAM_PORT
public static final java.lang.String storageName
public static final java.lang.String queryRetrieveName
public static final java.lang.String webServicesName
public static final java.lang.String webServerName
public static final java.lang.String remoteGUIName
public static final int RES_NO_ACTION
public static final int RES_INVALID_ACTION
public static final int RES_NO_SERVICE_NAME
public static final int RES_INVALID_SERVICE_NAME
public static final int RES_INVALID_ACTION_PARAMETER
public static final int RES_WARNING
public static final int RES_OK
public static Services getInstance()
public java.util.HashMap<java.lang.String,java.lang.Object> processAdvancedSettings(java.util.HashMap<java.lang.String,java.lang.Object> originalSettings, java.util.HashMap<java.lang.String,java.lang.String[]> newSettings)
originalSettings
- the original advanced/internal settings of a
plugin or service.newSettings
- the new settings to apply.@Deprecated public int performAction(int action, java.lang.String svcName, boolean initStart, int port, java.util.HashMap<java.lang.String,java.lang.String[]> advSettings)
action
- the action to perform.svcName
- the name of the service or plugin to perform the action
at.initStart
- the init-start param value.port
- the set-port param value.advSettings
- a HashMap with all the advanced settings and their
values.public int performAction(HttpServletRequest request) throws java.io.UnsupportedEncodingException
request
- the request object.java.io.UnsupportedEncodingException
public void processServletRequest(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException
request
- the servlet request object.response
- the servlet response object.java.io.IOException
- if there was an error while attempting to perform the
requested action.public int processWebappRequest(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException
request
- the webapp request object.response
- the webapp response object.java.io.IOException
- if there was an error while attempting to perform the
requested action.@Deprecated public java.lang.String getHTMLServiceManagementTable(java.lang.String brokerURL, java.lang.String advancedOptionsManagerURL, java.lang.String id)
brokerURL
- the URL of the service manager page (where the form will
post data to).advancedOptionsManagerURL
- the URL of the plugin/service
advanced/internal options manager.id
- the ID of this HTML element, can be null if not needed.@Deprecated public java.lang.String getHTMLServiceManagementTable(java.lang.String brokerURL, java.lang.String advancedOptionsManagerURL)
brokerURL
- the URL of the service manager page (where the form will
post data to).advancedOptionsManagerURL
- the URL of the plugin/service
advanced/internal options manager.public boolean storageStart()
public boolean queryRetrieveStart()
public boolean webServicesStart()
public boolean webServerStart()
public void setStorageStart(boolean start)
start
- if the Storage service is started initially.public void setQueryRetrieveStart(boolean start)
start
- if the QueryRetrieve service is started initially.public void setWebServicesStart(boolean start)
start
- if the WebServices service is started initially.public void setWebServerStart(boolean start)
start
- if the WebServer service is started initially.public int storagePort()
public int queryRetrievePort()
public int webServicesPort()
public int webServerPort()
public int remoteGUIPort()
public java.lang.String remoteGUIExtIP()
public void setStoragePort(int port)
port
- the Storage service port.public void setQueryRetrievePort(int port)
port
- the QueryRetrieve service port.public void setWebServicesPort(int port)
port
- the WebServices service port.public void setWebServerPort(int port)
port
- the WebServer service port.public void setRemoteGUIPort(int port)
port
- the RemoteGUI service port.public void setRemoteGUIExtIP(java.lang.String extIP)
extIP
- the RemoteGUI service external IP.public void saveSettings()
public java.lang.String getRequestServiceName(HttpServletRequest request) throws java.io.IOException
request
- the servlet request object.java.io.IOException
public java.lang.String getHTMLSettingHelp(java.lang.String fieldTitle, java.lang.String help)
public java.lang.String getHTMLAdvancedSettingsFormRow(java.lang.String name, java.lang.Object value, java.lang.String help)
name
- the name of the setting.value
- the type/value of the setting.help
- s String containing a help notice for this setting, can be
null if not needed.public java.lang.String getHTMLServiceAdvancedSettingsForm(HttpServletRequest request, java.lang.String brokerURL, java.lang.String elementID) throws java.io.IOException
request
- the servlet request object.brokerURL
- the URL of the broker that will apply the settings after
receiving this forms post.elementID
- the ID of this HTML form, can be null.java.io.IOException