Class SubmitOptions
- java.lang.Object
-
- com.perforce.p4java.option.Options
-
- com.perforce.p4java.option.changelist.SubmitOptions
-
public class SubmitOptions extends Options
Options class for the IChangelist.submit method.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.lang.String>
jobIds
If not null, should contain a list of job IDs for jobs that will have their status changed to fixed or "jobStatus", below.protected java.lang.String
jobStatus
If not null, should contain a string to which the jobs in the jobIds list (or local jobs list) will be set on a successful submit; if null, the jobs will be marked "fixed".static java.lang.String
OPTIONS_SPECS
Options: -r, -sprotected boolean
reOpen
If true, submitted files will remain open (on the client's default changelist) after the submit has completed.-
Fields inherited from class com.perforce.p4java.option.Options
immutable, optionList
-
-
Constructor Summary
Constructors Constructor Description SubmitOptions()
Default constructor.SubmitOptions(boolean reOpen, java.util.List<java.lang.String> jobIds, java.lang.String jobStatus)
Explicit value constructor.SubmitOptions(java.lang.String... options)
Strings-based constructor; see 'p4 help [command]' for possible options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getJobIds()
java.lang.String
getJobStatus()
boolean
isReOpen()
java.util.List<java.lang.String>
processOptions(IServer server)
Note that the implementation of the various options here is less straightforward than for typical server-based Options classes due to the lack of one-to-one correspondence between options and flags and the need for strict option ordering.SubmitOptions
setJobIds(java.util.List<java.lang.String> jobIds)
SubmitOptions
setJobStatus(java.lang.String jobStatus)
SubmitOptions
setReOpen(boolean reOpen)
-
Methods inherited from class com.perforce.p4java.option.Options
getOptions, isImmutable, processFields, setImmutable, setOptions
-
-
-
-
Field Detail
-
OPTIONS_SPECS
public static final java.lang.String OPTIONS_SPECS
Options: -r, -s- See Also:
- Constant Field Values
-
reOpen
protected boolean reOpen
If true, submitted files will remain open (on the client's default changelist) after the submit has completed. Corresponds to the -r flag.
-
jobIds
protected java.util.List<java.lang.String> jobIds
If not null, should contain a list of job IDs for jobs that will have their status changed to fixed or "jobStatus", below. No corresponding flag.This list will override any jobs already in the changelist's local job list (usually the result of being fixed elsewhere and picked up during a refresh of the changelist).
-
jobStatus
protected java.lang.String jobStatus
If not null, should contain a string to which the jobs in the jobIds list (or local jobs list) will be set on a successful submit; if null, the jobs will be marked "fixed". Corresponds to the -s flag in conjunction with jobs field additions.
-
-
Constructor Detail
-
SubmitOptions
public SubmitOptions()
Default constructor.
-
SubmitOptions
public SubmitOptions(java.lang.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
- options- See Also:
Options(java.lang.String...)
-
SubmitOptions
public SubmitOptions(boolean reOpen, java.util.List<java.lang.String> jobIds, java.lang.String jobStatus)
Explicit value constructor.- Parameters:
reOpen
- true/falsejobIds
- jobIDjobStatus
- status
-
-
Method Detail
-
processOptions
public java.util.List<java.lang.String> processOptions(IServer server) throws OptionsException
Note that the implementation of the various options here is less straightforward than for typical server-based Options classes due to the lack of one-to-one correspondence between options and flags and the need for strict option ordering.- Specified by:
processOptions
in classOptions
- Parameters:
server
- possibly-null IServer representing the Perforce server the options are to be used against. If this parameter is null, it is acceptable to throw an OptionsException, but it is also possible to ignore it and do the best you can with what you've got...- Returns:
- non-null (but possibly empty) string list representing the normalized Perforce server arguments corresponding to the state of this specific options object.
- Throws:
OptionsException
- if an error occurs in options processing that is not some species of ConnectionException, RequestException, AccessException, etc.- See Also:
Options.processOptions(com.perforce.p4java.server.IServer)
-
isReOpen
public boolean isReOpen()
-
setReOpen
public SubmitOptions setReOpen(boolean reOpen)
-
getJobIds
public java.util.List<java.lang.String> getJobIds()
-
setJobIds
public SubmitOptions setJobIds(java.util.List<java.lang.String> jobIds)
-
getJobStatus
public java.lang.String getJobStatus()
-
setJobStatus
public SubmitOptions setJobStatus(java.lang.String jobStatus)
-
-