public class Stream extends StreamSummary implements IStream
Modifier and Type | Class and Description |
---|---|
static class |
Stream.ExtraTag
Simple default generic IExtraTag implementation class.
|
static class |
Stream.StreamComponentMapping |
static class |
Stream.StreamIgnoredMapping
Simple default implementation of the IStreamIgnoredMapping interface.
|
static class |
Stream.StreamRemappedMapping
Simple default implementation of the IStreamRemappedMapping interface.
|
static class |
Stream.StreamViewMapping
Simple default implementation of the IStreamViewMapping interface.
|
StreamSummary.Options
IStream.IExtraTag
IStreamSummary.IOptions, IStreamSummary.ParentView, IStreamSummary.Type
Modifier and Type | Field and Description |
---|---|
protected ViewMap<IClientViewMapping> |
clientView |
protected ViewMap<IStreamComponentMapping> |
components |
static java.lang.String |
DEFAULT_DESCRIPTION
Default description for use in newStream method when no explicit
description is given.
|
protected java.util.List<IStream.IExtraTag> |
extraTags |
protected ViewMap<IStreamIgnoredMapping> |
ignoredView |
protected ViewMap<IStreamRemappedMapping> |
remappedView |
protected ViewMap<IStreamViewMapping> |
streamView |
refreshable, server, updateable
Constructor and Description |
---|
Stream()
Default constructor.
|
Stream(IStreamSummary summary)
Construct a new Stream from the passed-in summary stream spec.
|
Stream(java.util.Map<java.lang.String,java.lang.Object> map,
IServer server)
Construct a Stream from a map passed back from the Perforce server in
response to a getStream command.
|
Stream(java.lang.String stream,
IStreamSummary.Type type,
java.lang.String parent,
java.util.Date accessed,
java.util.Date updated,
java.lang.String name,
java.lang.String description,
java.lang.String ownerName,
IStreamSummary.IOptions options,
ViewMap<IStreamViewMapping> streamView,
ViewMap<IStreamRemappedMapping> remappedView,
ViewMap<IStreamIgnoredMapping> ignoredView)
Construct a new Stream from explicit field values.
|
Stream(java.lang.String stream,
IStreamSummary.Type type,
java.lang.String parent,
java.util.Date accessed,
java.util.Date updated,
java.lang.String name,
java.lang.String description,
java.lang.String ownerName,
IStreamSummary.IOptions options,
ViewMap<IStreamViewMapping> streamView,
ViewMap<IStreamRemappedMapping> remappedView,
ViewMap<IStreamIgnoredMapping> ignoredView,
ViewMap<IClientViewMapping> clientView)
Construct a new Stream from explicit field values.
|
Stream(java.lang.String stream,
IStreamSummary.Type type,
java.lang.String parent,
java.util.Date accessed,
java.util.Date updated,
java.lang.String name,
java.lang.String description,
java.lang.String ownerName,
IStreamSummary.IOptions options,
ViewMap<IStreamViewMapping> streamView,
ViewMap<IStreamRemappedMapping> remappedView,
ViewMap<IStreamIgnoredMapping> ignoredView,
ViewMap<IClientViewMapping> clientView,
ViewMap<IStreamComponentMapping> components)
Construct a new Stream from explicit field values.
|
Modifier and Type | Method and Description |
---|---|
ViewMap<IClientViewMapping> |
getClientView()
Return the automatically generated client view map associated with this
stream.
|
ViewMap<IStreamComponentMapping> |
getComponents() |
java.util.List<IStream.IExtraTag> |
getExtraTags()
Return a list of extra tags associated with this stream.
|
ViewMap<IStreamIgnoredMapping> |
getIgnoredView()
Return the ignored view map associated with this stream.
|
ViewMap<IStreamRemappedMapping> |
getRemappedView()
Return the remapped view map associated with this stream.
|
ViewMap<IStreamViewMapping> |
getStreamView()
Return the view map associated with this stream.
|
static Stream |
newStream(IOptionsServer server,
java.lang.String streamPath,
java.lang.String type,
java.lang.String parentStreamPath,
java.lang.String name,
java.lang.String description,
java.lang.String options,
java.lang.String[] viewPaths,
java.lang.String[] remappedPaths,
java.lang.String[] ignoredPaths)
Simple factory / convenience method for creating a new local Stream
object with defult values.
|
static Stream |
newStream(IOptionsServer server,
java.lang.String streamPath,
java.lang.String type,
java.lang.String parentStreamPath,
java.lang.String name,
java.lang.String description,
java.lang.String options,
java.lang.String[] viewPaths,
java.lang.String[] remappedPaths,
java.lang.String[] ignoredPaths,
java.lang.String[] clientViewPaths)
Simple factory / convenience method for creating a new local Stream
object with defult values.
|
static Stream |
newStream(IOptionsServer server,
java.lang.String streamPath,
java.lang.String type,
java.lang.String parentStreamPath,
java.lang.String name,
java.lang.String description,
java.lang.String options,
java.lang.String[] viewPaths,
java.lang.String[] remappedPaths,
java.lang.String[] ignoredPaths,
java.lang.String[] clientViewPaths,
java.lang.String[] components)
Simple factory / convenience method for creating a new local Stream
object with defult values.
|
void |
refresh()
This method will refresh by getting the complete stream model.
|
void |
setClientView(ViewMap<IClientViewMapping> clientView)
Set the automatically generated client view map associated with this
stream spec.
|
void |
setComponents(ViewMap<IStreamComponentMapping> components) |
void |
setExtraTags(java.util.List<IStream.IExtraTag> extraTags)
Set the extra tags associated with this stream.
|
void |
setIgnoredView(ViewMap<IStreamIgnoredMapping> ignoredView)
Set the ignored view map associated with this stream spec.
|
void |
setRemappedView(ViewMap<IStreamRemappedMapping> remappedView)
Set the remapped view map associated with this stream spec.
|
void |
setServer(IOptionsServer server)
Set the server to type of IOptionsServer, overriding the default IServer.
|
void |
setStreamView(ViewMap<IStreamViewMapping> streamView)
Set the view map associated with this stream spec.
|
void |
update()
Update the Perforce server object associated with the underlying P4Java object,
if possible.
|
void |
update(boolean force)
Force (if true) update the Perforce server object associated with the underlying
P4Java object, if possible.
|
getAccessed, getBaseParent, getDescription, getName, getOptions, getOwnerName, getParent, getParentView, getStream, getType, getUpdated, isChangeFlowsFromParent, isChangeFlowsToParent, isFirmerThanParent, isUnloaded, setAccessed, setBaseParent, setChangeFlowsFromParent, setChangeFlowsToParent, setDescription, setFirmerThanParent, setName, setOptions, setOwnerName, setParent, setParentView, setStream, setType, setUpdated
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, parseDate, setRawField, setRawFields, setRefreshable, setServer, toDateString, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAccessed, getBaseParent, getDescription, getName, getOptions, getOwnerName, getParent, getParentView, getStream, getType, getUpdated, isChangeFlowsFromParent, isChangeFlowsToParent, isFirmerThanParent, isUnloaded, setAccessed, setBaseParent, setChangeFlowsFromParent, setChangeFlowsToParent, setDescription, setFirmerThanParent, setName, setOptions, setOwnerName, setParent, setParentView, setStream, setType, setUpdated
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, setRawField, setRawFields, setServer, update
protected ViewMap<IStreamViewMapping> streamView
protected ViewMap<IStreamRemappedMapping> remappedView
protected ViewMap<IStreamIgnoredMapping> ignoredView
protected ViewMap<IClientViewMapping> clientView
protected ViewMap<IStreamComponentMapping> components
protected java.util.List<IStream.IExtraTag> extraTags
public static final java.lang.String DEFAULT_DESCRIPTION
public Stream()
public Stream(java.lang.String stream, IStreamSummary.Type type, java.lang.String parent, java.util.Date accessed, java.util.Date updated, java.lang.String name, java.lang.String description, java.lang.String ownerName, IStreamSummary.IOptions options, ViewMap<IStreamViewMapping> streamView, ViewMap<IStreamRemappedMapping> remappedView, ViewMap<IStreamIgnoredMapping> ignoredView)
stream
- streamtype
- typeparent
- parentaccessed
- accessedupdated
- updatedname
- namedescription
- descriptionownerName
- ownerNameoptions
- optionsstreamView
- streamViewremappedView
- remappedViewignoredView
- ignoredViewpublic Stream(java.lang.String stream, IStreamSummary.Type type, java.lang.String parent, java.util.Date accessed, java.util.Date updated, java.lang.String name, java.lang.String description, java.lang.String ownerName, IStreamSummary.IOptions options, ViewMap<IStreamViewMapping> streamView, ViewMap<IStreamRemappedMapping> remappedView, ViewMap<IStreamIgnoredMapping> ignoredView, ViewMap<IClientViewMapping> clientView)
stream
- streamtype
- typeparent
- parentaccessed
- accessedupdated
- updatedname
- namedescription
- descriptionownerName
- ownerNameoptions
- optionsstreamView
- streamViewremappedView
- remappedViewignoredView
- ignoredViewclientView
- clientViewpublic Stream(java.lang.String stream, IStreamSummary.Type type, java.lang.String parent, java.util.Date accessed, java.util.Date updated, java.lang.String name, java.lang.String description, java.lang.String ownerName, IStreamSummary.IOptions options, ViewMap<IStreamViewMapping> streamView, ViewMap<IStreamRemappedMapping> remappedView, ViewMap<IStreamIgnoredMapping> ignoredView, ViewMap<IClientViewMapping> clientView, ViewMap<IStreamComponentMapping> components)
stream
- streamtype
- typeparent
- parentaccessed
- accessedupdated
- updatedname
- namedescription
- descriptionownerName
- ownerNameoptions
- optionsstreamView
- streamViewremappedView
- remappedViewignoredView
- ignoredViewclientView
- clientViewcomponents
- componentspublic Stream(java.util.Map<java.lang.String,java.lang.Object> map, IServer server)
map
- spec mapserver
- serverpublic Stream(IStreamSummary summary) throws ConnectionException, RequestException, AccessException
summary
- summary classConnectionException
- 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 Stream newStream(IOptionsServer server, java.lang.String streamPath, java.lang.String type, java.lang.String parentStreamPath, java.lang.String name, java.lang.String description, java.lang.String options, java.lang.String[] viewPaths, java.lang.String[] remappedPaths, java.lang.String[] ignoredPaths)
server
- serverstreamPath
- stream pathtype
- typeparentStreamPath
- parent streamname
- namedescription
- descriptionoptions
- optionsviewPaths
- view pathsremappedPaths
- remapped pathsignoredPaths
- ignored pathspublic static Stream newStream(IOptionsServer server, java.lang.String streamPath, java.lang.String type, java.lang.String parentStreamPath, java.lang.String name, java.lang.String description, java.lang.String options, java.lang.String[] viewPaths, java.lang.String[] remappedPaths, java.lang.String[] ignoredPaths, java.lang.String[] clientViewPaths)
server
- non-null server to be associated with the new stream spec.streamPath
- non-null stream's path in a stream depot, of the form
//depotname/streamname.type
- non-null stream type of 'mainline', 'development', or
'release'.parentStreamPath
- parent of this stream. Can be null if the stream type is
'mainline', otherwise must be set to an existing stream.name
- an alternate name of the stream, for use in display outputs.
Defaults to the 'streamname' portion of the stream path. Can
be changed.description
- if not null, used as the new stream spec's description field;
if null, uses the Stream.DEFAULT_DESCRIPTION field.options
- flags to configure stream behavior: allsubmit/ownersubmit
[un]locked [no]toparent [no]fromparent mergedown/mergeany.viewPaths
- one or more lines that define file paths in the stream view.
Each line is of the form: path_type view_path depot_pathremappedPaths
- optional; one or more lines that define how stream view paths
are to be remapped in client views. Each line is of the form:
view_path_1 view_path_2ignoredPaths
- optional; a list of file or directory names to be ignored in
client views. For example:
/tmp # ignores files named 'tmp'
/tmp/... # ignores dirs named 'tmp'
.tmp # ignores file names ending in '.tmp'clientViewPaths
- automatically generated; maps files in the depot to files in
your client workspace. For example:
//p4java_stream/dev/... ...
//p4java_stream/dev/readonly/sync/p4cmd/%%1 readonly/sync/p4cmd/%%1
-//p4java_stream/.../temp/... .../temp/...
-//p4java_stream/....class ....classpublic static Stream newStream(IOptionsServer server, java.lang.String streamPath, java.lang.String type, java.lang.String parentStreamPath, java.lang.String name, java.lang.String description, java.lang.String options, java.lang.String[] viewPaths, java.lang.String[] remappedPaths, java.lang.String[] ignoredPaths, java.lang.String[] clientViewPaths, java.lang.String[] components)
server
- non-null server to be associated with the new stream spec.streamPath
- non-null stream's path in a stream depot, of the form
//depotname/streamname.type
- non-null stream type of 'mainline', 'development', or
'release'.parentStreamPath
- parent of this stream. Can be null if the stream type is
'mainline', otherwise must be set to an existing stream.name
- an alternate name of the stream, for use in display outputs.
Defaults to the 'streamname' portion of the stream path. Can
be changed.description
- if not null, used as the new stream spec's description field;
if null, uses the Stream.DEFAULT_DESCRIPTION field.options
- flags to configure stream behavior: allsubmit/ownersubmit
[un]locked [no]toparent [no]fromparent mergedown/mergeany.viewPaths
- one or more lines that define file paths in the stream view.
Each line is of the form: path_type view_path depot_pathremappedPaths
- optional; one or more lines that define how stream view paths
are to be remapped in client views. Each line is of the form:
view_path_1 view_path_2ignoredPaths
- optional; a list of file or directory names to be ignored in
client views. For example:
/tmp # ignores files named 'tmp'
/tmp/... # ignores dirs named 'tmp'
.tmp # ignores file names ending in '.tmp'clientViewPaths
- automatically generated; maps files in the depot to files in
your client workspace. For example:
//p4java_stream/dev/... ...
//p4java_stream/dev/readonly/sync/p4cmd/%%1 readonly/sync/p4cmd/%%1
-//p4java_stream/.../temp/... .../temp/...
-//p4java_stream/....class ....classcomponents
- Add stream components.
Syntax: component_type component_folder component_stream[@[change | automatic_label]]
eg: readonly dirB //streams/Bpublic 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 requestAccessException
- 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 requestAccessException
- if the Perforce server denies access to the callerServerResource.update()
public void update(boolean force) throws ConnectionException, RequestException, AccessException
IServerResource
Note, in order to force the change it may require super user / admin privileges to work properly.
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
force
- if true, force the update of the object on the server.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 callerServerResource.update(boolean)
public ViewMap<IStreamViewMapping> getStreamView()
IStream
getStreamView
in interface IStream
IStream.getStreamView()
public void setStreamView(ViewMap<IStreamViewMapping> streamView)
IStream
setStreamView
in interface IStream
streamView
- new view mappings for the stream.IStream.setStreamView(com.perforce.p4java.core.ViewMap)
public void setServer(IOptionsServer server)
IStream
setServer
in interface IStream
server
- serverIServerResource.setServer(com.perforce.p4java.server.IServer)
public ViewMap<IStreamRemappedMapping> getRemappedView()
IStream
getRemappedView
in interface IStream
IStream.getRemappedView()
public void setRemappedView(ViewMap<IStreamRemappedMapping> remappedView)
IStream
setRemappedView
in interface IStream
remappedView
- new remapped view mappings for the stream.IStream.setStreamView(com.perforce.p4java.core.ViewMap)
public ViewMap<IStreamIgnoredMapping> getIgnoredView()
IStream
getIgnoredView
in interface IStream
IStream.getIgnoredView()
public void setIgnoredView(ViewMap<IStreamIgnoredMapping> ignoredView)
IStream
setIgnoredView
in interface IStream
ignoredView
- ignore view mappingIStream.setIgnoredView(com.perforce.p4java.core.ViewMap)
public ViewMap<IClientViewMapping> getClientView()
IStream
getClientView
in interface IStream
IStream.getClientView()
public void setClientView(ViewMap<IClientViewMapping> clientView)
IStream
setClientView
in interface IStream
clientView
- client viewIStream.setClientView(com.perforce.p4java.core.ViewMap)
public java.util.List<IStream.IExtraTag> getExtraTags()
IStream
getExtraTags
in interface IStream
IStream.getExtraTags()
public void setExtraTags(java.util.List<IStream.IExtraTag> extraTags)
IStream
setExtraTags
in interface IStream
extraTags
- extra tagsIStream.setExtraTags(java.util.List)
public ViewMap<IStreamComponentMapping> getComponents()
getComponents
in interface IStream
public void setComponents(ViewMap<IStreamComponentMapping> components)
setComponents
in interface IStream
components
- A stream Components