Class RegistryUtils
java.lang.Object
org.wso2.carbon.registry.deployment.synchronizer.RegistryUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetAbsoluteRegistryPath(String registryPath, String basePath) Calculate and return the absolute path of a resourcestatic StringReturns the endpoint URL of the AutoCheckoutServicestatic StringsubscribeForRegistryEvents(org.wso2.carbon.registry.core.session.UserRegistry registry, String absolutePath, String endpoint) Subscribe for events on a given registry collectionstatic booleanunsubscribeForRegistryEvents(String subscriptionId, int tenantId) Unsubscribe from registry events
-
Constructor Details
-
RegistryUtils
public RegistryUtils()
-
-
Method Details
-
getAbsoluteRegistryPath
Calculate and return the absolute path of a resource- Parameters:
registryPath- The relative path of the resourcebasePath- Base path of the registry partition- Returns:
- Absolute path calculated by combining the registry path and the base path
-
subscribeForRegistryEvents
public static String subscribeForRegistryEvents(org.wso2.carbon.registry.core.session.UserRegistry registry, String absolutePath, String endpoint) throws org.wso2.carbon.deployment.synchronizer.DeploymentSynchronizerException Subscribe for events on a given registry collection- Parameters:
registry- Registry space in which the target collection residesabsolutePath- Absolute path of the collectionendpoint- The endpoint which should receive the events- Returns:
- Subscription ID
- Throws:
org.wso2.carbon.deployment.synchronizer.DeploymentSynchronizerException- If the subscription operation fails
-
unsubscribeForRegistryEvents
Unsubscribe from registry events- Parameters:
subscriptionId- ID of an existing subscriptiontenantId- Current tenant ID- Returns:
- true if successfully unsubscribed
-
getEventReceiverEndpoint
Returns the endpoint URL of the AutoCheckoutService- Returns:
- a String URL or null of the service is not available
-