|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.sandbox.SandboxConfigSpec
A ConfigSpec implementation with the essentially the following logic.
[The implementation is more complex than this and leverages various
constraints placed on sandbox baselines and versions.]
Field Summary | |
private static String |
CLASSNAME
|
private ObjectReference |
epmCheckpointRef
|
static long |
EXTERNALIZATION_VERSION_UID
|
private boolean |
includePersonalCheckouts
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private WTPrincipalReference |
principal
|
private static String |
RESOURCE
|
private WTContainerRef |
sandboxContainer
|
(package private) static long |
serialVersionUID
|
private ConfigSpec |
userConfigSpec
|
private boolean |
useSandboxBaseline
|
Constructor Summary | |
SandboxConfigSpec()
Default constructor. |
Method Summary | |
private QuerySpec |
appendSandboxConfigSpecCriteria(QuerySpec querySpec,
String subSelectAliasPrefix,
boolean appendAndWhenPrevConditions,
boolean simplifyCriteria,
boolean cloneQuerySpec)
|
QuerySpec |
appendSearchCriteria(QuerySpec querySpec)
Appends to the supplied QuerySpec additional search criteria to reduce the resulting iterations to only those that will be considered by this ConfigSpec. |
private QuerySpec |
appendUserAndSandboxConfigSpecCriteria(QuerySpec querySpec)
|
private void |
epmCheckpointRefValidate(ObjectReference a_EpmCheckpointRef)
|
ObjectReference |
getEpmCheckpointRef()
Gets the value of the attribute: epmCheckpointRef; If this attribute is non-null and includePersonalCheckouts is true, then the config spec will use the it as a filter to determine whether to return the personal checkout working copy or the original for each master. |
WTPrincipalReference |
getPrincipal()
Gets the value of the attribute: principal; A reference to the principal for whom the configuration is to be evaluated. |
private WTPrincipalReference |
getPrincipal(boolean useSessionUserOnNull)
|
WTContainerRef |
getSandboxContainer()
Gets the value of the attribute: sandboxContainer; A reference to the sandbox container. |
ConfigSpec |
getUserConfigSpec()
Gets the value of the attribute: userConfigSpec; A ConfigSpec via which iterations will be selected when neither the sandbox nor its baseline contains an appropriate iteration. |
boolean |
isIncludePersonalCheckouts()
Gets the value of the attribute: includePersonalCheckouts; Whether the results should include iterations checked out (i.e., WIP working copies) to 'principal' or not. |
boolean |
isUseSandboxBaseline()
Gets the value of the attribute: useSandboxBaseline; Whether the sandbox container's baseline should be considered or not. |
static SandboxConfigSpec |
newSandboxConfigSpec(WTContainerRef sandboxContainer)
Creates a SandboxConfigSpec setting 'useSandboxBaseline' as true, 'includePersonalCheckouts' as false, and 'principal' and 'userConfigSpec' as null. |
static SandboxConfigSpec |
newSandboxConfigSpec(WTContainerRef sandboxContainer,
boolean useSandboxBaseline,
boolean includePersonalCheckouts,
WTPrincipalReference principal)
Creates a SandboxConfigSpec leaving 'userConfigSpec' unspecified/null. |
static SandboxConfigSpec |
newSandboxConfigSpec(WTContainerRef sandboxContainer,
boolean useSandboxBaseline,
boolean includePersonalCheckouts,
WTPrincipalReference principal,
ConfigSpec userConfigSpec)
A ConfigSpec via which iterations will be selected when neither the sandbox nor its baseline contains an appropriate iteration. |
private void |
principalValidate(WTPrincipalReference a_Principal)
|
QueryResult |
process(QueryResult results)
Process the QueryResult of iterations, returning only those that "match" according to the algorithm. |
private QueryResult |
processMixedConfigSpecResults(QueryResult results)
|
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(SandboxConfigSpec thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
private void |
sandboxContainerValidate(WTContainerRef a_SandboxContainer)
|
void |
setEpmCheckpointRef(ObjectReference a_EpmCheckpointRef)
Sets the value of the attribute: epmCheckpointRef; If this attribute is non-null and includePersonalCheckouts is true, then the config spec will use the it as a filter to determine whether to return the personal checkout working copy or the original for each master. |
void |
setIncludePersonalCheckouts(boolean a_IncludePersonalCheckouts)
Sets the value of the attribute: includePersonalCheckouts; Whether the results should include iterations checked out (i.e., WIP working copies) to 'principal' or not. |
void |
setPrincipal(WTPrincipalReference a_Principal)
Sets the value of the attribute: principal; A reference to the principal for whom the configuration is to be evaluated. |
void |
setSandboxContainer(WTContainerRef a_SandboxContainer)
Sets the value of the attribute: sandboxContainer; A reference to the sandbox container. |
void |
setUserConfigSpec(ConfigSpec a_UserConfigSpec)
Sets the value of the attribute: userConfigSpec; A ConfigSpec via which iterations will be selected when neither the sandbox nor its baseline contains an appropriate iteration. |
void |
setUseSandboxBaseline(boolean a_UseSandboxBaseline)
Sets the value of the attribute: useSandboxBaseline; Whether the sandbox container's baseline should be considered or not. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private WTContainerRef sandboxContainer
private boolean useSandboxBaseline
private boolean includePersonalCheckouts
private WTPrincipalReference principal
private ConfigSpec userConfigSpec
private ObjectReference epmCheckpointRef
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
Constructor Detail |
public SandboxConfigSpec()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(SandboxConfigSpec thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public WTContainerRef getSandboxContainer()
public void setSandboxContainer(WTContainerRef a_SandboxContainer) throws WTPropertyVetoException
a_SandboxContainer
-
WTPropertyVetoException
private void sandboxContainerValidate(WTContainerRef a_SandboxContainer) throws WTPropertyVetoException
a_SandboxContainer
-
WTPropertyVetoException
public boolean isUseSandboxBaseline()
public void setUseSandboxBaseline(boolean a_UseSandboxBaseline) throws WTPropertyVetoException
a_UseSandboxBaseline
-
WTPropertyVetoException
public boolean isIncludePersonalCheckouts()
public void setIncludePersonalCheckouts(boolean a_IncludePersonalCheckouts) throws WTPropertyVetoException
a_IncludePersonalCheckouts
-
WTPropertyVetoException
public WTPrincipalReference getPrincipal()
public void setPrincipal(WTPrincipalReference a_Principal) throws WTPropertyVetoException
a_Principal
-
WTPropertyVetoException
private void principalValidate(WTPrincipalReference a_Principal) throws WTPropertyVetoException
a_Principal
-
WTPropertyVetoException
public ConfigSpec getUserConfigSpec()
public void setUserConfigSpec(ConfigSpec a_UserConfigSpec) throws WTPropertyVetoException
a_UserConfigSpec
-
WTPropertyVetoException
public ObjectReference getEpmCheckpointRef()
public void setEpmCheckpointRef(ObjectReference a_EpmCheckpointRef) throws WTPropertyVetoException
a_EpmCheckpointRef
-
WTPropertyVetoException
private void epmCheckpointRefValidate(ObjectReference a_EpmCheckpointRef) throws WTPropertyVetoException
a_EpmCheckpointRef
-
WTPropertyVetoException
public static SandboxConfigSpec newSandboxConfigSpec(WTContainerRef sandboxContainer) throws WTPropertyVetoException
sandboxContainer
- A reference to the sandbox container.
WTPropertyVetoException
public static SandboxConfigSpec newSandboxConfigSpec(WTContainerRef sandboxContainer, boolean useSandboxBaseline, boolean includePersonalCheckouts, WTPrincipalReference principal) throws WTPropertyVetoException
sandboxContainer
- A reference to the sandbox container.useSandboxBaseline
- Whether the sandbox container's baseline should be considered or not.includePersonalCheckouts
- Whether the results should include iterations checked out (i.e., WIP working copies) to 'principal' or not. [Like all the other attributes of SandboxConfigSpec, this only affects the sandbox portion of the config spec, not userConfigSpec.]principal
- A reference to the principal for whom the configuration is to be evaluated. If this is null, then the current session principal is used at the time of appendSearchCriteria() invocation. This attribute is currently unused when includePersonalCheckouts is false.
WTPropertyVetoException
public static SandboxConfigSpec newSandboxConfigSpec(WTContainerRef sandboxContainer, boolean useSandboxBaseline, boolean includePersonalCheckouts, WTPrincipalReference principal, ConfigSpec userConfigSpec) throws WTPropertyVetoException
sandboxContainer
- A reference to the sandbox container.useSandboxBaseline
- Whether the sandbox container's baseline should be considered or not.includePersonalCheckouts
- Whether the results should include iterations checked out (i.e., WIP working copies) to 'principal' or not. [Like all the other attributes of SandboxConfigSpec, this only affects the sandbox portion of the config spec, not userConfigSpec.]principal
- A reference to the principal for whom the configuration is to be evaluated. If this is null, then the current session principal is used at the time of appendSearchCriteria() invocation. This attribute is currently unused when includePersonalCheckouts is false.userConfigSpec
-
WTPropertyVetoException
public QuerySpec appendSearchCriteria(QuerySpec querySpec) throws WTException, QueryException
The QueryResult returned should be a copy of the passed in one (taking advantage of side-effects is not encouraged).
appendSearchCriteria
in interface ConfigSpec
querySpec
- A QuerySpec with a target class that is Iterated.
WTException
QueryException
QuerySpec
,
SearchCondition
public QueryResult process(QueryResult results) throws WTException
The QueryResult returned should be a copy of the passed-in QueryResult (side-effects should be avoided).
process
in interface ConfigSpec
results
- QueryResult of iterations to filter. Assumed to be the result of a query that included the additional search conditions applied by appendSearchCriteria. Note that after enumerating through the elements of this QueryResult, it should be reset.
WTException
QueryResult
,
Iterated
private QuerySpec appendSandboxConfigSpecCriteria(QuerySpec querySpec, String subSelectAliasPrefix, boolean appendAndWhenPrevConditions, boolean simplifyCriteria, boolean cloneQuerySpec) throws WTException, QueryException, SandboxException
WTException
QueryException
SandboxException
private WTPrincipalReference getPrincipal(boolean useSessionUserOnNull) throws WTException
WTException
private QuerySpec appendUserAndSandboxConfigSpecCriteria(QuerySpec querySpec) throws WTException, QueryException
WTException
QueryException
private QueryResult processMixedConfigSpecResults(QueryResult results) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |