Interface ProvisioningHandler
A
ProvisioningHandler defines the service API to be implemented by service providers extending the
provisioning mechanism. Service providers may register OSGi services of this type to be used by the provisioning
default servlet to handle the provisioning of a specific service integration.
The ProvisioningHandler service must be registered with a CLOUDSERVICE_ID
registration property giving the name of the service integration supported by the service. The names will be used by
the provisioning default servlet to match the request parameter servicename with the correct handler to
trigger the provisioning.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the service registration property indicating the name(s) of the service provided by the provisioning implementation. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToPaths(ResourceResolver resourceResolver, String[] paths, Resource configuration) Applies theconfigurationto the specifiedpaths.voidrevokeFromPaths(ResourceResolver resourceResolver, String[] paths, Resource configuration) Revokes theconfigurationfrom the specifiedpaths.voidrollback(ResourceResolver resourceResolver, Map<String, Object> properties) Is rolling back the setup step.setup(ResourceResolver resourceResolver, Map<String, Object> properties) Triggers the provisioning of a cloud service.
-
Field Details
-
CLOUDSERVICE_ID
The name of the service registration property indicating the name(s) of the service provided by the provisioning implementation. The value of this service property must be a single String.- See Also:
-
-
Method Details
-
setup
Resource setup(ResourceResolver resourceResolver, Map<String, Object> properties) throws ProvisioningExceptionTriggers the provisioning of a cloud service.- Parameters:
resourceResolver- AResourceResolverinstanceproperties- AMapof the properties required to do the provisioning.- Returns:
- Newly created service configuration
- Throws:
ProvisioningException- if an error occurs during the setup
-
rollback
void rollback(ResourceResolver resourceResolver, Map<String, Object> properties) throws ProvisioningExceptionIs rolling back the setup step.- Parameters:
resourceResolver- AResourceResolverinstanceproperties- AMapof the properties required to do the provisioning.- Throws:
ProvisioningException- if an error occurs during the rollback
-
applyToPaths
void applyToPaths(ResourceResolver resourceResolver, String[] paths, Resource configuration) throws ProvisioningException Applies theconfigurationto the specifiedpaths.- Parameters:
resourceResolver- AResourceResolverinstancepaths- An Array of paths to apply theconfigurationtoconfiguration- ConfigurationResourcecreated by thesetup(ResourceResolver, Map)method.- Throws:
ProvisioningException- if an error occurs during application
-
revokeFromPaths
void revokeFromPaths(ResourceResolver resourceResolver, String[] paths, Resource configuration) throws ProvisioningException Revokes theconfigurationfrom the specifiedpaths.- Parameters:
resourceResolver- AResourceResolverinstancepaths- the paths to revoke theconfigurationfromconfiguration- configurationResource- Throws:
ProvisioningException- if an error occurs during the revoke
-