public class BranchSpec extends BranchSpecSummary implements IBranchSpec
| Modifier and Type | Class and Description |
|---|---|
static class |
BranchSpec.BranchViewMapping
Simple default implementation of the IViewMapping interface.
|
| Modifier and Type | Field and Description |
|---|---|
protected ViewMap<IBranchMapping> |
branchView |
static String |
DEFAULT_DESCRIPTION
Default description for use in newBranchSpec method when no explicit
description is given.
|
accessed, description, locked, name, ownerName, updatedrefreshable, server, updateable| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
getAccessed, getDescription, getName, getOwnerName, getUpdated, isLocked, setAccessed, setDescription, setLocked, setName, setOwnerName, setUpdatedcanRefresh, canUpdate, complete, setRefreshable, setServer, update, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccessed, getDescription, getName, getOwnerName, getUpdated, isLocked, setAccessed, setDescription, setLocked, setName, setOwnerName, setUpdatedcanRefresh, canUpdate, setServer, update, updateprotected ViewMap<IBranchMapping> branchView
public static final String DEFAULT_DESCRIPTION
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 requestAccessException - if the Perforce server denies access to the callerpublic 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 IServerResourcerefresh in class ServerResourceConnectionException - if the Perforce server is unreachable or is not
connected.RequestException - if the Perforce server encounters an error during
its processing of the requestAccessException - if the Perforce server denies access to the callerServerResource.refresh()public void update()
throws ConnectionException,
RequestException,
AccessException
IServerResourceThe 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 IServerResourceupdate in class ServerResourceConnectionException - if the Perforce server is unreachable or is not
connected.RequestException - if the Perforce server encounters an error during
its processing of the requestAccessException - if the Perforce server denies access to the callerServerResource.update()public ViewMap<IBranchMapping> getBranchView()
IBranchSpecgetBranchView in interface IBranchSpecIBranchSpec.getBranchView()public void setBranchView(ViewMap<IBranchMapping> branchView)
IBranchSpecsetBranchView in interface IBranchSpecbranchView - new view mappings for the branch.IBranchSpec.setBranchView(com.perforce.p4java.core.ViewMap)Copyright © 2017 Perforce Software. All Rights Reserved.