com.microstrategy.web.platform.ParameterBuilder |
![]() |
This defines the interface between the WebEvent and the format that its content are persisted. For example, the contents of a WebEvent include:
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
addEventInfo(WebEvent event, int eventElements, int howMuchChildState)
Add the event information, which is represented in key/value pairs.
| ||||||||||
abstract void |
addFragment(String fragment)
Add a fragment of key/value pairs.
| ||||||||||
abstract void |
addParameter(String name, String value)
Add a name/value pair.
| ||||||||||
abstract NamespaceEncoder |
getNamespaceEncoder()
Each ParameterBuilder instance is associated with a NamespaceEncoder instance that is may choose
to use for encoding a namespace into the output form.
| ||||||||||
abstract String |
getTargetBase()
Returns the target base supplied to this ParameterBuilder via
setTargetBase(String) . | ||||||||||
abstract String |
getTargetPrefix()
Returns the target prefix supplied to this ParameterBuilder via
setTargetPrefix(String) . | ||||||||||
abstract String |
getTargetSuffix()
Returns the target suffix supplied to this ParameterBuilder via
setTargetSuffix(String) . | ||||||||||
abstract void |
init(Object parent)
Initialize this object (supplying the parent object as the only parameter).
| ||||||||||
abstract boolean |
isEmpty()
This method returns
true if no target base was added nor any parameters. | ||||||||||
abstract void |
setInitialSize(int chars)
Set the initial size for this ParameterBuilder object.
| ||||||||||
abstract void |
setNamespaceEncoder(NamespaceEncoder nse)
This method can be used to set the
NamespaceEncoder object used with this ParameterBuilder
instance. | ||||||||||
abstract void |
setTargetBase(String targetBase)
Specify a target base URI (for URL generation).
| ||||||||||
abstract void |
setTargetPrefix(String targetPrefix)
Specifies a prefix string to appear before the Target Base.
| ||||||||||
abstract void |
setTargetSuffix(String targetSuffix)
Specifies a suffix string to appear after the Target Base.
| ||||||||||
abstract String |
toString()
Get the entire collection of parameters as a string.
|
Add the event information, which is represented in key/value pairs.
event | the event to add. |
---|---|
eventElements | A bit mask value composed of constants from EnumEventElement . These
determine what elements of the event is added. |
howMuchChildState | If children state is to be added, this parameter (whose values come from *
EnumWebPersistableState ) determines how much state.
|
Add a fragment of key/value pairs. This method is discouraged as it requires parsing of the incoming
string fragment. It is preferable to use addParameter(String, String)
. It is the responsibility of each
ParameterBuilder implementation to determine how to parse this fragment.
fragment | A string fragment which must be parsed for a sequence of key/value pairs. |
---|
Add a name/value pair.
name | The name of a WebEvent element. |
---|---|
value | The value of a WebEvent element. |
Each ParameterBuilder instance is associated with a NamespaceEncoder instance that is may choose to use for encoding a namespace into the output form. This method returns that object instance.
NamespaceEncoder
instance associated with this ParameterBuilder.
Returns the target base supplied to this ParameterBuilder via setTargetBase(String)
. If none was supplied, then
this method returns null
.
setTargetBase(String)
. If never called, it
returns null
.
Returns the target prefix supplied to this ParameterBuilder via setTargetPrefix(String)
. If none was supplied, then
this method returns null
. A prefix is often to use to prepend an absolute path to a relative one. If
supplied, it will be added directly before the target base.
setTargetPrefix(String)
. If never called, it
returns null
.
Returns the target suffix supplied to this ParameterBuilder via setTargetSuffix(String)
. If none was supplied, then
this method returns null
.
setTargetSuffix(String)
. If never called, it
returns null
.
Initialize this object (supplying the parent object as the only parameter).
parent | The parent (enclosing) object that this Parameter Builder is attached to. |
---|
This method returns true
if no target base was added nor any parameters. It is not related to
whether a target prefix/suffix was added. It is identical to asking whether the returned string (if requested
now) would return empty or not.
Set the initial size for this ParameterBuilder object. Each implementation may choose to use this method to efficiently size the ParameterBuilder to support a set of key/value pairs whose total number of characters is supplied as the input parameter.
chars | A rough estimate of the total number of key/value characters to be submitted by the caller. |
---|
This method can be used to set the NamespaceEncoder
object used with this ParameterBuilder
instance.
nse | The NamespaceEncoder object to be used with this ParameterBuilder.
|
---|
Specify a target base URI (for URL generation). In the event that this ParameterBuilder is used to
build a URI, then the supplied string should be used as the base URI (with all key/value pairs
added after an initial '?'). This method works in conjunction with setTargetPrefix(String)
and setTargetSuffix(String)
. When a string form of the ParameterBuilder object is requested
(via #toString), then targetURI (if present) is added to the string along with a prefix or suffix.
If a target was not supplied, then neither prefix or suffix will be added to the string (even if
they are non-empty).
targetBase | The base URI to be used for this set of key/value pairs. |
---|
Specifies a prefix string to appear before the Target Base. A prefix is often to use to prepend an absolute path to a relative one. If supplied, it will be added directly before the target base (without any other characters). This string is not added if the TargetBase has not been explicitly set.
targetPrefix | A string to be prepended to the Target Base. |
---|
Specifies a suffix string to appear after the Target Base. A suffix is often to use to append extra path information or extra parameters (e.g., ";key=value"). If supplied, it will be added directly after the target base (without any other characters). This string is not added if the TargetBase has not been explicitly set.
targetSuffix | A string to be appended to the Target Base. |
---|
Get the entire collection of parameters as a string.
EnumWebPersistableState
) determines how much state.