com.perforce.p4java.impl.mapbased.client
Class ClientSummary

java.lang.Object
  extended by com.perforce.p4java.impl.generic.core.ServerResource
      extended by com.perforce.p4java.impl.mapbased.client.ClientSummary
All Implemented Interfaces:
IClientSummary, IServerResource
Direct Known Subclasses:
Client

public class ClientSummary
extends ServerResource
implements IClientSummary

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
protected  Date accessed
           
protected  List<String> alternateRoots
           
protected  String description
           
protected  String hostName
           
protected  IClientSummary.ClientLineEnd lineEnd
           
protected  String name
           
protected  IClientSummary.IClientOptions options
           
protected  String ownerName
           
protected  String root
           
protected  String serverId
           
protected  String stream
           
protected  int streamAtChange
           
protected  IClientSummary.IClientSubmitOptions submitOptions
           
protected  boolean unloaded
           
protected  Date updated
           
 
Fields inherited from class com.perforce.p4java.impl.generic.core.ServerResource
refreshable, server, updateable
 
Constructor Summary
ClientSummary()
          Default 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(Map<String,Object> map, boolean summaryOnly)
          Server map 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)
          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)
          Explicit-value constructor.
 
Method Summary
 Date getAccessed()
          Gets the date this client was last used in any way.
 List<String> getAlternateRoots()
          Get the alternate roots associated with this Perforce client, if any.
 String getDescription()
          Returns a short description of the Perforce server client.
 String getHostName()
          Returns the name of the associated host, if any.
 IClientSummary.ClientLineEnd getLineEnd()
          Get the line end options for this client.
 String getName()
          Get the name of this client.
 IClientSummary.IClientOptions getOptions()
          Get the Perforce client options associated with this client.
 String getOwnerName()
          Get the name of the owner of this Perforce client.
 String getRoot()
          Returns the root of this Perforce client.
 String getServerId()
          Get the server id associated with this client.
 String getStream()
          Get the stream's path in a stream depot, of the form //depotname/streamname, to which this client's view will be dedicated.
 int getStreamAtChange()
          Get the changelist id associated with this dynamically generated back-in-time stream client.
 IClientSummary.IClientSubmitOptions getSubmitOptions()
          Get the Perforce client changelist submit options associated with this client.
 Date getUpdated()
          Get the date the client's specification was last modified.
 boolean isStream()
          Convenience method to check if this is a stream client
 boolean isUnloaded()
          Return the "unloaded" status for this client.
 void setAccessed(Date accessed)
          Set the client's accessed date / time.
 void setAlternateRoots(List<String> alternateRoots)
          Set the alternate roots associated with this Perforce client.
 void setDescription(String description)
          Set the description associated with this client.
 void setHostName(String hostName)
          Set the name of the associated host.
 void setLineEnd(IClientSummary.ClientLineEnd lineEnd)
          Set the line end options for this client.
 void setName(String name)
          Set the name of this client.
 void setOptions(IClientSummary.IClientOptions options)
          Set the client options associated with this client.
 void setOwnerName(String ownerName)
          Set the name of the owner of this client.
 void setRoot(String root)
          Set the root of this client.
 void setServerId(String serverId)
          Set the server id of this client.
 void setStream(String stream)
          Set the stream's path in a stream depot, of the form //depotname/streamname, to which this client's view will be dedicated.
 void setStreamAtChange(int streamAtChange)
          Set the changelist id associated with this dynamically generated back-in-time stream client.
 void setSubmitOptions(IClientSummary.IClientSubmitOptions submitOptions)
          Set the client submit options for this client.
 void setUpdated(Date updated)
          Set the client's updated date / time.
 
Methods inherited from class com.perforce.p4java.impl.generic.core.ServerResource
canRefresh, canUpdate, complete, refresh, setRefreshable, setServer, update, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.perforce.p4java.core.IServerResource
canRefresh, canUpdate, refresh, setServer, update, update, update
 

Field Detail

name

protected String name

accessed

protected Date accessed

updated

protected Date updated

description

protected String description

hostName

protected String hostName

ownerName

protected String ownerName

root

protected String root

lineEnd

protected IClientSummary.ClientLineEnd lineEnd

options

protected IClientSummary.IClientOptions options

submitOptions

protected IClientSummary.IClientSubmitOptions submitOptions

alternateRoots

protected List<String> alternateRoots

stream

protected String stream

serverId

protected String serverId

streamAtChange

protected int streamAtChange

unloaded

protected boolean unloaded
Constructor Detail

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.


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.


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)
Explicit-value constructor. Intended mostly for use with "pure" ClientSummary objects. Sets ServerResource superclass fields to indicate complete and neither refreshable nor updateable.


ClientSummary

public ClientSummary(IClientSummary clientSummary)
Clone a client summary by copying all fields. If clientSummary is null, this is equivalent to calling the default constructor.


ClientSummary

public ClientSummary(Map<String,Object> map,
                     boolean summaryOnly)
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.

Method Detail

getName

public String getName()
Description copied from interface: IClientSummary
Get the name of this client.

Specified by:
getName in interface IClientSummary
Returns:
the name of this client, if set or known; null otherwise.

setName

public void setName(String name)
Description copied from interface: IClientSummary
Set the name of this client.

Specified by:
setName in interface IClientSummary
Parameters:
name - new client name.

getAccessed

public Date getAccessed()
Description copied from interface: IClientSummary
Gets 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:
getAccessed in interface IClientSummary
Returns:
the date this client was last used in any way, or null if not known.

setAccessed

public void setAccessed(Date accessed)
Description copied from interface: IClientSummary
Set the client's accessed date / time.

Specified by:
setAccessed in interface IClientSummary
Parameters:
accessed - new accessed date.

getUpdated

public Date getUpdated()
Description copied from interface: IClientSummary
Get the date the client's specification was last modified.

Specified by:
getUpdated in interface IClientSummary
Returns:
the date the client's specification was last modified, or null if not known.

setUpdated

public void setUpdated(Date updated)
Description copied from interface: IClientSummary
Set the client's updated date / time.

Specified by:
setUpdated in interface IClientSummary
Parameters:
updated - new updated date.

getDescription

public String getDescription()
Description copied from interface: IClientSummary
Returns a short description of the Perforce server client.

Specified by:
getDescription in interface IClientSummary
Returns:
the short description of the client, or null if no such description is available.

setDescription

public void setDescription(String description)
Description copied from interface: IClientSummary
Set the description associated with this client.

Specified by:
setDescription in interface IClientSummary
Parameters:
description - new description string.

getHostName

public String getHostName()
Description copied from interface: IClientSummary
Returns the name of the associated host, if any.

Specified by:
getHostName in interface IClientSummary
Returns:
the name of the associated host, if any; null otherwise.

setHostName

public void setHostName(String hostName)
Description copied from interface: IClientSummary
Set the name of the associated host.

Specified by:
setHostName in interface IClientSummary
Parameters:
hostName - new host name.

getOwnerName

public String getOwnerName()
Description copied from interface: IClientSummary
Get the name of the owner of this Perforce client.

Specified by:
getOwnerName in interface IClientSummary
Returns:
the name of the owner of this Perforce client, if known; null otherwise.

setOwnerName

public void setOwnerName(String ownerName)
Description copied from interface: IClientSummary
Set the name of the owner of this client.

Specified by:
setOwnerName in interface IClientSummary
Parameters:
ownerName - the name of the owner of this Perforce client.

getRoot

public String getRoot()
Description copied from interface: IClientSummary
Returns the root of this Perforce client.

Specified by:
getRoot in interface IClientSummary
Returns:
the root of this client, or null if no such root is available.

setRoot

public void setRoot(String root)
Description copied from interface: IClientSummary
Set the root of this client.

Specified by:
setRoot in interface IClientSummary
Parameters:
root - new client root.

getLineEnd

public IClientSummary.ClientLineEnd getLineEnd()
Description copied from interface: IClientSummary
Get the line end options for this client.

Specified by:
getLineEnd in interface IClientSummary
Returns:
ClientLineEnd representing the line end options for this client.

setLineEnd

public void setLineEnd(IClientSummary.ClientLineEnd lineEnd)
Description copied from interface: IClientSummary
Set the line end options for this client.

Specified by:
setLineEnd in interface IClientSummary
Parameters:
lineEnd - ClientLineEnd representing the line end options for this client.

getOptions

public IClientSummary.IClientOptions getOptions()
Description copied from interface: IClientSummary
Get the Perforce client options associated with this client.

Specified by:
getOptions in interface IClientSummary
Returns:
non-null options

setOptions

public void setOptions(IClientSummary.IClientOptions options)
Description copied from interface: IClientSummary
Set the client options associated with this client.

Specified by:
setOptions in interface IClientSummary
Parameters:
options - new options.

getSubmitOptions

public IClientSummary.IClientSubmitOptions getSubmitOptions()
Description copied from interface: IClientSummary
Get the Perforce client changelist submit options associated with this client.

Specified by:
getSubmitOptions in interface IClientSummary
Returns:
non-null changelist submit options

setSubmitOptions

public void setSubmitOptions(IClientSummary.IClientSubmitOptions submitOptions)
Description copied from interface: IClientSummary
Set the client submit options for this client.

Specified by:
setSubmitOptions in interface IClientSummary
Parameters:
submitOptions - new client submit options.

getAlternateRoots

public List<String> getAlternateRoots()
Description copied from interface: IClientSummary
Get the alternate roots associated with this Perforce client, if any.

Specified by:
getAlternateRoots in interface IClientSummary
Returns:
list of alternate roots if they exist; null otherwise.

setAlternateRoots

public void setAlternateRoots(List<String> alternateRoots)
Description copied from interface: IClientSummary
Set the alternate roots associated with this Perforce client.

Specified by:
setAlternateRoots in interface IClientSummary
Parameters:
alternateRoots - new alternate roots list. Note that order within the list is significant.

getStream

public String getStream()
Description copied from interface: IClientSummary
Get the stream's path in a stream depot, of the form //depotname/streamname, to which this client's view will be dedicated.

Specified by:
getStream in interface IClientSummary
Returns:
the stream's path in a stream depot of this client, or null if this is not a stream client.

setStream

public void setStream(String stream)
Description copied from interface: IClientSummary
Set the stream's path in a stream depot, of the form //depotname/streamname, to which this client's view will be dedicated.

Specified by:
setStream in interface IClientSummary
Parameters:
stream - new stream's path in a stream depot of this client.

isStream

public boolean isStream()
Description copied from interface: IClientSummary
Convenience method to check if this is a stream client

Specified by:
isStream in interface IClientSummary
See Also:
IClientSummary.isStream()

getServerId

public String getServerId()
Description copied from interface: IClientSummary
Get the server id associated with this client.

Specified by:
getServerId in interface IClientSummary
Returns:
the server id associated with this client, or null if this client has no associated server id.

setServerId

public void setServerId(String serverId)
Description copied from interface: IClientSummary
Set the server id of this client.

Specified by:
setServerId in interface IClientSummary
Parameters:
serverId - new server id for this client.

getStreamAtChange

public int getStreamAtChange()
Description copied from interface: IClientSummary
Get the changelist id associated with this dynamically generated back-in-time stream client.

Specified by:
getStreamAtChange in interface IClientSummary
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: IClientSummary
Set the changelist id associated with this dynamically generated back-in-time stream client.

Specified by:
setStreamAtChange in interface IClientSummary
Parameters:
streamAtChange - new changelist id associated with this dynamically generated back-in-time stream client.

isUnloaded

public boolean isUnloaded()
Description copied from interface: IClientSummary
Return the "unloaded" status for this client.

Specified by:
isUnloaded in interface IClientSummary
Returns:
true iff the client is unloaded.
See Also:
IClientSummary.isUnloaded()


Copyright © 2015 Perforce Software. All Rights Reserved.