Class ConfigureDelegator
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
-
- com.perforce.p4java.impl.mapbased.server.cmd.ConfigureDelegator
-
- All Implemented Interfaces:
IConfigureDelegator
public class ConfigureDelegator extends BaseDelegator implements IConfigureDelegator
Handles configure commands.
-
-
Field Summary
-
Fields inherited from class com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
-
-
Constructor Summary
Constructors Constructor Description ConfigureDelegator(IOptionsServer server)Instantiates a new configure delegator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringsetOrUnsetServerConfigurationValue(java.lang.String name, java.lang.String value)Set or unset a specific names server configuration variable.java.util.List<ServerConfigurationValue>showServerConfiguration(java.lang.String serverName, java.lang.String variableName)Show server configuration values.
-
-
-
Constructor Detail
-
ConfigureDelegator
public ConfigureDelegator(IOptionsServer server)
Instantiates a new configure delegator.- Parameters:
server- the server
-
-
Method Detail
-
setOrUnsetServerConfigurationValue
public java.lang.String setOrUnsetServerConfigurationValue(@Nonnull java.lang.String name, @Nullable java.lang.String value) throws P4JavaExceptionDescription copied from interface:IConfigureDelegatorSet or unset a specific names server configuration variable. Config variables are unset by passing in a null value parameter.Expected variable name formats are as specified in the main Perforce documentation: [servername + #] variablename -- but this is not enforced by P4Java itself.
Note: you must be an admin or super user for this command to work.
- Specified by:
setOrUnsetServerConfigurationValuein interfaceIConfigureDelegator- Parameters:
name- non-null config variable name.value- if null, unset the named variable; otherwise, set it to the passed-in string value.- Returns:
- possibly-empty operation status string returned by the server in response to this set / unset attempt.
- Throws:
P4JavaException- if an error occurs processing this method and its parameters.
-
showServerConfiguration
public java.util.List<ServerConfigurationValue> showServerConfiguration(java.lang.String serverName, java.lang.String variableName) throws P4JavaException
Description copied from interface:IConfigureDelegatorShow server configuration values. See the main Perforce documentation for the details of this admin command, but note that only one of serverName or variableName should be non-null (they can both be null, which means ignore them both). If they're both null, serverName currently takes precedence, but that's not guaranteed.Note: you must be an admin or super user for this command to work.
- Specified by:
showServerConfigurationin interfaceIConfigureDelegator- Parameters:
serverName- if not null, only show values associated with the named server; if equals ServerConfigurationValue.ALL_SERVERS, show values associated with all participating servers.variableName- if not null, only show the value of this named config variable.- Returns:
- non-null (but possibly-empty) list of qualifying ServerConfigurationValue objects.
- Throws:
P4JavaException- if an error occurs processing this method and its parameters.
-
-