Interface ProvisioningHandler
-
@ConsumerType public interface ProvisioningHandler
AProvisioningHandler
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 aCLOUDSERVICE_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 parameterservicename
with the correct handler to trigger the provisioning.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CLOUDSERVICE_ID
The name of the service registration property indicating the name(s) of the service provided by the provisioning implementation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
applyToPaths(ResourceResolver resourceResolver, java.lang.String[] paths, Resource configuration)
Applies theconfiguration
to the specifiedpaths
.void
revokeFromPaths(ResourceResolver resourceResolver, java.lang.String[] paths, Resource configuration)
Revokes theconfiguration
from the specifiedpaths
.void
rollback(ResourceResolver resourceResolver, java.util.Map<java.lang.String,java.lang.Object> properties)
Is rolling back the setup step.Resource
setup(ResourceResolver resourceResolver, java.util.Map<java.lang.String,java.lang.Object> properties)
Triggers the provisioning of a cloud service.
-
-
-
Field Detail
-
CLOUDSERVICE_ID
static final java.lang.String 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:
- Constant Field Values
-
-
Method Detail
-
setup
Resource setup(ResourceResolver resourceResolver, java.util.Map<java.lang.String,java.lang.Object> properties) throws ProvisioningException
Triggers the provisioning of a cloud service.- Parameters:
resourceResolver
- AResourceResolver
instanceproperties
- AMap
of 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, java.util.Map<java.lang.String,java.lang.Object> properties) throws ProvisioningException
Is rolling back the setup step.- Parameters:
resourceResolver
- AResourceResolver
instanceproperties
- AMap
of the properties required to do the provisioning.- Throws:
ProvisioningException
- if an error occurs during the rollback
-
applyToPaths
void applyToPaths(ResourceResolver resourceResolver, java.lang.String[] paths, Resource configuration) throws ProvisioningException
Applies theconfiguration
to the specifiedpaths
.- Parameters:
resourceResolver
- AResourceResolver
instancepaths
- An Array of paths to apply theconfiguration
toconfiguration
- ConfigurationResource
created by thesetup(ResourceResolver, Map)
method.- Throws:
ProvisioningException
- if an error occurs during application
-
revokeFromPaths
void revokeFromPaths(ResourceResolver resourceResolver, java.lang.String[] paths, Resource configuration) throws ProvisioningException
Revokes theconfiguration
from the specifiedpaths
.- Parameters:
resourceResolver
- AResourceResolver
instancepaths
- the paths to revoke theconfiguration
fromconfiguration
- configurationResource
- Throws:
ProvisioningException
- if an error occurs during the revoke
-
-