com.perforce.p4java.impl.generic.core
Class UserSummary

java.lang.Object
  extended by com.perforce.p4java.impl.generic.core.ServerResource
      extended by com.perforce.p4java.impl.generic.core.UserSummary
All Implemented Interfaces:
IServerResource, IUserSummary
Direct Known Subclasses:
User

public class UserSummary
extends ServerResource
implements IUserSummary

Default implementation class for IUserSummary interface.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.perforce.p4java.core.IUserSummary
IUserSummary.UserType
 
Field Summary
protected  Date passwordChange
           
protected  Date ticketExpiration
           
protected  IUserSummary.UserType type
           
 
Fields inherited from class com.perforce.p4java.impl.generic.core.ServerResource
refreshable, server, updateable
 
Constructor Summary
UserSummary()
          Default constructor; sets all fields to null or zero.
UserSummary(Map<String,Object> map, boolean summaryOnly)
          Construct a UserSummary from the passed-in map and summaryOnly values.
UserSummary(String loginName, String email, String fullName, Date access, Date update)
          Explicit-value constructor.
UserSummary(String loginName, String email, String fullName, Date access, Date update, IUserSummary.UserType type)
          Explicit-value constructor.
 
Method Summary
 Date getAccess()
           
 String getEmail()
           
 String getFullName()
           
 String getLoginName()
           
 Date getPasswordChange()
          Get the date the password associated with this summary user expires.
 Date getTicketExpiration()
          Get the date the ticket associated with this summary user expires.
 IUserSummary.UserType getType()
          Get the UserType associated with this user.
 Date getUpdate()
           
 void setAccess(Date access)
           
 void setEmail(String email)
           
 void setFullName(String fullName)
           
 void setLoginName(String loginName)
           
 void setType(IUserSummary.UserType type)
          Set the UserType associated with this user.
 void setUpdate(Date update)
           
 
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

type

protected IUserSummary.UserType type

ticketExpiration

protected Date ticketExpiration

passwordChange

protected Date passwordChange
Constructor Detail

UserSummary

public UserSummary()
Default constructor; sets all fields to null or zero.


UserSummary

public UserSummary(String loginName,
                   String email,
                   String fullName,
                   Date access,
                   Date update)
Explicit-value constructor.


UserSummary

public UserSummary(String loginName,
                   String email,
                   String fullName,
                   Date access,
                   Date update,
                   IUserSummary.UserType type)
Explicit-value constructor.


UserSummary

public UserSummary(Map<String,Object> map,
                   boolean summaryOnly)
Construct a UserSummary from the passed-in map and summaryOnly values. The map must have been returned from the Perforce server in response to a getUsers() or getUser (etc.) call; is summaryOnly is true, this is treated as a map that came from the getUseres method.

If map is null, this is equivalent to calling the default constructor.

Method Detail

getAccess

public Date getAccess()
Specified by:
getAccess in interface IUserSummary
See Also:
IUserSummary.getAccess()

getEmail

public String getEmail()
Specified by:
getEmail in interface IUserSummary
See Also:
IUserSummary.getEmail()

getFullName

public String getFullName()
Specified by:
getFullName in interface IUserSummary
See Also:
IUserSummary.getFullName()

getLoginName

public String getLoginName()
Specified by:
getLoginName in interface IUserSummary
See Also:
IUserSummary.getLoginName()

getUpdate

public Date getUpdate()
Specified by:
getUpdate in interface IUserSummary
See Also:
IUserSummary.getUpdate()

setAccess

public void setAccess(Date access)
Specified by:
setAccess in interface IUserSummary
See Also:
IUserSummary.setAccess(java.util.Date)

setEmail

public void setEmail(String email)
Specified by:
setEmail in interface IUserSummary
See Also:
IUserSummary.setEmail(java.lang.String)

setFullName

public void setFullName(String fullName)
Specified by:
setFullName in interface IUserSummary
See Also:
IUserSummary.setFullName(java.lang.String)

setLoginName

public void setLoginName(String loginName)
Specified by:
setLoginName in interface IUserSummary
See Also:
IUserSummary.setLoginName(java.lang.String)

setUpdate

public void setUpdate(Date update)
Specified by:
setUpdate in interface IUserSummary
See Also:
IUserSummary.setUpdate(java.util.Date)

getType

public IUserSummary.UserType getType()
Description copied from interface: IUserSummary
Get the UserType associated with this user. May return null if no type was set.

Specified by:
getType in interface IUserSummary
See Also:
IUserSummary.getType()

setType

public void setType(IUserSummary.UserType type)
Description copied from interface: IUserSummary
Set the UserType associated with this user.

Specified by:
setType in interface IUserSummary
See Also:
IUserSummary.setType(com.perforce.p4java.core.IUserSummary.UserType)

getTicketExpiration

public Date getTicketExpiration()
Description copied from interface: IUserSummary
Get the date the ticket associated with this summary user expires.

This field will only be non-null if a) the user summary object it's a part of was retrieved using the IOptionsServer.getUsers method with the GetUsersOptions().setExtendedOutput option set to true; b) the caller was a super-user or admin; and, c) the Perforce server was 2011.1 or above. In all other cases the value of this field is either null or not reliable. This is a read-only field synthesized by the Perforce server, and can not be meaningfully set in the client.

Specified by:
getTicketExpiration in interface IUserSummary
Returns:
possibly-null Date object.
See Also:
IUserSummary.getTicketExpiration()

getPasswordChange

public Date getPasswordChange()
Description copied from interface: IUserSummary
Get the date the password associated with this summary user expires.

This field will only be non-null if a) the user summary object it's a part of was retrieved using the IOptionsServer.getUsers method with the GetUsersOptions().setExtendedOutput option set to true; b) the caller was a super-user or admin; and, c) the Perforce server was 2011.1 or above. In all other cases the value of this field is either null or not reliable. This is a read-only field synthesized by the Perforce server, and can not be meaningfully set in the client.

Specified by:
getPasswordChange in interface IUserSummary
Returns:
possibly-null Date object.
See Also:
IUserSummary.getPasswordChange()


Copyright © 2015 Perforce Software. All Rights Reserved.