Interface ILabelDelegator
- All Known Subinterfaces:
IOptionsServer,IServer,IStreamingServer
- All Known Implementing Classes:
LabelDelegator,NtsServerImpl,OneShotServerImpl,RpcServer,Server
public interface ILabelDelegator
Interface to handle the Label command.
-
Method Summary
Modifier and TypeMethodDescriptioncreateLabel(ILabel label) Create a new Perforce label in the Perforce server.deleteLabel(String labelName, boolean force) Delete a named Perforce label from the Perforce server.deleteLabel(String labelName, DeleteLabelOptions opts) Delete a named Perforce label from the Perforce server.Get a specific named Perforce label.updateLabel(ILabel label) Update an existing Perforce label in the Perforce server.
-
Method Details
-
getLabel
Get a specific named Perforce label.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.
- Parameters:
labelName- non-null label name- Returns:
- ILabel representing the associated Perforce label, or null if no such label exists on the server.
- Throws:
ConnectionException- 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 caller
-
createLabel
String createLabel(@Nonnull ILabel label) throws ConnectionException, RequestException, AccessException Create a new Perforce label in the Perforce server.- Parameters:
label- non-null ILabel to be saved- Returns:
- non-null result message string from the Perforce server; this may include form trigger output pre-pended and / or appended to the "normal" message.
- Throws:
ConnectionException- 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 caller
-
updateLabel
String updateLabel(@Nonnull ILabel label) throws ConnectionException, RequestException, AccessException Update an existing Perforce label in the Perforce server.- Parameters:
label- non-null ILabel to be updated- Returns:
- non-null result message string from the Perforce server; this may include form trigger output pre-pended and / or appended to the "normal" message.
- Throws:
ConnectionException- 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 caller
-
deleteLabel
String deleteLabel(String labelName, boolean force) throws ConnectionException, RequestException, AccessException Delete a named Perforce label from the Perforce server.- Parameters:
labelName- non-null label nameforce- if true, forces the deletion of any label; normally labels can only be deleted by their owner- Returns:
- non-null result message string from the Perforce server; this may include form trigger output pre-pended and / or appended to the "normal" message
- Throws:
ConnectionException- 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 caller
-
deleteLabel
Delete a named Perforce label from the Perforce server.- Parameters:
labelName- non-null label nameopts- DeleteLabelOptions object describing optional parameters; if null, no options are set.- Returns:
- non-null result message string from the Perforce server; this may include form trigger output pre-pended and / or appended to the "normal" message
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-