public interface URIBuilderForResource
For localized resources, methods that do not provide a Locale
parameter will use the current request's
locale (the one returned by method SessionContext.getLocale()
).
Modifier and Type | Method and Description |
---|---|
URI |
buildForResource(ResourceType aResourceType,
String aResourceName)
Builds a URI of the specified web resource from the current module
using current request's locale.
|
URI |
buildForResource(ResourceType aResourceType,
String aResourceName,
Locale aLocale)
Builds a
URI of the specified web resource from the current module
for the specified locale. |
URI |
buildForResource(SchemaNode aSchemaNode,
Object aValue)
Builds a
URI for a the web resource specified by a node value. |
URI |
buildForResource(String aResourcePath)
Builds a
URI for the specified web resource. |
UriBuilder |
fromResource(ResourceType aResourceType,
String aResourceName)
Creates a new
UriBuilder instance for the current module using current request's
locale. |
UriBuilder |
fromResource(ResourceType aResourceType,
String aResourceName,
Locale aLocale)
Creates a new
UriBuilder instance for the current module. |
UriBuilder |
fromResource(SchemaNode aSchemaNode,
Object aValue)
Creates a new
UriBuilder instance for the current module and a node value. |
UriBuilder |
fromResource(String aResourcePath)
Creates a new
UriBuilder instance representing a URI
initialized from this builder state and
the provided resource path. |
URI buildForResource(String aResourcePath)
URI
for the specified web resource.
The built-in URI
does not hold any query parameter.
Calling this method is the same as calling
this.fromResource(aResourcePath).build()
.
fromResource(String)
UriBuilder fromResource(String aResourcePath)
UriBuilder
instance representing a URI
initialized from this
builder state and
the provided resource path.
Overriding already provided values is not supported and must be avoided. These values can be: the scheme, the host, the port, the root path or some query parameters
aResourcePath
- resource path interpreted as relative to the module (web application).URI buildForResource(ResourceType aResourceType, String aResourceName) throws IllegalArgumentException
Calling this method is same as calling
this.fromResource(aResourceType, aResourceName).build();
.
UriBuilder fromResource(ResourceType aResourceType, String aResourceName) throws IllegalArgumentException
UriBuilder
instance for the current module using current request's
locale.
Overriding already provided values is not supported and must be avoided. These values can be: the scheme, the host, the port, the root path or some query parameters.
aResourceType
- the resource typeaResourceName
- the resource nameIllegalArgumentException
- if the provided ResourceType
is null
URI buildForResource(ResourceType aResourceType, String aResourceName, Locale aLocale) throws IllegalArgumentException
URI
of the specified web resource from the current module
for the specified locale.
Calling this method is the same as calling
this.fromResource(aResourceType, aResourceName, aLocale).build();
.
IllegalArgumentException
fromResource(ResourceType, String, Locale)
UriBuilder fromResource(ResourceType aResourceType, String aResourceName, Locale aLocale) throws IllegalArgumentException
UriBuilder
instance for the current module.
Overriding already provided values is not supported and must be avoided. These values can be: the scheme, the host, the port, the root path or some query parameters.
aResourceType
- the resource typeaResourceName
- the resource nameaLocale
- the locale to consider, can be null
,
for more details see URIBuilderForResource
IllegalArgumentException
- if the provided ResourceType
is null
URI buildForResource(SchemaNode aSchemaNode, Object aValue) throws IllegalArgumentException
URI
for a the web resource specified by a node value.
Calling this method is the same as calling
this.fromResource(aSchemaNode, aValue).build();
.
aSchemaNode
- the schema node where the value comes from.
It must be an osd:resource
type.aValue
- the value of the osd:resource
type.IllegalArgumentException
- if the schema node or the value is not an osd:resource
type.fromResource(SchemaNode, Object)
,
Resource type documentationUriBuilder fromResource(SchemaNode aSchemaNode, Object aValue) throws IllegalArgumentException
UriBuilder
instance for the current module and a node value.
Overriding already provided values is not supported and must be avoided. These values can be: the scheme, the host, the port, the root path or some query parameters.
aSchemaNode
- the schema node where the value comes from.
it must be an osd:resource
type.aValue
- the value of the osd:resource
type.IllegalArgumentException
- if the schema node or the value is not an
osd:resource
type.