Interface ProvisioningHandler
-
@ConsumerType public interface ProvisioningHandler
AProvisioningHandlerdefines 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
ProvisioningHandlerservice must be registered with aCLOUDSERVICE_IDregistration 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 parameterservicenamewith the correct handler to trigger the provisioning.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLOUDSERVICE_IDThe 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 voidapplyToPaths(ResourceResolver resourceResolver, java.lang.String[] paths, Resource configuration)Applies theconfigurationto the specifiedpaths.voidrevokeFromPaths(ResourceResolver resourceResolver, java.lang.String[] paths, Resource configuration)Revokes theconfigurationfrom the specifiedpaths.voidrollback(ResourceResolver resourceResolver, java.util.Map<java.lang.String,java.lang.Object> properties)Is rolling back the setup step.Resourcesetup(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- 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, java.util.Map<java.lang.String,java.lang.Object> properties) throws ProvisioningException
Is 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, java.lang.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, java.lang.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
-
-