Interface URIBuilderForResource
-
public interface URIBuilderForResourceThis class provides useful methods to generate URI to EBX® packaged resources.For localized resources, methods that do not provide a
Localeparameter will use the current request's locale (the one returned by methodSessionContext.getLocale()).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description URIbuildForResource(ResourceType aResourceType, String aResourceName)Builds a URI of the specified web resource from the current module using current request's locale.URIbuildForResource(ResourceType aResourceType, String aResourceName, Locale aLocale)Builds aURIof the specified web resource from the current module for the specified locale.URIbuildForResource(SchemaNode aSchemaNode, Object aValue)Builds aURIfor a the web resource specified by a node value.URIbuildForResource(String aResourcePath)Builds aURIfor the specified web resource.UriBuilderfromResource(ResourceType aResourceType, String aResourceName)Creates a newUriBuilderinstance for the current module using current request's locale.UriBuilderfromResource(ResourceType aResourceType, String aResourceName, Locale aLocale)Creates a newUriBuilderinstance for the current module.UriBuilderfromResource(SchemaNode aSchemaNode, Object aValue)Creates a newUriBuilderinstance for the current module and a node value.UriBuilderfromResource(String aResourcePath)Creates a newUriBuilderinstance representing aURIinitialized fromthisbuilder state and the provided resource path.
-
-
-
Method Detail
-
buildForResource
URI buildForResource(String aResourcePath)
Builds aURIfor the specified web resource.The built-in
URIdoes not hold any query parameter.Calling this method is the same as calling
this.fromResource(aResourcePath).build().- See Also:
fromResource(String)
-
fromResource
UriBuilder fromResource(String aResourcePath)
Creates a newUriBuilderinstance representing aURIinitialized fromthisbuilder 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
- Parameters:
aResourcePath- resource path interpreted as relative to the module (web application).
-
buildForResource
URI buildForResource(ResourceType aResourceType, String aResourceName) throws IllegalArgumentException
Builds a URI of the specified web resource from the current module using current request's locale.Calling this method is same as calling
this.fromResource(aResourceType, aResourceName).build();.
-
fromResource
UriBuilder fromResource(ResourceType aResourceType, String aResourceName) throws IllegalArgumentException
Creates a newUriBuilderinstance 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.
- Parameters:
aResourceType- the resource typeaResourceName- the resource name- Throws:
IllegalArgumentException- if the providedResourceTypeisnull
-
buildForResource
URI buildForResource(ResourceType aResourceType, String aResourceName, Locale aLocale) throws IllegalArgumentException
Builds aURIof 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();.- Throws:
IllegalArgumentException- See Also:
fromResource(ResourceType, String, Locale)
-
fromResource
UriBuilder fromResource(ResourceType aResourceType, String aResourceName, Locale aLocale) throws IllegalArgumentException
Creates a newUriBuilderinstance 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.
- Parameters:
aResourceType- the resource typeaResourceName- the resource nameaLocale- the locale to consider, can benull, for more details seeURIBuilderForResource- Throws:
IllegalArgumentException- if the providedResourceTypeisnull
-
buildForResource
URI buildForResource(SchemaNode aSchemaNode, Object aValue) throws IllegalArgumentException
Builds aURIfor a the web resource specified by a node value.Calling this method is the same as calling
this.fromResource(aSchemaNode, aValue).build();.- Parameters:
aSchemaNode- the schema node where the value comes from. It must be anosd:resourcetype.aValue- the value of theosd:resourcetype.- Throws:
IllegalArgumentException- if the schema node or the value is not anosd:resourcetype.- See Also:
fromResource(SchemaNode, Object), Resource type documentation
-
fromResource
UriBuilder fromResource(SchemaNode aSchemaNode, Object aValue) throws IllegalArgumentException
Creates a newUriBuilderinstance 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.
- Parameters:
aSchemaNode- the schema node where the value comes from. it must be anosd:resourcetype.aValue- the value of theosd:resourcetype.- Throws:
IllegalArgumentException- if the schema node or the value is not anosd:resourcetype.
-
-