Class PropertyDelegator
java.lang.Object
com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
com.perforce.p4java.impl.mapbased.server.cmd.PropertyDelegator
- All Implemented Interfaces:
IPropertyDelegator
Implementation to handle the Property command.
-
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
ConstructorsConstructorDescriptionPropertyDelegator(IOptionsServer server) Instantiate a new PropertyDelegator, providing the server object that will be used to execute Perforce Helix attribute commands. -
Method Summary
Modifier and TypeMethodDescriptiondeleteProperty(String name, PropertyOptions opts) Deletes a property value from the Perforce server.Gets a list of one or more property values from the Perforce server.setProperty(String name, 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.
-
Constructor Details
-
PropertyDelegator
Instantiate a new PropertyDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.- Parameters:
server- a concrete implementation of a Perforce Helix Server
-
-
Method Details
-
setProperty
Description copied from interface:IPropertyDelegatorUpdates a property value in the Perforce server, or adds the property value to the Perforce server if it is not yet there.This method require that the user have 'admin' access granted by 'p4 protect'.
- Specified by:
setPropertyin interfaceIPropertyDelegator- Parameters:
name- non-null property name.value- property value.opts- PropertyOptions object describing optional parameters; if null, no options are set.- Returns:
- non-null result message string from the set (add/update) operation.
- Throws:
P4JavaException- if an error occurs processing this method and its parameters.
-
getProperty
Description copied from interface:IPropertyDelegatorGets a list of one or more property values from the Perforce server.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.
- Specified by:
getPropertyin interfaceIPropertyDelegator- Parameters:
opts- GetPropertyOptions object describing optional parameters; if null, no options are set.- Returns:
- a non-null (but possibly empty) list of property values.
- Throws:
P4JavaException- if an error occurs processing this method and its parameters.
-
deleteProperty
Description copied from interface:IPropertyDelegatorDeletes a property value from the Perforce server.This method require that the user have 'admin' access granted by 'p4 protect'.
- Specified by:
deletePropertyin interfaceIPropertyDelegator- Parameters:
name- non-null property name.opts- PropertyOptions object describing optional parameters; if null, no options are set.- Returns:
- non-null result message string from the delete operation.
- Throws:
P4JavaException- if an error occurs processing this method and its parameters.
-