Class ClientSubmitOptions
- java.lang.Object
-
- com.perforce.p4java.impl.generic.client.ClientSubmitOptions
-
- All Implemented Interfaces:
IClientSummary.IClientSubmitOptions
public class ClientSubmitOptions extends java.lang.Object implements IClientSummary.IClientSubmitOptions
Simple generic IClientSubmitOptions implementation class. Attempts to enforce the mutual-exclusivity of the options, but this can easily be circumvented.
-
-
Field Summary
-
Fields inherited from interface com.perforce.p4java.client.IClientSummary.IClientSubmitOptions
LEAVE_UNCHANGED, LEAVE_UNCHANGED_REOPEN, REOPEN, REVERT_UNCHANGED, REVERT_UNCHANGED_REOPEN, SUBMIT_UNCHANGED, SUBMIT_UNCHANGED_REOPEN
-
-
Constructor Summary
Constructors Constructor Description ClientSubmitOptions()
Default constructor; sets all fields to false.ClientSubmitOptions(boolean submitunchanged, boolean submitunchangedReopen, boolean revertunchanged, boolean revertunchangedReopen, boolean leaveunchanged, boolean leaveunchangedReopen)
Explicit-value constructor.ClientSubmitOptions(java.lang.String optString)
Attempts to construct a ClientSubmitOptions object from a typical p4 cmd options string, e.g.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLeaveunchanged()
boolean
isLeaveunchangedReopen()
boolean
isRevertunchanged()
boolean
isRevertunchangedReopen()
boolean
isSubmitunchanged()
boolean
isSubmitunchangedReopen()
protected void
resetOptions()
void
setLeaveunchanged(boolean leaveunchanged)
void
setLeaveunchangedReopen(boolean leaveunchangedReopen)
void
setRevertunchanged(boolean revertunchanged)
void
setRevertunchangedReopen(boolean revertunchangedReopen)
void
setSubmitunchanged(boolean submitunchanged)
void
setSubmitunchangedReopen(boolean submitunchangedReopen)
java.lang.String
toString()
Return a Perforce-standard representation of these options.
-
-
-
Constructor Detail
-
ClientSubmitOptions
public ClientSubmitOptions()
Default constructor; sets all fields to false.
-
ClientSubmitOptions
public ClientSubmitOptions(java.lang.String optString)
Attempts to construct a ClientSubmitOptions object from a typical p4 cmd options string, e.g. "revertunchanged+reopen", or from a map returned from the server (where it's more commonly in the format "revertunchangedReopen". If optString is null, this is equivalent to calling the default constructor.Note that the optString parser is fairly permissive in what it will accept; for example, the string "submitunchanged submitunchanged+reopen" is accepted just fine even though it's a little redundant, and no real attempt is made to enforce the mutual exclusivity of the options.
- Parameters:
optString
- options
-
ClientSubmitOptions
public ClientSubmitOptions(boolean submitunchanged, boolean submitunchangedReopen, boolean revertunchanged, boolean revertunchangedReopen, boolean leaveunchanged, boolean leaveunchangedReopen)
Explicit-value constructor. Note that nonsensical constructs like submitunchanged = false and submitunchangedReopen = true are accepted silently; also, no attempt is made to enforce mutual exclusivity here.- Parameters:
submitunchanged
- submitunchangedsubmitunchangedReopen
- submitunchangedReopenrevertunchanged
- revertunchangedrevertunchangedReopen
- revertunchangedReopenleaveunchanged
- leaveunchangedleaveunchangedReopen
- leaveunchangedReopen
-
-
Method Detail
-
toString
public java.lang.String toString()
Return a Perforce-standard representation of these options. This string is in the same format as used by the ClientSubmitOptions(String optionsString) constructor. Mirrors p4 cmd's behaviour in omitting non-set values.- Overrides:
toString
in classjava.lang.Object
-
isSubmitunchanged
public boolean isSubmitunchanged()
- Specified by:
isSubmitunchanged
in interfaceIClientSummary.IClientSubmitOptions
-
setSubmitunchanged
public void setSubmitunchanged(boolean submitunchanged)
- Specified by:
setSubmitunchanged
in interfaceIClientSummary.IClientSubmitOptions
-
isSubmitunchangedReopen
public boolean isSubmitunchangedReopen()
- Specified by:
isSubmitunchangedReopen
in interfaceIClientSummary.IClientSubmitOptions
-
setSubmitunchangedReopen
public void setSubmitunchangedReopen(boolean submitunchangedReopen)
- Specified by:
setSubmitunchangedReopen
in interfaceIClientSummary.IClientSubmitOptions
-
isRevertunchanged
public boolean isRevertunchanged()
- Specified by:
isRevertunchanged
in interfaceIClientSummary.IClientSubmitOptions
-
setRevertunchanged
public void setRevertunchanged(boolean revertunchanged)
- Specified by:
setRevertunchanged
in interfaceIClientSummary.IClientSubmitOptions
-
isRevertunchangedReopen
public boolean isRevertunchangedReopen()
- Specified by:
isRevertunchangedReopen
in interfaceIClientSummary.IClientSubmitOptions
-
setRevertunchangedReopen
public void setRevertunchangedReopen(boolean revertunchangedReopen)
- Specified by:
setRevertunchangedReopen
in interfaceIClientSummary.IClientSubmitOptions
-
isLeaveunchanged
public boolean isLeaveunchanged()
- Specified by:
isLeaveunchanged
in interfaceIClientSummary.IClientSubmitOptions
-
setLeaveunchanged
public void setLeaveunchanged(boolean leaveunchanged)
- Specified by:
setLeaveunchanged
in interfaceIClientSummary.IClientSubmitOptions
-
isLeaveunchangedReopen
public boolean isLeaveunchangedReopen()
- Specified by:
isLeaveunchangedReopen
in interfaceIClientSummary.IClientSubmitOptions
-
setLeaveunchangedReopen
public void setLeaveunchangedReopen(boolean leaveunchangedReopen)
- Specified by:
setLeaveunchangedReopen
in interfaceIClientSummary.IClientSubmitOptions
-
resetOptions
protected void resetOptions()
-
-