public class PropertyDelegator extends BaseDelegator implements IPropertyDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
Constructor and Description |
---|
PropertyDelegator(IOptionsServer server)
Instantiate a new PropertyDelegator, providing the server object that will be used to
execute Perforce Helix attribute commands.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
deleteProperty(java.lang.String name,
PropertyOptions opts)
Deletes a property value from the Perforce server.
|
java.util.List<IProperty> |
getProperty(GetPropertyOptions opts)
Gets a list of one or more property values from the Perforce server.
|
java.lang.String |
setProperty(java.lang.String name,
java.lang.String value,
PropertyOptions opts)
Updates a property value in the Perforce server, or adds the property
value to the Perforce server if it is not yet there.
|
public PropertyDelegator(IOptionsServer server)
server
- a concrete implementation of a Perforce Helix Serverpublic java.lang.String setProperty(java.lang.String name, java.lang.String value, PropertyOptions opts) throws P4JavaException
IPropertyDelegator
This method require that the user have 'admin' access granted by 'p4 protect'.
setProperty
in interface IPropertyDelegator
name
- non-null property name.value
- property value.opts
- PropertyOptions object describing optional parameters; if
null, no options are set.P4JavaException
- if an error occurs processing this method and its parameters.public java.util.List<IProperty> getProperty(GetPropertyOptions opts) throws P4JavaException
IPropertyDelegator
The -A flag require that the user have 'admin' access granted by 'p4 protect'.
Note that specifying the -n flag when using the -l flag substantially improves the performance of this command.
getProperty
in interface IPropertyDelegator
opts
- GetPropertyOptions object describing optional parameters; if
null, no options are set.P4JavaException
- if an error occurs processing this method and its parameters.public java.lang.String deleteProperty(java.lang.String name, PropertyOptions opts) throws P4JavaException
IPropertyDelegator
This method require that the user have 'admin' access granted by 'p4 protect'.
deleteProperty
in interface IPropertyDelegator
name
- non-null property name.opts
- PropertyOptions object describing optional parameters; if
null, no options are set.P4JavaException
- if an error occurs processing this method and its parameters.