|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.perforce.p4java.impl.generic.core.ServerResource
com.perforce.p4java.impl.generic.core.BranchSpecSummary
com.perforce.p4java.impl.generic.core.BranchSpec
public class BranchSpec
Simple default implementation class for the IBranchSpec interface.
Nested Class Summary | |
---|---|
static class |
BranchSpec.BranchViewMapping
Simple default implementation of the IViewMapping interface. |
Field Summary | |
---|---|
protected ViewMap<IBranchMapping> |
branchView
|
static String |
DEFAULT_DESCRIPTION
Default description for use in newBranchSpec method when no explicit description is given. |
Fields inherited from class com.perforce.p4java.impl.generic.core.BranchSpecSummary |
---|
accessed, description, locked, name, ownerName, updated |
Fields inherited from class com.perforce.p4java.impl.generic.core.ServerResource |
---|
refreshable, server, updateable |
Constructor Summary | |
---|---|
BranchSpec()
Default constructor. |
|
BranchSpec(IBranchSpecSummary summary)
Construct a new BranchSpec from the passed-in summary branch spec. |
|
BranchSpec(Map<String,Object> map,
IServer server)
Construct a BranchSpec from a map passed back from the Perforce server in response to a getBranchSpec command. |
|
BranchSpec(String name,
String ownerName,
String description,
boolean locked,
Date accessed,
Date updated,
ViewMap<IBranchMapping> branchView)
Construct a new BranchSpec from explicit field values. |
Method Summary | |
---|---|
ViewMap<IBranchMapping> |
getBranchView()
Return the view map associated with this branch spec. |
static BranchSpec |
newBranchSpec(IOptionsServer server,
String name,
String description,
String[] branches)
Simple factory / convenience method for creating a new local BranchSpec object with defult values. |
void |
refresh()
This method will refresh by getting the complete branch model. |
void |
setBranchView(ViewMap<IBranchMapping> branchView)
Set the the view map associated with this branch spec. |
void |
update()
Update the Perforce server object associated with the underlying P4Java object, if possible. |
Methods inherited from class com.perforce.p4java.impl.generic.core.BranchSpecSummary |
---|
getAccessed, getDescription, getName, getOwnerName, getUpdated, isLocked, setAccessed, setDescription, setLocked, setName, setOwnerName, setUpdated |
Methods inherited from class com.perforce.p4java.impl.generic.core.ServerResource |
---|
canRefresh, canUpdate, complete, setRefreshable, setServer, 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.IBranchSpecSummary |
---|
getAccessed, getDescription, getName, getOwnerName, getUpdated, isLocked, setAccessed, setDescription, setLocked, setName, setOwnerName, setUpdated |
Methods inherited from interface com.perforce.p4java.core.IServerResource |
---|
canRefresh, canUpdate, setServer, update, update |
Field Detail |
---|
protected ViewMap<IBranchMapping> branchView
public static final String DEFAULT_DESCRIPTION
Constructor Detail |
---|
public BranchSpec()
public BranchSpec(String name, String ownerName, String description, boolean locked, Date accessed, Date updated, ViewMap<IBranchMapping> branchView)
public BranchSpec(Map<String,Object> map, IServer server)
public BranchSpec(IBranchSpecSummary summary) throws ConnectionException, RequestException, AccessException
ConnectionException
- if the Perforce server is unreachable or is not
connected.
RequestException
- if the Perforce server encounters an error during
its processing of the request
AccessException
- if the Perforce server denies access to the callerMethod Detail |
---|
public static BranchSpec newBranchSpec(IOptionsServer server, String name, String description, String[] branches)
server
- non-null server to be associated with the new branch spec.name
- non-null branch spec name.description
- if not null, used as the new branc spec's description field;
if null, uses the BranchSpec.DEFAULT_DESCRIPTION field.branches
- if not null, use this as the list of branch spec
paths, in the order given, and according to the format in
MapEntry.parseViewMappingString; unlike many other core object
factory methods, this one does not default if null.
public void refresh() throws ConnectionException, RequestException, AccessException
refresh
in interface IServerResource
refresh
in class ServerResource
ConnectionException
- if the Perforce server is unreachable or is not
connected.
RequestException
- if the Perforce server encounters an error during
its processing of the request
AccessException
- if the Perforce server denies access to the callerServerResource.refresh()
public void update() throws ConnectionException, RequestException, AccessException
IServerResource
The results of calling this method on objects whose canUpdate method returns false are undefined (but will generally result in a UnimplementedError being thrown).
update
in interface IServerResource
update
in class ServerResource
ConnectionException
- if the Perforce server is unreachable or is not
connected.
RequestException
- if the Perforce server encounters an error during
its processing of the request
AccessException
- if the Perforce server denies access to the callerServerResource.update()
public ViewMap<IBranchMapping> getBranchView()
IBranchSpec
getBranchView
in interface IBranchSpec
IBranchSpec.getBranchView()
public void setBranchView(ViewMap<IBranchMapping> branchView)
IBranchSpec
setBranchView
in interface IBranchSpec
branchView
- new view mappings for the branch.IBranchSpec.setBranchView(com.perforce.p4java.core.ViewMap)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |