public interface ILabel extends ILabelSummary
ILabel objects are complete and updateable only if they come from the IServer.getLabel() method (or are hand-crafted); label objects from other sources are not complete or completable, and nor are they refreshable. Setter methods defined below affect only local values unless a suitable update is done.
Modifier and Type | Method and Description |
---|---|
IServer |
getServer()
Get the Perforce server object associated with this label.
|
ViewMap<ILabelMapping> |
getViewMapping()
Get the view mapping for this label.
|
void |
setServer(IServer server)
Set the Perforce server object associated with this label.
|
void |
setViewMapping(ViewMap<ILabelMapping> viewMapping)
Set the view mapping for this label.
|
void |
update()
Update (or even create) this label on the associated Perforce server,
if that server has been set for this label.
|
java.lang.String |
updateOnServer()
Deprecated.
use update() instead.
|
getDescription, getLastAccess, getLastUpdate, getName, getOwnerName, getRevisionSpec, isAutoReload, isLocked, isUnloaded, setAutoReload, setDescription, setLastAccess, setLastUpdate, setLocked, setName, setOwnerName, setRevisionSpec
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, refresh, setRawField, setRawFields, update, update
ViewMap<ILabelMapping> getViewMapping()
Note also that this method will only return the actual view mapping a label if the label object was returned from the IServer's getLabel() method (this is due to limitations in the underlying implementation).
void setViewMapping(ViewMap<ILabelMapping> viewMapping)
viewMapping
- list of IClientViewMapping mappings for this label.java.lang.String updateOnServer() throws ConnectionException, RequestException, AccessException
Note that you should only call this method on "full" labels, i.e. those returned from an explicit single call to IServer.getLabel() or those created by hand; calling this on a label returned from the getLabelList() method may cause the associated in-server label to lose its view mapping.
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 callervoid update() throws ConnectionException, RequestException, AccessException
Note that you should only call this method on complete labels, i.e. those returned from an explicit single call to IServer.getLabel() or those created by hand; calling this on a label returned from the getLabelList() method will result in a UnimplementedError being thrown.
update
in interface IServerResource
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 callerIServer getServer()
void setServer(IServer server)
setServer
in interface IServerResource
server
- possibly-null IServer object to be associated with this label.