@Portable public class DefaultPlaceRequest extends Object implements PlaceRequest
Modifier and Type | Field and Description |
---|---|
protected String |
identifier |
protected Map<String,String> |
parameters |
NOWHERE
Constructor and Description |
---|
DefaultPlaceRequest() |
DefaultPlaceRequest(String identifier)
Creates a place request for the given place ID.
|
DefaultPlaceRequest(String identifier,
Map<String,String> parameters)
Creates a place request for the given place ID with the given
state parameters for that place.
|
DefaultPlaceRequest(String identifier,
Map<String,String> parameters,
boolean updateLocationBar)
Creates a place request for the given place ID, with the given state parameters for that place, and the given
preference of whether or not the browser's location bar should be updated.
|
Modifier and Type | Method and Description |
---|---|
PlaceRequest |
addParameter(String name,
String value) |
PlaceRequest |
clone() |
boolean |
equals(Object o) |
String |
getFullIdentifier() |
String |
getIdentifier() |
String |
getParameter(String key,
String defaultValue) |
Set<String> |
getParameterNames() |
Map<String,String> |
getParameters() |
int |
hashCode() |
boolean |
isUpdateLocationBarAllowed()
Indicates whether or not the Workbench framework should add a browser history item when navigating to this place.
|
static PlaceRequest |
parse(CharSequence partNameAndParams)
Creates a new place request from a string that encodes a place ID and optional parameters in standard URL query
syntax.
|
void |
setIdentifier(String identifier) |
void |
setUpdateLocationBar(boolean updateLocationBar) |
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
asString, getPath
protected String identifier
public DefaultPlaceRequest()
public DefaultPlaceRequest(String identifier)
identifier
- The place ID, or an empty string for the default place.public DefaultPlaceRequest(String identifier, Map<String,String> parameters)
identifier
- The place ID, or an empty string for the default place.parameters
- Place-specific parameters to pass to the place. Must not be null.public DefaultPlaceRequest(String identifier, Map<String,String> parameters, boolean updateLocationBar)
identifier
- The place ID, or an empty string for the default place.parameters
- Place-specific parameters to pass to the place. Must not be null.updateLocationBar
- If true, the browser's history will be updated with this place request. If false, the location bar
will not be modified as a result of this place request.public static PlaceRequest parse(CharSequence partNameAndParams)
For example, the following returns a PlaceRequest with identifier MyPlaceID
and two parameters,
param1
and param2
.
DefaultPlaceRequest.parse("MyPlaceID?param1=val1¶m2=val2")
partNameAndParams
- specification of the place ID and optional parameter map. Special characters in the identifier, key
name, or key value can be escaped using URL encoding: for '%' use '%25'; for '&' use '%26'; for
'=' use '%3d'; for '?' use '%3f'.public String getIdentifier()
getIdentifier
in interface PlaceRequest
public void setIdentifier(String identifier)
setIdentifier
in interface PlaceRequest
public String getFullIdentifier()
getFullIdentifier
in interface PlaceRequest
public String getParameter(String key, String defaultValue)
getParameter
in interface PlaceRequest
public Set<String> getParameterNames()
getParameterNames
in interface PlaceRequest
public Map<String,String> getParameters()
getParameters
in interface PlaceRequest
public PlaceRequest addParameter(String name, String value)
addParameter
in interface PlaceRequest
public PlaceRequest clone()
clone
in interface PlaceRequest
clone
in class Object
public boolean isUpdateLocationBarAllowed()
PlaceRequest
isUpdateLocationBarAllowed
in interface PlaceRequest
public void setUpdateLocationBar(boolean updateLocationBar)
setUpdateLocationBar
in interface PlaceRequest
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.