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  java.util.Date accessed
           
protected  java.util.List<java.lang.String> alternateRoots
           
protected  java.lang.String description
           
protected  java.lang.String hostName
           
protected  IClientSummary.ClientLineEnd lineEnd
           
protected  java.lang.String name
           
protected  IClientSummary.IClientOptions options
           
protected  java.lang.String ownerName
           
protected  java.lang.String root
           
protected  IClientSummary.IClientSubmitOptions submitOptions
           
protected  java.util.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(java.util.Map<java.lang.String,java.lang.Object> map, boolean summaryOnly)
          Server map constructor.
ClientSummary(java.lang.String name, java.util.Date accessed, java.util.Date updated, java.lang.String description, java.lang.String hostName, java.lang.String ownerName, java.lang.String root, IClientSummary.ClientLineEnd lineEnd, IClientSummary.IClientOptions options, IClientSummary.IClientSubmitOptions submitOptions, java.util.List<java.lang.String> alternateRoots)
          Explicit-value constructor.
 
Method Summary
 java.util.Date getAccessed()
          Gets the date this client was last used in any way.
 java.util.List<java.lang.String> getAlternateRoots()
          Get the alternate roots associated with this Perforce client, if any.
 java.lang.String getDescription()
          Returns a short description of the Perforce server client.
 java.lang.String getHostName()
          Returns the name of the associated host, if any.
 IClientSummary.ClientLineEnd getLineEnd()
          Get the line end options for this client.
 java.lang.String getName()
          Get the name of this client.
 IClientSummary.IClientOptions getOptions()
          Get the Perforce client options associated with this client.
 java.lang.String getOwnerName()
          Get the name of the owner of this Perforce client.
 java.lang.String getRoot()
          Returns the root of this Perforce client.
 IClientSummary.IClientSubmitOptions getSubmitOptions()
          Get the Perforce client changelist submit options associated with this client.
 java.util.Date getUpdated()
          Get the date the client's specification was last modified.
 void setAccessed(java.util.Date accessed)
          Set the client's accessed date / time.
 void setAlternateRoots(java.util.List<java.lang.String> alternateRoots)
          Set the alternate roots associated with this Perforce client.
 void setDescription(java.lang.String description)
          Set the description associated with this client.
 void setHostName(java.lang.String hostName)
          Set the name of the associated host.
 void setLineEnd(IClientSummary.ClientLineEnd lineEnd)
          Set the line end options for this client.
 void setName(java.lang.String name)
          Set the name of this client.
 void setOptions(IClientSummary.IClientOptions options)
          Set the client options associated with this client.
 void setOwnerName(java.lang.String ownerName)
          Set the name of the owner of this client.
 void setRoot(java.lang.String root)
          Set the root of this client.
 void setSubmitOptions(IClientSummary.IClientSubmitOptions submitOptions)
          Set the client submit options for this client.
 void setUpdated(java.util.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
 
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
 

Field Detail

name

protected java.lang.String name

accessed

protected java.util.Date accessed

updated

protected java.util.Date updated

description

protected java.lang.String description

hostName

protected java.lang.String hostName

ownerName

protected java.lang.String ownerName

root

protected java.lang.String root

lineEnd

protected IClientSummary.ClientLineEnd lineEnd

options

protected IClientSummary.IClientOptions options

submitOptions

protected IClientSummary.IClientSubmitOptions submitOptions

alternateRoots

protected java.util.List<java.lang.String> alternateRoots
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(java.lang.String name,
                     java.util.Date accessed,
                     java.util.Date updated,
                     java.lang.String description,
                     java.lang.String hostName,
                     java.lang.String ownerName,
                     java.lang.String root,
                     IClientSummary.ClientLineEnd lineEnd,
                     IClientSummary.IClientOptions options,
                     IClientSummary.IClientSubmitOptions submitOptions,
                     java.util.List<java.lang.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(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(java.util.Map<java.lang.String,java.lang.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 java.lang.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(java.lang.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 java.util.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(java.util.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 java.util.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(java.util.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 java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.util.List<java.lang.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(java.util.List<java.lang.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.


Copyright (c) 2008-2010 Perforce Software. All rights reserved.