com.perforce.p4java.option.client
Class PopulateFilesOptions

java.lang.Object
  extended by com.perforce.p4java.option.Options
      extended by com.perforce.p4java.option.client.PopulateFilesOptions

public class PopulateFilesOptions
extends Options

Options class for the IClient 'populateFiles' method.

Since:
2012.3

Field Summary
protected  boolean bidirectional
          If true, this is a 'bidirectional' populate.
protected  String branch
          If non-null, use a user-defined branch view.
 String description
          If non-null, use this as the description for the submitted changelist.
protected  boolean forceBranchDeletedFiles
          If true, forces deleted files to be branched into the target.
protected  int maxFiles
          If positive, copy only the first maxFiles files.
protected  boolean noUpdate
          If true, don't actually do the populate.
static String OPTIONS_SPECS
          Options: -d[description], -f, -m[max] -n, -o, -b[branch], -S[stream], -P[parentStream], -r, -s.
protected  String parentStream
          If non-null, specify a parent stream other than the stream's actual parent.
protected  boolean reverseMapping
          Reverse the mappings in the branch view, with the target files and source files exchanging place.
protected  boolean showPopulatedFiles
          If true, return a list of files created by the populate command.
protected  String stream
          If non-null, use this stream's branch view.
 
Fields inherited from class com.perforce.p4java.option.Options
immutable, optionList, OPTPFX
 
Constructor Summary
PopulateFilesOptions()
          Default constructor.
PopulateFilesOptions(String... options)
          Strings-based constructor; see 'p4 help [command]' for possible options.
PopulateFilesOptions(String description, boolean forceBranchDeletedFiles, int maxFiles, boolean noUpdate, boolean showPopulatedFiles)
          Instantiates a new populate files options.
PopulateFilesOptions(String description, boolean forceBranchDeletedFiles, int maxFiles, boolean noUpdate, boolean showPopulatedFiles, String branch, boolean reverseMapping, boolean bidirectional)
          Instantiates a new populate files options.
PopulateFilesOptions(String description, boolean forceBranchDeletedFiles, int maxFiles, boolean noUpdate, boolean showPopulatedFiles, String stream, String parentStream, boolean reverseMapping)
          Instantiates a new populate files options.
 
Method Summary
 String getBranch()
          Gets the branch.
 String getDescription()
          Gets the description.
 int getMaxFiles()
          Gets the max files.
 String getParentStream()
          Gets the parent stream.
 String getStream()
          Gets the stream.
 boolean isBidirectional()
          Checks if is bidirectional.
 boolean isForceBranchDeletedFiles()
          Checks if is force branch deleted files.
 boolean isNoUpdate()
          Checks if is no update.
 boolean isReverseMapping()
          Checks if is reverse mapping.
 boolean isShowPopulatedFiles()
          Checks if is show populated files.
 List<String> processOptions(IServer server)
          Process options.
 PopulateFilesOptions setBidirectional(boolean bidirectional)
          Sets the bidirectional.
 PopulateFilesOptions setBranch(String branch)
          Sets the branch.
 PopulateFilesOptions setDescription(String description)
          Sets the description.
 PopulateFilesOptions setForceBranchDeletedFiles(boolean forceBranchDeletedFiles)
          Sets the force branch deleted files.
 PopulateFilesOptions setMaxFiles(int maxFiles)
          Sets the max files.
 PopulateFilesOptions setNoUpdate(boolean noUpdate)
          Sets the no update.
 PopulateFilesOptions setParentStream(String parentStream)
          Sets the parent stream.
 PopulateFilesOptions setReverseMapping(boolean reverseMapping)
          Sets the reverse mapping.
 PopulateFilesOptions setShowPopulatedFiles(boolean showPopulatedFiles)
          Sets the show populated files.
 PopulateFilesOptions setStream(String stream)
          Sets the stream.
 
Methods inherited from class com.perforce.p4java.option.Options
applyRule, applyRule, applyRule, applyRule, getOptions, isImmutable, processFields, setImmutable, setOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTIONS_SPECS

public static final String OPTIONS_SPECS
Options: -d[description], -f, -m[max] -n, -o, -b[branch], -S[stream], -P[parentStream], -r, -s.

See Also:
Constant Field Values

description

public String description
If non-null, use this as the description for the submitted changelist.

Corresponds to -d flag.


maxFiles

protected int maxFiles
If positive, copy only the first maxFiles files.

Corresponds to -m flag.


forceBranchDeletedFiles

protected boolean forceBranchDeletedFiles
If true, forces deleted files to be branched into the target. By default, deleted files are treated as nonexistent and simply skipped.

Corresponds to -f flag.


noUpdate

protected boolean noUpdate
If true, don't actually do the populate.

Corresponds to -n flag.


showPopulatedFiles

protected boolean showPopulatedFiles
If true, return a list of files created by the populate command.

Corresponds to -o flag.


bidirectional

protected boolean bidirectional
If true, this is a 'bidirectional' populate. The -s flag can be used with -b to cause fromFile to be treated as the source, and both sides of the user-defined branch view to be treated as the target, per the branch view mapping. Optional toFile arguments may be given to further restrict the scope of the target file set. -r is ignored when -s is used.

Corresponds to -s flag.


reverseMapping

protected boolean reverseMapping
Reverse the mappings in the branch view, with the target files and source files exchanging place.

Corresponds to the -r flag.


branch

protected String branch
If non-null, use a user-defined branch view. The source is the left side of the branch view and the target is the right side. With -r, the direction is reversed.

Corresponds to -b flag.


stream

protected String stream
If non-null, use this stream's branch view. The source is the stream itself, and the target is the stream's parent. With -r, the direction is reversed. -P can be used to specify a parent stream other than the stream's actual parent. Note that to submit copied stream files, the current client must be dedicated to the target stream.

Corresponds to -S flag.


parentStream

protected String parentStream
If non-null, specify a parent stream other than the stream's actual parent.

Corresponds to -P flag.

Constructor Detail

PopulateFilesOptions

public PopulateFilesOptions()
Default constructor.


PopulateFilesOptions

public PopulateFilesOptions(String... options)
Strings-based constructor; see 'p4 help [command]' for possible options.

WARNING: you should not pass more than one option or argument in each string parameter. Each option or argument should be passed-in as its own separate string parameter, without any spaces between the option and the option value (if any).

NOTE: setting options this way always bypasses the internal options values, and getter methods against the individual values corresponding to the strings passed in to this constructor will not normally reflect the string's setting. Do not use this constructor unless you know what you're doing and / or you do not also use the field getters and setters.

Parameters:
options - the options
See Also:
Options.Options(java.lang.String...)

PopulateFilesOptions

public PopulateFilesOptions(String description,
                            boolean forceBranchDeletedFiles,
                            int maxFiles,
                            boolean noUpdate,
                            boolean showPopulatedFiles)
Instantiates a new populate files options.

Parameters:
description - the description
forceBranchDeletedFiles - force branch of deleted files
maxFiles - max files
noUpdate - no update
showPopulatedFiles - show populated files

PopulateFilesOptions

public PopulateFilesOptions(String description,
                            boolean forceBranchDeletedFiles,
                            int maxFiles,
                            boolean noUpdate,
                            boolean showPopulatedFiles,
                            String branch,
                            boolean reverseMapping,
                            boolean bidirectional)
Instantiates a new populate files options.

Parameters:
description - the description
forceBranchDeletedFiles - force branch of deleted files
maxFiles - max files
noUpdate - no update
showPopulatedFiles - show populated files
branch - the branch
reverseMapping - reverse mapping
bidirectional - bidirectional

PopulateFilesOptions

public PopulateFilesOptions(String description,
                            boolean forceBranchDeletedFiles,
                            int maxFiles,
                            boolean noUpdate,
                            boolean showPopulatedFiles,
                            String stream,
                            String parentStream,
                            boolean reverseMapping)
Instantiates a new populate files options.

Parameters:
description - the description
forceBranchDeletedFiles - force branch of deleted files
maxFiles - max files
noUpdate - no update
showPopulatedFiles - show populated files
stream - the stream
parentStream - the parent stream
reverseMapping - reverse mapping
Method Detail

processOptions

public List<String> processOptions(IServer server)
                            throws OptionsException
Process options.

Specified by:
processOptions in class Options
Parameters:
server - the server
Returns:
the list
Throws:
OptionsException - the options exception
See Also:
Options.processOptions(com.perforce.p4java.server.IServer)

getDescription

public String getDescription()
Gets the description.

Returns:
the description

setDescription

public PopulateFilesOptions setDescription(String description)
Sets the description.

Parameters:
description - the description
Returns:
the populate files options

getMaxFiles

public int getMaxFiles()
Gets the max files.

Returns:
the max files

setMaxFiles

public PopulateFilesOptions setMaxFiles(int maxFiles)
Sets the max files.

Parameters:
maxFiles - the max files
Returns:
the populate files options

isForceBranchDeletedFiles

public boolean isForceBranchDeletedFiles()
Checks if is force branch deleted files.

Returns:
true, if is force branch deleted files

setForceBranchDeletedFiles

public PopulateFilesOptions setForceBranchDeletedFiles(boolean forceBranchDeletedFiles)
Sets the force branch deleted files.

Parameters:
forceBranchDeletedFiles - the force branch deleted files
Returns:
the populate files options

isShowPopulatedFiles

public boolean isShowPopulatedFiles()
Checks if is show populated files.

Returns:
true, if is show populated files

setShowPopulatedFiles

public PopulateFilesOptions setShowPopulatedFiles(boolean showPopulatedFiles)
Sets the show populated files.

Parameters:
showPopulatedFiles - the show populated files
Returns:
the populate files options

isNoUpdate

public boolean isNoUpdate()
Checks if is no update.

Returns:
true, if is no update

setNoUpdate

public PopulateFilesOptions setNoUpdate(boolean noUpdate)
Sets the no update.

Parameters:
noUpdate - the no update
Returns:
the populate files options

isBidirectional

public boolean isBidirectional()
Checks if is bidirectional.

Returns:
true, if is bidirectional

setBidirectional

public PopulateFilesOptions setBidirectional(boolean bidirectional)
Sets the bidirectional.

Parameters:
bidirectional - the bidirectional
Returns:
the populate files options

isReverseMapping

public boolean isReverseMapping()
Checks if is reverse mapping.

Returns:
true, if is reverse mapping

setReverseMapping

public PopulateFilesOptions setReverseMapping(boolean reverseMapping)
Sets the reverse mapping.

Parameters:
reverseMapping - the reverse mapping
Returns:
the populate files options

getBranch

public String getBranch()
Gets the branch.

Returns:
the branch

setBranch

public PopulateFilesOptions setBranch(String branch)
Sets the branch.

Parameters:
branch - the branch
Returns:
the populate files options

getStream

public String getStream()
Gets the stream.

Returns:
the stream

setStream

public PopulateFilesOptions setStream(String stream)
Sets the stream.

Parameters:
stream - the stream
Returns:
the populate files options

getParentStream

public String getParentStream()
Gets the parent stream.

Returns:
the parent stream

setParentStream

public PopulateFilesOptions setParentStream(String parentStream)
Sets the parent stream.

Parameters:
parentStream - the parent stream
Returns:
the populate files options


Copyright © 2015 Perforce Software. All Rights Reserved.