Class ClientSummary
java.lang.Object
com.perforce.p4java.impl.generic.core.ServerResource
com.perforce.p4java.impl.mapbased.client.ClientSummary
- All Implemented Interfaces:
IClientSummary,IServerResource
- Direct Known Subclasses:
Client
Default implementation class for the IClientSummary interface.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.perforce.p4java.client.IClientSummary
IClientSummary.ClientLineEnd, IClientSummary.IClientOptions, IClientSummary.IClientSubmitOptions -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Dateprotected Stringprotected Stringprotected Stringprotected IClientSummary.ClientLineEndprotected Stringprotected IClientSummary.IClientOptionsprotected Stringprotected Stringprotected Stringprotected Stringprotected intprotected IClientSummary.IClientSubmitOptionsprotected Stringprotected booleanprotected DateFields inherited from class com.perforce.p4java.impl.generic.core.ServerResource
refreshable, server, updateable -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ClientSummary(boolean summaryOnly) Construct a new ClientSummary object whose ServerResource fields depend on the passed-in summaryOnly parameter.ClientSummary(IClientSummary clientSummary) Clone a client summary by copying all fields.ClientSummary(String name, Date accessed, Date updated, String description, String hostName, String ownerName, String root, IClientSummary.ClientLineEnd lineEnd, IClientSummary.IClientOptions options, IClientSummary.IClientSubmitOptions submitOptions, List<String> alternateRoots) Explicit-value constructor.ClientSummary(String name, Date accessed, Date updated, String description, String hostName, String ownerName, String root, IClientSummary.ClientLineEnd lineEnd, IClientSummary.IClientOptions options, IClientSummary.IClientSubmitOptions submitOptions, List<String> alternateRoots, String stream, String type) Explicit-value constructor.ClientSummary(Map<String, Object> map, boolean summaryOnly) Server map constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the date this client was last used in any way.Get the alternate roots associated with this Perforce client, if any.Get the client's participation in backup enable/disable.Returns a short description of the Perforce server client.Returns the name of the associated host, if any.Get the line end options for this client.getName()Get the name of this client.Get the Perforce client options associated with this client.Get the name of the owner of this Perforce client.getRoot()Returns the root of this Perforce client.Get the server id associated with this client.Get the stream's path in a stream depot, of the form //depotname/streamname, to which this client's view will be dedicated.intGet the changelist id associated with this dynamically generated back-in-time stream client.Get the Perforce client changelist submit options associated with this client.getType()Get the client workspace type 'graph' for Graph supportGet the date the client's specification was last modified.booleanisStream()Convenience method to check if this is a stream clientbooleanReturn the "unloaded" status for this client.voidsetAccessed(Date accessed) Set the client's accessed date / time.voidsetAlternateRoots(List<String> alternateRoots) Set the alternate roots associated with this Perforce client.voidSet the client's participation in backup enable/disablevoidsetDescription(String description) Set the description associated with this client.voidsetHostName(String hostName) Set the name of the associated host.voidsetLineEnd(IClientSummary.ClientLineEnd lineEnd) Set the line end options for this client.voidSet the name of this client.voidsetOptions(IClientSummary.IClientOptions options) Set the client options associated with this client.voidsetOwnerName(String ownerName) Set the name of the owner of this client.voidSet the root of this client.voidsetServerId(String serverId) Set the server id of this client.voidSet the stream's path in a stream depot, of the form //depotname/streamname, to which this client's view will be dedicated.voidsetStreamAtChange(int streamAtChange) Set the changelist id associated with this dynamically generated back-in-time stream client.voidsetSubmitOptions(IClientSummary.IClientSubmitOptions submitOptions) Set the client submit options for this client.voidSet the client workspace type 'graph' for Graph supportvoidsetUpdated(Date updated) Set the client's updated date / time.Methods inherited from class com.perforce.p4java.impl.generic.core.ServerResource
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, parseDate, refresh, setRawField, setRawFields, setRefreshable, setServer, toDateString, update, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.perforce.p4java.core.IServerResource
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, refresh, setRawField, setRawFields, setServer, update, update, update
-
Field Details
-
name
-
accessed
-
updated
-
description
-
hostName
-
ownerName
-
root
-
lineEnd
-
options
-
submitOptions
-
alternateRoots
-
stream
-
serverId
-
streamAtChange
protected int streamAtChange -
unloaded
protected boolean unloaded -
type
-
backup
-
-
Constructor Details
-
ClientSummary
public ClientSummary()Default constructor. Sets all fields to null except lineEnd, which is set to ClientLineEnd.LOCAL. Sets ServerResource superclass fields to indicate complete and not refereshable or updateable. Intended mostly for use with "pure" ClientSummary objects. -
ClientSummary
public ClientSummary(boolean summaryOnly) Construct a new ClientSummary object whose ServerResource fields depend on the passed-in summaryOnly parameter. If summaryOnly is false, this object is complete, updateable, and refreshable; otherwise, it's complete and neither updateable nor refresheable. Intended mostly for use with extended ClientSummary objects such as the full Client class.- Parameters:
summaryOnly- summaryOnly
-
ClientSummary
Clone a client summary by copying all fields. If clientSummary is null, this is equivalent to calling the default constructor.- Parameters:
clientSummary- clientSummary
-
ClientSummary
Server map constructor. Attempts to construct a new ClientSummary object from the passed-in map, which is assumed to have come from a Perforce server in response to a client list command. If map is null, this is equivalent to calling the default constructor.Note that fields set here may be overridden in a full Client constructor, as the field keys and formats can be subtly (and not so subtly) different in maps returned from (say) getClientList() and getClient(). If summaryOnly is false, this map is assumed to be from a full client retrieval, meaning some of the fields retrieved in the full Client constructor are not set here. Otherwise, it attempts to retrieve all known ClientSummary fields.
- Parameters:
map- mapsummaryOnly- summaryOnly
-
ClientSummary
public ClientSummary(String name, Date accessed, Date updated, String description, String hostName, String ownerName, String root, IClientSummary.ClientLineEnd lineEnd, IClientSummary.IClientOptions options, IClientSummary.IClientSubmitOptions submitOptions, List<String> alternateRoots) Explicit-value constructor. Intended mostly for use with "pure" ClientSummary objects. Sets ServerResource superclass fields to indicate complete and neither refreshable nor updateable.- Parameters:
name- nameaccessed- accessedupdated- updateddescription- descriptionhostName- hostNameownerName- ownerNameroot- rootlineEnd- lineEndoptions- optionssubmitOptions- submitOptionsalternateRoots- alternateRoots
-
ClientSummary
public ClientSummary(String name, Date accessed, Date updated, String description, String hostName, String ownerName, String root, IClientSummary.ClientLineEnd lineEnd, IClientSummary.IClientOptions options, IClientSummary.IClientSubmitOptions submitOptions, List<String> alternateRoots, String stream, String type) Explicit-value constructor. Intended mostly for use with "pure" ClientSummary objects. Sets ServerResource superclass fields to indicate complete and neither refreshable nor updateable.- Parameters:
name- nameaccessed- accessedupdated- updateddescription- descriptionhostName- hostNameownerName- ownerNameroot- rootlineEnd- lineEndoptions- optionssubmitOptions- submitOptionsalternateRoots- alternateRootsstream- streamtype- type
-
-
Method Details
-
getAccessed
Description copied from interface:IClientSummaryGets the date this client was last used in any way. Note that this is a server-side date and does not reflect client-side usage.- Specified by:
getAccessedin interfaceIClientSummary- Returns:
- the date this client was last used in any way, or null if not known.
-
setAccessed
Description copied from interface:IClientSummarySet the client's accessed date / time.- Specified by:
setAccessedin interfaceIClientSummary- Parameters:
accessed- new accessed date.
-
getAlternateRoots
Description copied from interface:IClientSummaryGet the alternate roots associated with this Perforce client, if any.- Specified by:
getAlternateRootsin interfaceIClientSummary- Returns:
- list of alternate roots if they exist; null otherwise.
-
setAlternateRoots
Description copied from interface:IClientSummarySet the alternate roots associated with this Perforce client.- Specified by:
setAlternateRootsin interfaceIClientSummary- Parameters:
alternateRoots- new alternate roots list. Note that order within the list is significant.
-
getDescription
Description copied from interface:IClientSummaryReturns a short description of the Perforce server client.- Specified by:
getDescriptionin interfaceIClientSummary- Returns:
- the short description of the client, or null if no such description is available.
-
setDescription
Description copied from interface:IClientSummarySet the description associated with this client.- Specified by:
setDescriptionin interfaceIClientSummary- Parameters:
description- new description string.
-
getHostName
Description copied from interface:IClientSummaryReturns the name of the associated host, if any.- Specified by:
getHostNamein interfaceIClientSummary- Returns:
- the name of the associated host, if any; null otherwise.
-
setHostName
Description copied from interface:IClientSummarySet the name of the associated host.- Specified by:
setHostNamein interfaceIClientSummary- Parameters:
hostName- new host name.
-
getLineEnd
Description copied from interface:IClientSummaryGet the line end options for this client.- Specified by:
getLineEndin interfaceIClientSummary- Returns:
- ClientLineEnd representing the line end options for this client.
-
setLineEnd
Description copied from interface:IClientSummarySet the line end options for this client.- Specified by:
setLineEndin interfaceIClientSummary- Parameters:
lineEnd- ClientLineEnd representing the line end options for this client.
-
getName
Description copied from interface:IClientSummaryGet the name of this client.- Specified by:
getNamein interfaceIClientSummary- Returns:
- the name of this client, if set or known; null otherwise.
-
setName
Description copied from interface:IClientSummarySet the name of this client.- Specified by:
setNamein interfaceIClientSummary- Parameters:
name- new client name.
-
getOptions
Description copied from interface:IClientSummaryGet the Perforce client options associated with this client.- Specified by:
getOptionsin interfaceIClientSummary- Returns:
- non-null options
-
setOptions
Description copied from interface:IClientSummarySet the client options associated with this client.- Specified by:
setOptionsin interfaceIClientSummary- Parameters:
options- new options.
-
getOwnerName
Description copied from interface:IClientSummaryGet the name of the owner of this Perforce client.- Specified by:
getOwnerNamein interfaceIClientSummary- Returns:
- the name of the owner of this Perforce client, if known; null otherwise.
-
setOwnerName
Description copied from interface:IClientSummarySet the name of the owner of this client.- Specified by:
setOwnerNamein interfaceIClientSummary- Parameters:
ownerName- the name of the owner of this Perforce client.
-
getRoot
Description copied from interface:IClientSummaryReturns the root of this Perforce client.- Specified by:
getRootin interfaceIClientSummary- Returns:
- the root of this client, or null if no such root is available.
-
setRoot
Description copied from interface:IClientSummarySet the root of this client.- Specified by:
setRootin interfaceIClientSummary- Parameters:
root- new client root.
-
getServerId
Description copied from interface:IClientSummaryGet the server id associated with this client.- Specified by:
getServerIdin interfaceIClientSummary- Returns:
- the server id associated with this client, or null if this client has no associated server id.
-
setServerId
Description copied from interface:IClientSummarySet the server id of this client.- Specified by:
setServerIdin interfaceIClientSummary- Parameters:
serverId- new server id for this client.
-
getStream
Description copied from interface:IClientSummaryGet the stream's path in a stream depot, of the form //depotname/streamname, to which this client's view will be dedicated.- Specified by:
getStreamin interfaceIClientSummary- Returns:
- the stream's path in a stream depot of this client, or null if this is not a stream client.
-
setStream
Description copied from interface:IClientSummarySet the stream's path in a stream depot, of the form //depotname/streamname, to which this client's view will be dedicated.- Specified by:
setStreamin interfaceIClientSummary- Parameters:
stream- new stream's path in a stream depot of this client.
-
getStreamAtChange
public int getStreamAtChange()Description copied from interface:IClientSummaryGet the changelist id associated with this dynamically generated back-in-time stream client.- Specified by:
getStreamAtChangein interfaceIClientSummary- Returns:
- the changelist id associated with this dynamically generated back-in-time stream client, or IChangelist.UNKNOWN if this is not a dynamically generated back-in-time stream client.
-
setStreamAtChange
public void setStreamAtChange(int streamAtChange) Description copied from interface:IClientSummarySet the changelist id associated with this dynamically generated back-in-time stream client.- Specified by:
setStreamAtChangein interfaceIClientSummary- Parameters:
streamAtChange- new changelist id associated with this dynamically generated back-in-time stream client.
-
getSubmitOptions
Description copied from interface:IClientSummaryGet the Perforce client changelist submit options associated with this client.- Specified by:
getSubmitOptionsin interfaceIClientSummary- Returns:
- non-null changelist submit options
-
setSubmitOptions
Description copied from interface:IClientSummarySet the client submit options for this client.- Specified by:
setSubmitOptionsin interfaceIClientSummary- Parameters:
submitOptions- new client submit options.
-
getUpdated
Description copied from interface:IClientSummaryGet the date the client's specification was last modified.- Specified by:
getUpdatedin interfaceIClientSummary- Returns:
- the date the client's specification was last modified, or null if not known.
-
setUpdated
Description copied from interface:IClientSummarySet the client's updated date / time.- Specified by:
setUpdatedin interfaceIClientSummary- Parameters:
updated- new updated date.
-
isUnloaded
public boolean isUnloaded()Description copied from interface:IClientSummaryReturn the "unloaded" status for this client.- Specified by:
isUnloadedin interfaceIClientSummary- Returns:
- true iff the client is unloaded.
-
isStream
public boolean isStream()Description copied from interface:IClientSummaryConvenience method to check if this is a stream client- Specified by:
isStreamin interfaceIClientSummary- Returns:
- true, if stream
-
getType
Description copied from interface:IClientSummaryGet the client workspace type 'graph' for Graph support- Specified by:
getTypein interfaceIClientSummary- Returns:
- String representation of the type
-
setType
Description copied from interface:IClientSummarySet the client workspace type 'graph' for Graph support- Specified by:
setTypein interfaceIClientSummary- Parameters:
type- the type as a String
-
getBackup
Description copied from interface:IClientSummaryGet the client's participation in backup enable/disable. If not specified backup of a writable client defaults to enabled.- Specified by:
getBackupin interfaceIClientSummary- Returns:
- String representation of the type
-
setBackup
Description copied from interface:IClientSummarySet the client's participation in backup enable/disable- Specified by:
setBackupin interfaceIClientSummary- Parameters:
backup- enable/disable as a String
-