Interface ResourceServiceBroker
-
- All Known Implementing Classes:
AbstractDelegatingResourceServiceBroker
,AbstractResourceServiceBroker
public interface ResourceServiceBroker
CRISP Resource Service Broker abstraction.This interface abstracts a "Broker" pattern for various
Resource
s from different backends. So, application codes can simply invoke operations of this "Broker" interface to retrieve or manipulate anyResource
s from different backends without having to worry about the details about the underlying backends.Another important aspect is that this "Broker" interface takes care of caching of
Resource
representations and cache invalidations. So, application codes do not have to worry about caching and cache invalidations in application layer any more, but they can transparently invoke the operations of this interface. Then this "Broker" implementation should take care of all the details including caching, cache invalidations, etc.Also, this "Broker" service is normally registered through
HippoServiceRegistry
. So, applications can access this singleton "Broker" service like the following example:ResourceServiceBroker broker = HippoServiceRegistry.getService(ResourceServiceBroker.class);
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Resource
findResources(String resourceSpace, String baseAbsPath)
Resolves a properResourceResolver
by the specifiedresourceSpace
and searchResource
representations frombaseAbsPath
and returns a parentResource
representation which contains a collection of childResource
representations.Resource
findResources(String resourceSpace, String baseAbsPath, Map<String,Object> pathVariables)
Resolves a properResourceResolver
by the specifiedresourceSpace
and searchResource
representations frombaseAbsPath
and returns a parentResource
representation which contains a collection of childResource
representations.Resource
findResources(String resourceSpace, String baseAbsPath, Map<String,Object> pathVariables, ExchangeHint exchangeHint)
Resolves a properResourceResolver
by the specifiedresourceSpace
and searchResource
representations frombaseAbsPath
and returns a parentResource
representation which contains a collection of childResource
representations.Resource
findResources(String resourceSpace, String baseAbsPath, ExchangeHint exchangeHint)
Resolves a properResourceResolver
by the specifiedresourceSpace
and searchResource
representations frombaseAbsPath
and returns a parentResource
representation which contains a collection of childResource
representations.ResourceBeanMapper
getResourceBeanMapper(String resourceSpace)
Returns a properResourceBeanMapper
for the givenresourceSpace
.ResourceDataCache
getResourceDataCache(String resourceSpace)
Returns a proper resource cache store representation (ResourceDataCache
) for the specifiedresourceSpace
, or null if caching is disabled.Resource
resolve(String resourceSpace, String absPath)
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleResource
representation byabsPath
.Resource
resolve(String resourceSpace, String absPath, Map<String,Object> pathVariables)
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleResource
representation byabsPath
.Resource
resolve(String resourceSpace, String absPath, Map<String,Object> pathVariables, ExchangeHint exchangeHint)
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleResource
representation byabsPath
.Resource
resolve(String resourceSpace, String absPath, ExchangeHint exchangeHint)
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleResource
representation byabsPath
.Binary
resolveBinary(String resourceSpace, String absPath)
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleBinary
representation byabsPath
.Binary
resolveBinary(String resourceSpace, String absPath, Map<String,Object> pathVariables)
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleBinary
representation byabsPath
.Binary
resolveBinary(String resourceSpace, String absPath, Map<String,Object> pathVariables, ExchangeHint exchangeHint)
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleBinary
representation byabsPath
.Binary
resolveBinary(String resourceSpace, String absPath, ExchangeHint exchangeHint)
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleBinary
representation byabsPath
.Resource
resolveBinaryAsResource(String resourceSpace, String absPath)
Resolves a properResourceResolver
by the specifiedresourceSpace
, resolves singleBinary
representation byabsPath
, and converts theBinary
representation into aResource
.Resource
resolveBinaryAsResource(String resourceSpace, String absPath, Map<String,Object> pathVariables)
Resolves a properResourceResolver
by the specifiedresourceSpace
, resolves singleBinary
representation byabsPath
, and converts theBinary
representation into aResource
.Resource
resolveBinaryAsResource(String resourceSpace, String absPath, Map<String,Object> pathVariables, ExchangeHint exchangeHint)
Resolves a properResourceResolver
by the specifiedresourceSpace
, resolves singleBinary
representation byabsPath
, and converts theBinary
representation into aResource
.Resource
resolveBinaryAsResource(String resourceSpace, String absPath, ExchangeHint exchangeHint)
Resolves a properResourceResolver
by the specifiedresourceSpace
, resolves singleBinary
representation byabsPath
, and converts theBinary
representation into aResource
.URI
resolveFullURI(String resourceSpace, String absPath)
Resolves a full URI determined and resolved for the specificresourceSpace
and theabsPath
.URI
resolveFullURI(String resourceSpace, String absPath, Map<String,Object> pathVariables)
Resolves a full URI determined and resolved for the specificresourceSpace
and theabsPath
.ResourceLink
resolveLink(String resourceSpace, Resource resource)
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves aResourceLink
for the givenresource
.ResourceLink
resolveLink(String resourceSpace, Resource resource, Map<String,Object> linkVariables)
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves aResourceLink
for the givenresource
with passinglinkVariables
that can be used by implementation to expand its internal link generation template.
-
-
-
Method Detail
-
resolve
Resource resolve(String resourceSpace, String absPath) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleResource
representation byabsPath
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aResource
- Returns:
- single
Resource
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolve
Resource resolve(String resourceSpace, String absPath, ExchangeHint exchangeHint) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleResource
representation byabsPath
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.If a non-null
exchangeHint
is given, then it can be understood by the specificResourceResolver
implementation for its specific backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aResource
exchangeHint
- a message exchange hint for the backend- Returns:
- single
Resource
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolve
Resource resolve(String resourceSpace, String absPath, Map<String,Object> pathVariables) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleResource
representation byabsPath
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.The
absPath
template is expanded using the given path variables (pathVariables
), if any. For example, ifpathVariables
looks like{"var1":"hello","var2":"world"}
andabsPath
is".../some/path/{var1}/{var2}/overview"
, then it is expanded to".../some/path/hello/world/overview"
by thepathVariables
when making a real request to the backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aResource
pathVariables
- the variables to expand the template given byabsPath
- Returns:
- single
Resource
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolve
Resource resolve(String resourceSpace, String absPath, Map<String,Object> pathVariables, ExchangeHint exchangeHint) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleResource
representation byabsPath
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.The
absPath
template is expanded using the given path variables (pathVariables
), if any. For example, ifpathVariables
looks like{"var1":"hello","var2":"world"}
andabsPath
is".../some/path/{var1}/{var2}/overview"
, then it is expanded to".../some/path/hello/world/overview"
by thepathVariables
when making a real request to the backend.If a non-null
exchangeHint
is given, then it can be understood by the specificResourceResolver
implementation for its specific backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aResource
pathVariables
- the variables to expand the template given byabsPath
exchangeHint
- a message exchange hint for the backend- Returns:
- single
Resource
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolveBinary
Binary resolveBinary(String resourceSpace, String absPath) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleBinary
representation byabsPath
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aBinary
- Returns:
- single
Binary
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolveBinary
Binary resolveBinary(String resourceSpace, String absPath, ExchangeHint exchangeHint) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleBinary
representation byabsPath
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.If a non-null
exchangeHint
is given, then it can be understood by the specificResourceResolver
implementation for its specific backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aBinary
exchangeHint
- a message exchange hint for the backend- Returns:
- single
Binary
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolveBinary
Binary resolveBinary(String resourceSpace, String absPath, Map<String,Object> pathVariables) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleBinary
representation byabsPath
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.The
absPath
template is expanded using the given path variables (pathVariables
), if any. For example, ifpathVariables
looks like{"var1":"hello","var2":"world"}
andabsPath
is".../some/path/{var1}/{var2}/overview"
, then it is expanded to".../some/path/hello/world/overview"
by thepathVariables
when making a real request to the backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aBinary
pathVariables
- the variables to expand the template given byabsPath
- Returns:
- single
Binary
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolveBinary
Binary resolveBinary(String resourceSpace, String absPath, Map<String,Object> pathVariables, ExchangeHint exchangeHint) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves singleBinary
representation byabsPath
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.The
absPath
template is expanded using the given path variables (pathVariables
), if any. For example, ifpathVariables
looks like{"var1":"hello","var2":"world"}
andabsPath
is".../some/path/{var1}/{var2}/overview"
, then it is expanded to".../some/path/hello/world/overview"
by thepathVariables
when making a real request to the backend.If a non-null
exchangeHint
is given, then it can be understood by the specificResourceResolver
implementation for its specific backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aBinary
pathVariables
- the variables to expand the template given byabsPath
exchangeHint
- a message exchange hint for the backend- Returns:
- single
Binary
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolveBinaryAsResource
Resource resolveBinaryAsResource(String resourceSpace, String absPath) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
, resolves singleBinary
representation byabsPath
, and converts theBinary
representation into aResource
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aBinary
- Returns:
- a
Resource
object converted from the singleBinary
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolveBinaryAsResource
Resource resolveBinaryAsResource(String resourceSpace, String absPath, ExchangeHint exchangeHint) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
, resolves singleBinary
representation byabsPath
, and converts theBinary
representation into aResource
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.If a non-null
exchangeHint
is given, then it can be understood by the specificResourceResolver
implementation for its specific backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aBinary
exchangeHint
- a message exchange hint for the backend- Returns:
- a
Resource
object converted from the singleBinary
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolveBinaryAsResource
Resource resolveBinaryAsResource(String resourceSpace, String absPath, Map<String,Object> pathVariables) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
, resolves singleBinary
representation byabsPath
, and converts theBinary
representation into aResource
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.The
absPath
template is expanded using the given path variables (pathVariables
), if any. For example, ifpathVariables
looks like{"var1":"hello","var2":"world"}
andabsPath
is".../some/path/{var1}/{var2}/overview"
, then it is expanded to".../some/path/hello/world/overview"
by thepathVariables
when making a real request to the backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aBinary
pathVariables
- the variables to expand the template given byabsPath
- Returns:
- a
Resource
object converted from the singleBinary
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolveBinaryAsResource
Resource resolveBinaryAsResource(String resourceSpace, String absPath, Map<String,Object> pathVariables, ExchangeHint exchangeHint) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
, resolves singleBinary
representation byabsPath
, and converts theBinary
representation into aResource
.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.The
absPath
template is expanded using the given path variables (pathVariables
), if any. For example, ifpathVariables
looks like{"var1":"hello","var2":"world"}
andabsPath
is".../some/path/{var1}/{var2}/overview"
, then it is expanded to".../some/path/hello/world/overview"
by thepathVariables
when making a real request to the backend.If a non-null
exchangeHint
is given, then it can be understood by the specificResourceResolver
implementation for its specific backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aBinary
pathVariables
- the variables to expand the template given byabsPath
exchangeHint
- a message exchange hint for the backend- Returns:
- a
Resource
object converted from the singleBinary
representation byabsPath
- Throws:
ResourceException
- if resource resolution operation fails
-
findResources
Resource findResources(String resourceSpace, String baseAbsPath) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and searchResource
representations frombaseAbsPath
and returns a parentResource
representation which contains a collection of childResource
representations.baseAbsPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenbaseAbsPath
can be a URI path or part of URL. Or, as an example, thebaseAbsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
baseAbsPath
- base absolute path of aResource
- Returns:
- a parent
Resource
representation which contains a collection of childResource
representations - Throws:
ResourceException
- if resource resolution operation fails
-
findResources
Resource findResources(String resourceSpace, String baseAbsPath, ExchangeHint exchangeHint) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and searchResource
representations frombaseAbsPath
and returns a parentResource
representation which contains a collection of childResource
representations.baseAbsPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenbaseAbsPath
can be a URI path or part of URL. Or, as an example, thebaseAbsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.If a non-null
exchangeHint
is given, then it can be understood by the specificResourceResolver
implementation for its specific backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
baseAbsPath
- base absolute path of aResource
exchangeHint
- a message exchange hint for the backend- Returns:
- a parent
Resource
representation which contains a collection of childResource
representations - Throws:
ResourceException
- if resource resolution operation fails
-
findResources
Resource findResources(String resourceSpace, String baseAbsPath, Map<String,Object> pathVariables) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and searchResource
representations frombaseAbsPath
and returns a parentResource
representation which contains a collection of childResource
representations.baseAbsPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenbaseAbsPath
can be a URI path or part of URL. Or, as an example, thebaseAbsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.The
baseAbsPath
template is expanded using the given path variables (pathVariables
), if any. For example, ifpathVariables
looks like{"var1":"hello","var2":"world"}
andbaseAbsPath
is".../some/path/{var1}/{var2}/overview"
, then it is expanded to".../some/path/hello/world/overview"
by thepathVariables
when making a real request to the backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
baseAbsPath
- base absolute path of aResource
pathVariables
- the variables to expand the template given byabsPath
- Returns:
- a parent
Resource
representation which contains a collection of childResource
representations - Throws:
ResourceException
- if resource resolution operation fails
-
findResources
Resource findResources(String resourceSpace, String baseAbsPath, Map<String,Object> pathVariables, ExchangeHint exchangeHint) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and searchResource
representations frombaseAbsPath
and returns a parentResource
representation which contains a collection of childResource
representations.baseAbsPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenbaseAbsPath
can be a URI path or part of URL. Or, as an example, thebaseAbsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.The
baseAbsPath
template is expanded using the given path variables (pathVariables
), if any. For example, ifpathVariables
looks like{"var1":"hello","var2":"world"}
andbaseAbsPath
is".../some/path/{var1}/{var2}/overview"
, then it is expanded to".../some/path/hello/world/overview"
by thepathVariables
when making a real request to the backend.If a non-null
exchangeHint
is given, then it can be understood by the specificResourceResolver
implementation for its specific backend.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
baseAbsPath
- base absolute path of aResource
pathVariables
- the variables to expand the template given byabsPath
exchangeHint
- a message exchange hint for the backend- Returns:
- a parent
Resource
representation which contains a collection of childResource
representations - Throws:
ResourceException
- if resource resolution operation fails
-
resolveLink
ResourceLink resolveLink(String resourceSpace, Resource resource) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves aResourceLink
for the givenresource
.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
resource
- resource representation- Returns:
- a
ResourceLink
for the givenresource
- Throws:
ResourceException
- if resource resolution operation fails
-
resolveLink
ResourceLink resolveLink(String resourceSpace, Resource resource, Map<String,Object> linkVariables) throws ResourceException
Resolves a properResourceResolver
by the specifiedresourceSpace
and resolves aResourceLink
for the givenresource
with passinglinkVariables
that can be used by implementation to expand its internal link generation template.How the
linkVariables
is used in link generation template expansion is totally up to an implementation.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
resource
- resource representationlinkVariables
- the variables to expand the internal link generation template- Returns:
- a
ResourceLink
for the givenresource
- Throws:
ResourceException
- if resource resolution operation fails
-
getResourceDataCache
ResourceDataCache getResourceDataCache(String resourceSpace) throws ResourceException
Returns a proper resource cache store representation (ResourceDataCache
) for the specifiedresourceSpace
, or null if caching is disabled.An implementation may return a default resource cache store representation (
ResourceDataCache
) as a fallback if the resolvedResourceResolver
doesn't have its ownResourceDataCache
instance (in other words, if the resolvedResourceCacheResolvable.getResourceDataCache()
return null).If an underlying resource resolver is explicitly disabled on caching (in other words, if the resolved
ResourceCacheResolvable.isCacheEnabled()
returns false), it should return null.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
- Returns:
- a proper resource cache store representation (
ResourceDataCache
) for the specifiedresourceSpace
, or a fallbackResourceDataCache
if the resolvedResourceResolver
doesn't have its ownResourceDataCache
instance - Throws:
ResourceException
- if resource space is not found
-
getResourceBeanMapper
ResourceBeanMapper getResourceBeanMapper(String resourceSpace) throws ResourceException
Returns a properResourceBeanMapper
for the givenresourceSpace
.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
- Returns:
- a proper
ResourceBeanMapper
for the givenresourceSpace
- Throws:
ResourceException
- if resource space is not foundUnsupportedOperationException
- if aResourceBeanMapper
is not supported for theresourceSpace
-
resolveFullURI
URI resolveFullURI(String resourceSpace, String absPath) throws ResourceException
Resolves a full URI determined and resolved for the specificresourceSpace
and theabsPath
. Or returns null if the backend cannot support a full URI access.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aResource
- Returns:
- URI representation by
absPath
- Throws:
ResourceException
- if resource resolution operation fails
-
resolveFullURI
URI resolveFullURI(String resourceSpace, String absPath, Map<String,Object> pathVariables) throws ResourceException
Resolves a full URI determined and resolved for the specificresourceSpace
and theabsPath
. Or returns null if the backend cannot support a full URI access.absPath
is a domain-specific path template that should be meaningful to the backend. For example, if the backend is a REST API, thenabsPath
can be a URI path or part of URL. Or, as an example, theabsPath
can be an index name of a search index, table name of databases or node path in JCR, totally depending onResourceResolver
implementations.The
absPath
template is expanded using the given path variables (pathVariables
), if any. For example, ifpathVariables
looks like{"var1":"hello","var2":"world"}
andabsPath
is".../some/path/{var1}/{var2}/overview"
, then it is expanded to".../some/path/hello/world/overview"
by thepathVariables
.- Parameters:
resourceSpace
- Resource space name to resolve a properResourceResolver
absPath
- absolute path of aResource
pathVariables
- the variables to expand the template given byabsPath
- Returns:
- URI representation by
absPath
- Throws:
ResourceException
- if resource resolution operation fails
-
-