public class LabelDelegator extends BaseDelegator implements ILabelDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION| Constructor and Description |
|---|
LabelDelegator(IOptionsServer server)
Instantiate a new LabelDelegator, providing the server object that will be used to
execute Perforce Helix attribute commands.
|
| Modifier and Type | Method and Description |
|---|---|
String |
createLabel(ILabel label)
Create a new Perforce label in the Perforce server.
|
String |
deleteLabel(String labelName,
boolean force)
Delete a named Perforce label from the Perforce server.
|
String |
deleteLabel(String labelName,
DeleteLabelOptions opts)
Delete a named Perforce label from the Perforce server.
|
ILabel |
getLabel(String labelName)
Get a specific named Perforce label.
|
String |
updateLabel(ILabel label)
Update an existing Perforce label in the Perforce server.
|
public LabelDelegator(IOptionsServer server)
server - a concrete implementation of a Perforce Helix Serverpublic ILabel getLabel(String labelName) throws ConnectionException, RequestException, AccessException
ILabelDelegator
Unlike the getLabelList method, the getViewMapping method on the returned label will be valid. Note though that changes to the returned label or its view will not be reflected on to the server unless the updateLabel method is called with the label as an argument.
getLabel in interface ILabelDelegatorlabelName - non-null label nameConnectionException - if the Perforce server is unreachable or is not connected.RequestException - if the Perforce server encounters an error during its
processing of the requestAccessException - if the Perforce server denies access to the callerpublic String createLabel(ILabel label) throws ConnectionException, RequestException, AccessException
ILabelDelegatorcreateLabel in interface ILabelDelegatorlabel - non-null ILabel to be savedConnectionException - if the Perforce server is unreachable or is not connected.RequestException - if the Perforce server encounters an error during its
processing of the requestAccessException - if the Perforce server denies access to the callerpublic String updateLabel(ILabel label) throws ConnectionException, RequestException, AccessException
ILabelDelegatorupdateLabel in interface ILabelDelegatorlabel - non-null ILabel to be updatedConnectionException - if the Perforce server is unreachable or is not connected.RequestException - if the Perforce server encounters an error during its
processing of the requestAccessException - if the Perforce server denies access to the callerpublic String deleteLabel(String labelName, boolean force) throws ConnectionException, RequestException, AccessException
ILabelDelegatordeleteLabel in interface ILabelDelegatorlabelName - non-null label nameforce - if true, forces the deletion of any label; normally labels can
only be deleted by their ownerConnectionException - if the Perforce server is unreachable or is not connected.RequestException - if the Perforce server encounters an error during its
processing of the requestAccessException - if the Perforce server denies access to the callerpublic String deleteLabel(String labelName, DeleteLabelOptions opts) throws P4JavaException
ILabelDelegatordeleteLabel in interface ILabelDelegatorlabelName - non-null label nameopts - DeleteLabelOptions object describing optional parameters; if
null, no options are set.P4JavaException - if any error occurs in the processing of this method.Copyright © 2017 Perforce Software. All Rights Reserved.