Class LabelSummary
- java.lang.Object
-
- com.perforce.p4java.impl.generic.core.ServerResource
-
- com.perforce.p4java.impl.generic.core.LabelSummary
-
- All Implemented Interfaces:
ILabelSummary
,IServerResource
- Direct Known Subclasses:
Label
public class LabelSummary extends ServerResource implements ILabelSummary
Default implementation of the ILabelSumamry interface.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
autoreload
protected static java.lang.String
AUTORELOAD_VALUE
protected java.lang.String
description
protected java.util.Date
lastAccess
protected java.util.Date
lastUpdate
protected boolean
locked
protected static java.lang.String
LOCKED_VALUE
protected java.lang.String
name
protected static java.lang.String
NOAUTORELOAD_VALUE
protected java.lang.String
ownerName
protected java.lang.String
revisionSpec
protected boolean
unloaded
protected static java.lang.String
UNLOCKED_VALUE
-
Fields inherited from class com.perforce.p4java.impl.generic.core.ServerResource
refreshable, server, updateable
-
-
Constructor Summary
Constructors Constructor Description LabelSummary()
Default constructor -- set all fields to null or false.LabelSummary(boolean summaryOnly)
Construct an empty LabelSummary and appropriately initialize the ServerResource superclass fields according to whether this summary a summary only or part of the full Label class.LabelSummary(java.util.Map<java.lang.String,java.lang.Object> map)
Construct a LabelSummary from a map returned from the Perforce server's getLabelSummaryList.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
Get the description associated with this label.java.util.Date
getLastAccess()
Get the date and time of the last 'labelsync' or use of '@label' on this label.java.util.Date
getLastUpdate()
Get the date and time the label specification was last updated.java.lang.String
getName()
Get the label's name (the label's label, so to speak).java.lang.String
getOwnerName()
Get the name of the owner of this label.java.lang.String
getRevisionSpec()
Get the optional revision specification for this label.boolean
isAutoReload()
Return the "autoreload/noautoreload" status for this label.boolean
isLocked()
Return the "locked/unlocked" status for this label.boolean
isUnloaded()
Return the "unloaded" status for this label.void
setAutoReload(boolean autoreload)
Set the "autoreload/noautoreload" status for this label.void
setDescription(java.lang.String description)
Set the description associated with this label.void
setLastAccess(java.util.Date lastAccess)
Set the date and time of the last 'labelsync' or use of '@label' on this label.void
setLastUpdate(java.util.Date lastUpdate)
Set the date and time the label specification was last updated.void
setLocked(boolean locked)
Set the "locked/unlocked" status for this label.void
setName(java.lang.String name)
Set the label's name.void
setOwnerName(java.lang.String ownerName)
Set the name of the owner of this label.void
setRevisionSpec(java.lang.String revisionSpec)
Set the optional revision specification for this label.-
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, 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, clearRawFields, complete, getRawField, getRawFields, hasRawField, refresh, setRawField, setRawFields, setServer, update, update, update
-
-
-
-
Field Detail
-
LOCKED_VALUE
protected static final java.lang.String LOCKED_VALUE
- See Also:
- Constant Field Values
-
UNLOCKED_VALUE
protected static final java.lang.String UNLOCKED_VALUE
- See Also:
- Constant Field Values
-
AUTORELOAD_VALUE
protected static final java.lang.String AUTORELOAD_VALUE
- See Also:
- Constant Field Values
-
NOAUTORELOAD_VALUE
protected static final java.lang.String NOAUTORELOAD_VALUE
- See Also:
- Constant Field Values
-
name
protected java.lang.String name
-
ownerName
protected java.lang.String ownerName
-
lastAccess
protected java.util.Date lastAccess
-
lastUpdate
protected java.util.Date lastUpdate
-
description
protected java.lang.String description
-
revisionSpec
protected java.lang.String revisionSpec
-
locked
protected boolean locked
-
unloaded
protected boolean unloaded
-
autoreload
protected boolean autoreload
-
-
Constructor Detail
-
LabelSummary
public LabelSummary()
Default constructor -- set all fields to null or false.
-
LabelSummary
public LabelSummary(boolean summaryOnly)
Construct an empty LabelSummary and appropriately initialize the ServerResource superclass fields according to whether this summary a summary only or part of the full Label class.- Parameters:
summaryOnly
- summary only
-
LabelSummary
public LabelSummary(java.util.Map<java.lang.String,java.lang.Object> map)
Construct a LabelSummary from a map returned from the Perforce server's getLabelSummaryList.If the map is null, this is equivalent to calling the default constructor.
- Parameters:
map
- spec map
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:ILabelSummary
Get the label's name (the label's label, so to speak).- Specified by:
getName
in interfaceILabelSummary
- Returns:
- possibly-null label name (should only be null if the underlying label object has just been created on the client and has no server-side counterpart yet).
- See Also:
ILabelSummary.getName()
-
setName
public void setName(java.lang.String name)
Description copied from interface:ILabelSummary
Set the label's name.- Specified by:
setName
in interfaceILabelSummary
- Parameters:
name
- the label's (new) name.- See Also:
ILabelSummary.setName(java.lang.String)
-
getOwnerName
public java.lang.String getOwnerName()
Description copied from interface:ILabelSummary
Get the name of the owner of this label.- Specified by:
getOwnerName
in interfaceILabelSummary
- Returns:
- possibly-null owner name.
- See Also:
ILabelSummary.getOwnerName()
-
setOwnerName
public void setOwnerName(java.lang.String ownerName)
Description copied from interface:ILabelSummary
Set the name of the owner of this label.- Specified by:
setOwnerName
in interfaceILabelSummary
- Parameters:
ownerName
- the new owner name.- See Also:
ILabelSummary.setOwnerName(java.lang.String)
-
getLastAccess
public java.util.Date getLastAccess()
Description copied from interface:ILabelSummary
Get the date and time of the last 'labelsync' or use of '@label' on this label.- Specified by:
getLastAccess
in interfaceILabelSummary
- Returns:
- possibly-null Date
- See Also:
ILabelSummary.getLastAccess()
-
setLastAccess
public void setLastAccess(java.util.Date lastAccess)
Description copied from interface:ILabelSummary
Set the date and time of the last 'labelsync' or use of '@label' on this label.- Specified by:
setLastAccess
in interfaceILabelSummary
- Parameters:
lastAccess
- new last access date.- See Also:
ILabelSummary.setLastAccess(java.util.Date)
-
getLastUpdate
public java.util.Date getLastUpdate()
Description copied from interface:ILabelSummary
Get the date and time the label specification was last updated.- Specified by:
getLastUpdate
in interfaceILabelSummary
- Returns:
- possibly-null Date
- See Also:
ILabelSummary.getLastUpdate()
-
setLastUpdate
public void setLastUpdate(java.util.Date lastUpdate)
Description copied from interface:ILabelSummary
Set the date and time the label specification was last updated.- Specified by:
setLastUpdate
in interfaceILabelSummary
- Parameters:
lastUpdate
- Date last updated.- See Also:
ILabelSummary.setLastUpdate(java.util.Date)
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ILabelSummary
Get the description associated with this label.- Specified by:
getDescription
in interfaceILabelSummary
- Returns:
- possibly-null description string.
- See Also:
ILabelSummary.getDescription()
-
setDescription
public void setDescription(java.lang.String description)
Description copied from interface:ILabelSummary
Set the description associated with this label.- Specified by:
setDescription
in interfaceILabelSummary
- Parameters:
description
- new label description string.- See Also:
ILabelSummary.setDescription(java.lang.String)
-
getRevisionSpec
public java.lang.String getRevisionSpec()
Description copied from interface:ILabelSummary
Get the optional revision specification for this label.- Specified by:
getRevisionSpec
in interfaceILabelSummary
- Returns:
- possibly-null revision spec string.
- See Also:
ILabelSummary.getRevisionSpec()
-
setRevisionSpec
public void setRevisionSpec(java.lang.String revisionSpec)
Description copied from interface:ILabelSummary
Set the optional revision specification for this label.- Specified by:
setRevisionSpec
in interfaceILabelSummary
- Parameters:
revisionSpec
- new revision spec string- See Also:
ILabelSummary.setRevisionSpec(java.lang.String)
-
isLocked
public boolean isLocked()
Description copied from interface:ILabelSummary
Return the "locked/unlocked" status for this label.- Specified by:
isLocked
in interfaceILabelSummary
- Returns:
- true iff the label is locked else it is unlocked.
- See Also:
ILabelSummary.isLocked()
-
setLocked
public void setLocked(boolean locked)
Description copied from interface:ILabelSummary
Set the "locked/unlocked" status for this label.- Specified by:
setLocked
in interfaceILabelSummary
- Parameters:
locked
- true iff the label is locked else it is unlocked.- See Also:
ILabelSummary.setLocked(boolean)
-
isAutoReload
public boolean isAutoReload()
Description copied from interface:ILabelSummary
Return the "autoreload/noautoreload" status for this label.- Specified by:
isAutoReload
in interfaceILabelSummary
- Returns:
- true iff the label is "autoreload" else it is "noautoreload".
- See Also:
ILabelSummary.isAutoReload()
-
setAutoReload
public void setAutoReload(boolean autoreload)
Description copied from interface:ILabelSummary
Set the "autoreload/noautoreload" status for this label.- Specified by:
setAutoReload
in interfaceILabelSummary
- Parameters:
autoreload
- true iff the label is "autoreload" else it is "noautoreload".- See Also:
ILabelSummary.setAutoReload(boolean)
-
isUnloaded
public boolean isUnloaded()
Description copied from interface:ILabelSummary
Return the "unloaded" status for this label.- Specified by:
isUnloaded
in interfaceILabelSummary
- Returns:
- true iff the label is unloaded.
- See Also:
ILabelSummary.isUnloaded()
-
-