Class StreamDelegator
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
-
- com.perforce.p4java.impl.mapbased.server.cmd.StreamDelegator
-
- All Implemented Interfaces:
IStreamDelegator
public class StreamDelegator extends BaseDelegator implements IStreamDelegator
Implementation to handle the Stream command.
-
-
Field Summary
-
Fields inherited from class com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
-
-
Constructor Summary
Constructors Constructor Description StreamDelegator(IOptionsServer server)Instantiate a new StreamDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringconvertSparseStream(ConvertSparseOptions opts)Convert Sparse stream to development and release stream from the Perforce server.java.lang.StringcreateStream(IStream stream)Create a new stream in the repository.java.lang.StringdeleteStream(java.lang.String streamPath, StreamOptions opts)Delete a Perforce stream spec from the Perforce server.IStreamgetStream(java.lang.String streamPath)Get an individual stream by stream path.IStreamgetStream(java.lang.String streamPath, GetStreamOptions opts)Get an individual stream by stream path.java.lang.StringupdateStream(IStream stream, StreamOptions opts)Update a Perforce stream spec on the Perforce server.
-
-
-
Constructor Detail
-
StreamDelegator
public StreamDelegator(IOptionsServer server)
Instantiate a new StreamDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.- Parameters:
server- a concrete implementation of a Perforce Helix Server
-
-
Method Detail
-
createStream
public java.lang.String createStream(@Nonnull IStream stream) throws P4JavaExceptionDescription copied from interface:IStreamDelegatorCreate a new stream in the repository.- Specified by:
createStreamin interfaceIStreamDelegator- Parameters:
stream- non-null IStream object representing the stream to be created.- Returns:
- possibly-null operation result message string from the Perforce server.
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-
getStream
public IStream getStream(@Nonnull java.lang.String streamPath) throws P4JavaException
Description copied from interface:IStreamDelegatorGet an individual stream by stream path. Note that this method will return a fake stream if you ask it for a non-existent stream, so it's not the most useful of operations.- Specified by:
getStreamin interfaceIStreamDelegator- Parameters:
streamPath- non-null stream's path in a stream depot, of the form //depotname/streamname- Returns:
- IStream non-null object corresponding to the named stream if it exists and is retrievable; otherwise an IStream object that looks real but does not, in fact, correspond to any known stream in the repository.
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-
getStream
public IStream getStream(@Nonnull java.lang.String streamPath, GetStreamOptions opts) throws P4JavaException
Description copied from interface:IStreamDelegatorGet an individual stream by stream path. Note that this method will return a fake stream if you ask it for a non-existent stream, so it's not the most useful of operations.- Specified by:
getStreamin interfaceIStreamDelegator- Parameters:
streamPath- non-null stream's path in a stream depot, of the form //depotname/streamnameopts- GetStreamOptions object describing optional parameters; if null, no options are set.- Returns:
- IStream non-null object corresponding to the named stream if it exists and is retrievable; otherwise an IStream object that looks real but does not, in fact, correspond to any known stream in the repository.
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-
updateStream
public java.lang.String updateStream(@Nonnull IStream stream, StreamOptions opts) throws P4JavaExceptionDescription copied from interface:IStreamDelegatorUpdate a Perforce stream spec on the Perforce server.- Specified by:
updateStreamin interfaceIStreamDelegator- Parameters:
stream- non-null stream spec to be updated.opts- StreamOptions object describing optional parameters; if null, no options are set.- Returns:
- non-null result message string from the Perforce server; this may include form trigger output pre-pended and / or appended to the "normal" message.
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-
deleteStream
public java.lang.String deleteStream(@Nonnull java.lang.String streamPath, StreamOptions opts) throws P4JavaExceptionDescription copied from interface:IStreamDelegatorDelete a Perforce stream spec from the Perforce server.- Specified by:
deleteStreamin interfaceIStreamDelegator- Parameters:
streamPath- non-null stream's path in a stream depot, of the form //depotname/streamnameopts- StreamOptions object describing optional parameters; if null, no options are set.- Returns:
- non-null result message string from the Perforce server; this may include form trigger output pre-pended and / or appended to the "normal" message
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-
convertSparseStream
public java.lang.String convertSparseStream(@Nonnull ConvertSparseOptions opts) throws P4JavaExceptionDescription copied from interface:IStreamDelegatorConvert Sparse stream to development and release stream from the Perforce server.- Specified by:
convertSparseStreamin interfaceIStreamDelegator- Parameters:
opts- ConvertsparseOptions object describing optional parameters; if null, no options are set.- Returns:
- non-null result message string from the Perforce server; this may include form trigger output pre-pended and / or appended to the "normal" message
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-
-