public class UpdateConfigAction extends AbstractManagerAction
GetConfigResponse
,
addCommand(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
ACTION_APPEND |
static String |
ACTION_DELCAT |
static String |
ACTION_DELETE |
static String |
ACTION_NEWCAT |
static String |
ACTION_RENAMECAT |
static String |
ACTION_UPDATE |
protected int |
actionCounter |
protected Map<String,String> |
actions |
protected String |
dstFilename |
protected String |
reload |
protected String |
srcFilename |
Constructor and Description |
---|
UpdateConfigAction()
Creates a new UpdateConfigAction.
|
UpdateConfigAction(String srcFilename,
String dstFilename,
boolean reload)
Creates a new UpdateConfigAction with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
addCommand(String action,
String cat,
String var,
String value,
String match)
Adds a command to update a config file while sparing you the details of
the Manager's required syntax.
|
String |
getAction()
Returns the name of this action, i.e.
|
Map<String,String> |
getAttributes()
Returns Map of the action's desired operations where Map keys contain:
action,cat,var,value,match pairs followed by -XXXXXX, and the Map values
contain the values for those keys.
|
String |
getDstFilename()
Returns the destination filename.
|
String |
getReload() |
String |
getSrcFilename()
Returns the source filename.
|
void |
setAttributes(Map<String,String> actions)
You may use this field to directly, programmatically add your own Map of
key,value pairs that you would like to send for this command.
|
void |
setDstFilename(String filename)
Sets the source filename.
|
void |
setReload(boolean reload)
Sets the reload behavior of this action.
|
void |
setReload(String reload)
Sets the reload behavior of this action, or sets a specific module to be
reloaded
|
void |
setSrcFilename(String filename)
Sets the source filename.
|
getActionId, setActionId, toString
public static final String ACTION_NEWCAT
public static final String ACTION_RENAMECAT
public static final String ACTION_DELCAT
public static final String ACTION_UPDATE
public static final String ACTION_DELETE
public static final String ACTION_APPEND
protected String srcFilename
protected String dstFilename
protected String reload
protected int actionCounter
public void addCommand(String action, String cat, String var, String value, String match)
action
- Action to Take
(NewCat,RenameCat,DelCat,Update,Delete,Append), see static
fieldscat
- Category to operate onvar
- Variable to work onvalue
- Value to work onmatch
- Extra match required to match linepublic String getAction()
getAction
in interface ManagerAction
getAction
in class AbstractManagerAction
public String getSrcFilename()
public void setSrcFilename(String filename)
public String getDstFilename()
public void setDstFilename(String filename)
public String getReload()
public void setReload(String reload)
reload
- the reload parameter to setsetReload(boolean)
public void setReload(boolean reload)
reload
- the reload parameter to setsetReload(String)
public Map<String,String> getAttributes()
addCommand(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void setAttributes(Map<String,String> actions)
actions
- the actions to setaddCommand(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
Copyright © 2004–2017. All rights reserved.