Package com.microstrategy.web.blocks
Class BlockTarget
- java.lang.Object
-
- com.microstrategy.web.blocks.BlockTarget
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
BlockListElement
,BlockProperty
public abstract class BlockTarget extends java.lang.Object implements java.io.Serializable
This class represents the "target" of a Block path specification: a property, a list or a Block.- Since:
- MicroStrategy Web 8.1.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlockTarget.PathInfo
This class provides additional information used in the resolution of a Block path specification.
-
Field Summary
Fields Modifier and Type Field Description static int
TARGETTYPE_BLOCK
A Block targetstatic int
TARGETTYPE_LIST
A List targetstatic int
TARGETTYPE_PROPERTY
A Property target
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<BlockProperty>
findProperties(java.lang.String propName, boolean unique)
Returns an Iterator of all BlockProperties with a given name.int
getTargetType()
Returns the type of this target.BlockTarget
resolvePath(java.lang.String path)
Resolves a path specification to aBlockTarget
object.BlockTarget
resolvePath(java.lang.String path, BlockTarget.PathInfo pathInfo)
Resolve the specified path to return the targeted object.
-
-
-
Field Detail
-
TARGETTYPE_PROPERTY
public static final int TARGETTYPE_PROPERTY
A Property target- See Also:
- Constant Field Values
-
TARGETTYPE_LIST
public static final int TARGETTYPE_LIST
A List target- See Also:
- Constant Field Values
-
TARGETTYPE_BLOCK
public static final int TARGETTYPE_BLOCK
A Block target- See Also:
- Constant Field Values
-
-
Method Detail
-
getTargetType
public int getTargetType()
Returns the type of this target.- Returns:
- The type of this target.
-
resolvePath
public BlockTarget resolvePath(java.lang.String path) throws java.lang.Exception
Resolves a path specification to aBlockTarget
object.- Parameters:
path
- The path to this object.- Returns:
- The
BlockTarget
that this path refers to. - Throws:
java.lang.Exception
- if the path is malformed or does not refer to a non-null BlockTarget.- Since:
- MicroStrategy Web 9.0.0
-
resolvePath
public BlockTarget resolvePath(java.lang.String path, BlockTarget.PathInfo pathInfo) throws java.lang.Exception
Resolve the specified path to return the targeted object.- Parameters:
path
- The path to the object that the caller seeks.pathInfo
- Information about the path that has been processed.- Returns:
- The target object described by the path.
- Throws:
java.lang.Exception
- If the path could not be resolved.- Since:
- MicroStrategy Web 9.0.0
-
findProperties
public java.util.Iterator<BlockProperty> findProperties(java.lang.String propName, boolean unique)
Returns an Iterator of all BlockProperties with a given name.- Parameters:
propName
- The name of theBlockProperty
to inspect.unique
- Whether the list should only contain a unique list of BlockProperty values.- Returns:
- An
Iterator
of BlockProperty instances. - Since:
- MicroStrategy Web 9.0.0
-
-