com.ibm.portal.cp.resources.builder
Interface CustomResourceBuilder
- All Known Implementing Classes:
- AbstractCustomResourceBuilder
-
public interface CustomResourceBuilder
A CustomResourceBuilder allows to build
s. This interface
allows to filter out resources, e. g. if certain users have no permissions on
a resource. Additionally this interface allows to provide
Localized information about a resource, i. e. titles
and descrptions.
- Since:
- 7.0.0
- Note:
This interface is designed to be implemented by clients. |
build
CustomResource build(CustomResourceBuilder.ResourceParameters resourceParameters)
throws ResourceBuilderException
- This method will be called by the
com.ibm.portal.cp.resources.ResourceModel when a resource has
to be assembled. Implementations must be able to build a
CustomResource even for the case that not yet a tag or
rating have been persisted for the given resource (parameters), i. e.
there will not be a database representation of this custom resource yet.
- Parameters:
- resourceParameters - The parameters needed to build a custom resource, never
null.
- Returns:
- The assembled custom resource. If a resource is filtered out, e.
g. due to missing permissions, null can be returned.
- Throws:
- ResourceBuilderException - In case the assembly of the resource failed, e. g. if a
backend cannot be reached.
build
java.util.List<CustomResource> build(java.util.List<CustomResourceBuilder.ResourceParameters> resourceParameters)
throws ResourceBuilderException
- Method for batch processing.
- Parameters:
- a - (potentially) unmodifiable list of resourceParameters which
are needed to build the custom resources, never
null. Implementations must be able to build
CustomResources even for the case that not yet a
tag or rating have been persisted for the given resources
(parameters), i. e. there will not be a database
representation of these custom resources yet.
- Returns:
- A list of assembled custom resources, never null,
but may be empty if all resources have been filtered out.
- Throws:
- ResourceBuilderException - In case the assembly of the resource failed, e. g. if a
backend cannot be reached.
- See Also:
- build(ResourceParameters)