ResourceProcessor interface is implemented by processors handling resource files in deployment packages. Resource Processors expose their services as standard OSGi services. Bundles exporting the service may arrive in the deployment package (customizers) or may be preregistered (they are installed previously). Resource processors has to define the {@code service.pid}standard OSGi service property which should be a unique string.
The order of the method calls on a particular Resource Processor in case of install/update session is the following:
- {@link #begin(DeploymentSession)}
- {@link #process(String,InputStream)} calls till there are resources toprocess or {@link #rollback()} and the further steps are ignored
- {@link #dropped(String)} calls till there are resources to drop
- {@link #prepare()}
- {@link #commit()} or {@link #rollback()}
The order of the method calls on a particular Resource Processor in case of uninstall session is the following:
- {@link #begin(DeploymentSession)}
- {@link #dropAllResources()} or {@link #rollback()} and the further stepsare ignored
- {@link #prepare()}
- {@link #commit()} or {@link #rollback()}