Class BranchSpecSummary
- java.lang.Object
-
- com.perforce.p4java.impl.generic.core.ServerResource
-
- com.perforce.p4java.impl.generic.core.BranchSpecSummary
-
- All Implemented Interfaces:
IBranchSpecSummary
,IServerResource
- Direct Known Subclasses:
BranchSpec
public class BranchSpecSummary extends ServerResource implements IBranchSpecSummary
Default implementation class for the IBranchSpecSummary interface.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Date
accessed
protected java.lang.String
description
protected boolean
locked
protected java.lang.String
name
protected java.lang.String
ownerName
protected java.util.Date
updated
-
Fields inherited from class com.perforce.p4java.impl.generic.core.ServerResource
refreshable, server, updateable
-
-
Constructor Summary
Constructors Constructor Description BranchSpecSummary()
Default constructor -- sets all fields to null or false.BranchSpecSummary(boolean summaryOnly)
Default constructor; same as no-argument default constructor, except that it sets the ServerResource superclass fields appropriately for summary only (everything false) or full branch spec (updateable and refreshable).BranchSpecSummary(boolean summaryOnly, java.util.Date accessed, java.util.Date updated, java.lang.String name, java.lang.String ownerName, java.lang.String description, boolean locked)
Explicit-value constructor.BranchSpecSummary(java.util.Map<java.lang.String,java.lang.Object> map, boolean summaryOnly)
Construct a BranchSpecSummary from a map returned by the Perforce server.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Date
getAccessed()
Get the date of the last 'integrate' using this branch.java.lang.String
getDescription()
Get the branch's description (if any).java.lang.String
getName()
Get the name of this branch.java.lang.String
getOwnerName()
Get the name of the user who created this branch.java.util.Date
getUpdated()
Get the date specification was last modified.boolean
isLocked()
Return true if the branch spec is locked.void
setAccessed(java.util.Date accessed)
Set the last-accessed date.void
setDescription(java.lang.String description)
Set the branch spec description.void
setLocked(boolean locked)
Set whether the branch spec is locked or not.void
setName(java.lang.String name)
Set the name of this branch.void
setOwnerName(java.lang.String ownerName)
Set the owner's name for this branch.void
setUpdated(java.util.Date updated)
Set the last-updated date.-
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
-
-
-
-
Constructor Detail
-
BranchSpecSummary
public BranchSpecSummary()
Default constructor -- sets all fields to null or false.
-
BranchSpecSummary
public BranchSpecSummary(boolean summaryOnly)
Default constructor; same as no-argument default constructor, except that it sets the ServerResource superclass fields appropriately for summary only (everything false) or full branch spec (updateable and refreshable).- Parameters:
summaryOnly
- summary only (everything false) or full branch spec
-
BranchSpecSummary
public BranchSpecSummary(boolean summaryOnly, java.util.Date accessed, java.util.Date updated, java.lang.String name, java.lang.String ownerName, java.lang.String description, boolean locked)
Explicit-value constructor. If summaryOnly is true, refreshable and updeateable are set true in the ServerResource superclass, otherwise they're set false.- Parameters:
summaryOnly
- summary only (everything false) or full branch specaccessed
- dateupdated
- datename
- nameownerName
- ownerdescription
- descriptionlocked
- locked
-
BranchSpecSummary
public BranchSpecSummary(java.util.Map<java.lang.String,java.lang.Object> map, boolean summaryOnly)
Construct a BranchSpecSummary from a map returned by the Perforce server. If summaryOnly is true, this map was returned by the IServer getBranchSummaryList or similar summary-only method; otherwise it's assumed to be the full branch spec.If map is null, this is equivalent to calling the default summaryOnly-argument constructor.
- Parameters:
map
- spec mapsummaryOnly
- summary only (everything false) or full branch spec
-
-
Method Detail
-
getAccessed
public java.util.Date getAccessed()
Description copied from interface:IBranchSpecSummary
Get the date of the last 'integrate' using this branch.- Specified by:
getAccessed
in interfaceIBranchSpecSummary
- Returns:
- date
- See Also:
IBranchSpecSummary.getAccessed()
-
setAccessed
public void setAccessed(java.util.Date accessed)
Description copied from interface:IBranchSpecSummary
Set the last-accessed date. This generally has no effect on the associated Perforce server version of this spec.- Specified by:
setAccessed
in interfaceIBranchSpecSummary
- Parameters:
accessed
- new accessed date.- See Also:
IBranchSpecSummary.setAccessed(java.util.Date)
-
getUpdated
public java.util.Date getUpdated()
Description copied from interface:IBranchSpecSummary
Get the date specification was last modified.- Specified by:
getUpdated
in interfaceIBranchSpecSummary
- Returns:
- date
- See Also:
IBranchSpecSummary.getUpdated()
-
setUpdated
public void setUpdated(java.util.Date updated)
Description copied from interface:IBranchSpecSummary
Set the last-updated date. This generally has no effect on the associated Perforce server version of this spec.- Specified by:
setUpdated
in interfaceIBranchSpecSummary
- Parameters:
updated
- new updated date.- See Also:
IBranchSpecSummary.setUpdated(java.util.Date)
-
getName
public java.lang.String getName()
Description copied from interface:IBranchSpecSummary
Get the name of this branch.- Specified by:
getName
in interfaceIBranchSpecSummary
- Returns:
- name
- See Also:
IBranchSpecSummary.getName()
-
setName
public void setName(java.lang.String name)
Description copied from interface:IBranchSpecSummary
Set the name of this branch. This will not change the name of the associated branch spec on the Perforce server unless you arrange for the update to server.- Specified by:
setName
in interfaceIBranchSpecSummary
- Parameters:
name
- new branch spec name- See Also:
IBranchSpecSummary.setName(java.lang.String)
-
getOwnerName
public java.lang.String getOwnerName()
Description copied from interface:IBranchSpecSummary
Get the name of the user who created this branch.- Specified by:
getOwnerName
in interfaceIBranchSpecSummary
- Returns:
- owner
- See Also:
IBranchSpecSummary.getOwnerName()
-
setOwnerName
public void setOwnerName(java.lang.String ownerName)
Description copied from interface:IBranchSpecSummary
Set the owner's name for this branch. This will not change the associated branch spec on the Perforce server unless you arrange for the update to server.- Specified by:
setOwnerName
in interfaceIBranchSpecSummary
- Parameters:
ownerName
- new owner's name- See Also:
IBranchSpecSummary.setOwnerName(java.lang.String)
-
getDescription
public java.lang.String getDescription()
Description copied from interface:IBranchSpecSummary
Get the branch's description (if any).- Specified by:
getDescription
in interfaceIBranchSpecSummary
- Returns:
- description
- See Also:
IBranchSpecSummary.getDescription()
-
setDescription
public void setDescription(java.lang.String description)
Description copied from interface:IBranchSpecSummary
Set the branch spec description. This will not change the associated branch spec on the Perforce server unless you arrange for the update to server.- Specified by:
setDescription
in interfaceIBranchSpecSummary
- Parameters:
description
- new description string.- See Also:
IBranchSpecSummary.setDescription(java.lang.String)
-
isLocked
public boolean isLocked()
Description copied from interface:IBranchSpecSummary
Return true if the branch spec is locked.- Specified by:
isLocked
in interfaceIBranchSpecSummary
- Returns:
- true if locked
- See Also:
IBranchSpecSummary.isLocked()
-
setLocked
public void setLocked(boolean locked)
Description copied from interface:IBranchSpecSummary
Set whether the branch spec is locked or not. This will not change the associated branch spec on the Perforce server unless you arrange for the update to server.- Specified by:
setLocked
in interfaceIBranchSpecSummary
- Parameters:
locked
- boolean lock status- See Also:
IBranchSpecSummary.setLocked(boolean)
-
-