public class SandboxConstraints
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SandboxConstraints.ContentLevel
A two-part key that identifies a data set of sandbox content.
|
static class |
SandboxConstraints.ContentLevelType
Types of content levels.
|
| Modifier and Type | Field and Description |
|---|---|
static SandboxConstraints |
ANY_WORKSPACE
A constraint that limits the workspace level to
ContentLevel.ANY. |
static SandboxConstraints |
PROGRAMMATIC_WORKSPACE
A constraint that limits the workspace level to
ContentLevel.PROGRAMMATIC. |
static SandboxConstraints |
SITE_WORKSPACE
A constraint that limits the workspace level to
ContentLevel.SITE. |
static SandboxConstraints |
VERTICAL_WORKSPACE
A constraint that limits the workspace level to
ContentLevel.VERTICAL. |
| Constructor and Description |
|---|
SandboxConstraints(SandboxConstraints.ContentLevel workspaceLevel)
Constructs a
SandboxConstraints by specifying the level of
the content a sandbox contains. |
SandboxConstraints(SandboxConstraints.ContentLevel workspaceLevel,
java.util.List<SandboxConstraints.ContentLevel> dependentLevels)
Constructs a
SandboxConstraints by specifying the level of
the content a sandbox contains, and optionally a list of levels the
sandbox content depends on. |
SandboxConstraints(SandboxConstraints.ContentLevel workspaceLevel,
java.util.List<SandboxConstraints.ContentLevel> dependentLevels,
java.util.Map<java.lang.String,java.lang.String> attrs)
Constructs a
SandboxConstraints by specifying the level of
the content a sandbox contains, a list of levels the
sandbox content depends on and a collection of attributes. |
| Modifier and Type | Method and Description |
|---|---|
static SandboxConstraints |
fromXml(java.lang.String xml)
Constructs a
SandboxConstraints object from its XML
representation. |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Returns additional attributes if any.
|
java.util.List<SandboxConstraints.ContentLevel> |
getDependentLevels()
Returns the list of the levels the content of a sandbox depends on.
|
SandboxConstraints.ContentLevel |
getWorkspaceLevel()
Returns the level of the content of a sandbox.
|
static boolean |
isWorkspaceProgrammatic(SandboxConstraints sc)
Returns
true if getWorkspaceLevel() of a
SandboxConstraints object returns a content level of
type >ContentLevelType.PROGRAMMATIC. |
java.lang.String |
toString() |
java.lang.String |
toXml()
Returns an XML representation of this object.
|
public static final SandboxConstraints SITE_WORKSPACE
ContentLevel.SITE.public static final SandboxConstraints VERTICAL_WORKSPACE
ContentLevel.VERTICAL.public static final SandboxConstraints ANY_WORKSPACE
ContentLevel.ANY.public static final SandboxConstraints PROGRAMMATIC_WORKSPACE
ContentLevel.PROGRAMMATIC.public SandboxConstraints(SandboxConstraints.ContentLevel workspaceLevel)
SandboxConstraints by specifying the level of
the content a sandbox contains.workspaceLevel - the level of the content a sandbox containsjava.lang.IllegalArgumentException - if the given level is nullpublic SandboxConstraints(SandboxConstraints.ContentLevel workspaceLevel, java.util.List<SandboxConstraints.ContentLevel> dependentLevels)
SandboxConstraints by specifying the level of
the content a sandbox contains, and optionally a list of levels the
sandbox content depends on.workspaceLevel - the level of the content a sandbox containsdependentLevels - the list of levels the sandbox content depends on;
null or an empty list if there is no
dependencypublic SandboxConstraints(SandboxConstraints.ContentLevel workspaceLevel, java.util.List<SandboxConstraints.ContentLevel> dependentLevels, java.util.Map<java.lang.String,java.lang.String> attrs)
SandboxConstraints by specifying the level of
the content a sandbox contains, a list of levels the
sandbox content depends on and a collection of attributes.workspaceLevel - the level of the content a sandbox containsdependentLevels - the list of levels the sandbox content depends on;
null or an empty list if there is no
dependencyattrs - the collection of attributes; null if there is
no additional attributespublic static boolean isWorkspaceProgrammatic(SandboxConstraints sc)
true if getWorkspaceLevel() of a
SandboxConstraints object returns a content level of
type >ContentLevelType.PROGRAMMATIC.sc - a SandboxConstraints object or nulltrue if getWorkspaceLevel() of the
SandboxConstraints object returns a content level
of type ContentLevelType.PROGRAMMATIC;
false otherwise or if the given object is nullpublic final java.util.List<SandboxConstraints.ContentLevel> getDependentLevels()
null.public final SandboxConstraints.ContentLevel getWorkspaceLevel()
nullpublic final java.util.Map<java.lang.String,java.lang.String> getAttributes()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toXml()
public static SandboxConstraints fromXml(java.lang.String xml)
SandboxConstraints object from its XML
representation.xml - the XML representation of the SandboxConstraints
objectSandboxConstraints object the given XML string
represents; null if the given XML is not a
representation of a SandboxConstraints objectjava.lang.IllegalArgumentException - if the given XML string is null