java.lang.Object | |
↳ | com.microstrategy.web.platform.AbstractParameterBuilder |
![]() |
![]() |
An abstract implementation for ParameterBuilder which stores all information supplied, but is unable to convert it to a string. Each subclass implements the toString and the isEmpty methods.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected int | _initialSize | The initial size of the buffer to hold the ParameterBuilder contents... | |||||||||
protected NamespaceEncoder | _namespaceEncoder | A stored NamespaceEncoder instance which is managed by this class.aggregation
clientCardinality 1
supplierCardinality 1 |
|||||||||
protected Parameters | _parameters | An array of key/value pairs that were added... | |||||||||
protected String | _targetBase | The Target Base | |||||||||
protected String | _targetPrefix | The Target Prefix | |||||||||
protected String | _targetSuffix | The Target Suffix |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractParameterBuilder() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addEventInfo(WebEvent event, int eventElements, int howMuchChildState)
Adds into the current object the event information in the format of key/value pairs.
| ||||||||||
void |
addParameter(String name, String value)
Add a name/value pair.
| ||||||||||
static boolean |
areAllBitsSet(int intVal, int bits)
Determines whether the specified integer value has set all its bits specified
through the the parameter
bits . | ||||||||||
NamespaceEncoder |
getNamespaceEncoder()
The current
NamespaceEncoder associated with this ParameterBuilder. | ||||||||||
Iterator |
getParameters()
Return an iterator for the list of parameters.
| ||||||||||
String |
getTargetBase()
Returns the target base supplied to this ParameterBuilder via
setTargetBase(String) . | ||||||||||
String |
getTargetPrefix()
Returns the target prefix supplied to this ParameterBuilder via
setTargetPrefix(String) . | ||||||||||
String |
getTargetSuffix()
Returns the target suffix supplied to this ParameterBuilder via
setTargetSuffix(String) . | ||||||||||
void |
init(Object parent)
Initializes this class by attaching up a namespace encoder (as provided by the parent).
| ||||||||||
static boolean |
isAnyBitSet(int intVal, int bits)
Determines whether the specified integer value has set any bit specified
through the the parameter
bits . | ||||||||||
void |
setInitialSize(int chars)
The initial size of the
ParameterBuilder in number of characters. | ||||||||||
void |
setNamespaceEncoder(NamespaceEncoder nse)
Assign the supplied
NamespaceEncoder to this ParameterBuilder instance. | ||||||||||
void |
setTargetBase(String targetBase)
Specify a target base URI (for URL generation).
| ||||||||||
void |
setTargetPrefix(String targetPrefix)
Specifies a prefix string to appear before the Target Base.
| ||||||||||
void |
setTargetSuffix(String targetSuffix)
Specifies a suffix string to appear after the Target Base.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
parseEntireURLStringFragment(String fragment)
This method parses a string fragment that is belived to contain an entire
URL (base URI plus zero or more parameters).
| ||||||||||
void |
parseURLParameterFragment(String fragment)
This method parses a string fragment that is believed to contain only URL
parameters ("...&key1=value1&...").
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
The initial size of the buffer to hold the ParameterBuilder contents...
A stored NamespaceEncoder
instance which is managed by this class.aggregation
clientCardinality 1
supplierCardinality 1
The Target Base
The Target Prefix
The Target Suffix
Adds into the current object the event information in the format of key/value pairs.
event | the event whose information to be added. |
---|---|
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 name/value pair.
name | The name of a WebEvent element. |
---|---|
value | The value of a WebEvent element. |
Determines whether the specified integer value has set all its bits specified
through the the parameter bits
.
intVal | an integer value whose bits to be checked |
---|---|
bits | the bits to check |
true
if all bits specified through the parameter
bits
are set in the specified integer value intVal
.
The current NamespaceEncoder
associated with this ParameterBuilder.
NamespaceEncoder
associated with this ParameterBuilder.
Return an iterator for the list of parameters.
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
.
Initializes this class by attaching up a namespace encoder (as provided by the parent).
parent | The enclosing parent for this ParameterBuilder instance. |
---|
Determines whether the specified integer value has set any bit specified
through the the parameter bits
.
intVal | an integer value whose bits to be checked |
---|---|
bits | the bits to check |
true
if any bit specified through the parameter
bits
is set in the specified integer value intVal
.
The initial size of the ParameterBuilder
in number of characters.
chars | A rough estimate of the total number of characters added in all key/value pairs. |
---|
Assign the supplied NamespaceEncoder
to this ParameterBuilder instance.
nse | The NamespaceEncoder instance to use 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. |
---|
This method parses a string fragment that is belived to contain an entire
URL (base URI plus zero or more parameters). If the base URI is found (which
is any non-empty string before the first '?' character), then it is added via
setTargetBase(String)
. The remaining string is parsed via parseURLParameterFragment(String)
.
fragment | A string representing a complete URL. |
---|
This method parses a string fragment that is believed to contain only URL
parameters ("...&key1=value1&..."). The fragment is first tokenized by
the ampersand character (to yield a key/value pair separated by '='). Next,
each pair is tokenized by the equals sign and broken into a key and value.
Each pair is then saved using addParameter(String, String)
.
fragment | A string representing a set of URL parameters. |
---|