Class RegistryUtils


  • public class RegistryUtils
    extends Object
    • Constructor Detail

      • RegistryUtils

        public RegistryUtils()
    • Method Detail

      • getAbsoluteRegistryPath

        public static String getAbsoluteRegistryPath​(String registryPath,
                                                     String basePath)
        Calculate and return the absolute path of a resource
        Parameters:
        registryPath - The relative path of the resource
        basePath - 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 resides
        absolutePath - Absolute path of the collection
        endpoint - The endpoint which should receive the events
        Returns:
        Subscription ID
        Throws:
        org.wso2.carbon.deployment.synchronizer.DeploymentSynchronizerException - If the subscription operation fails
      • unsubscribeForRegistryEvents

        public static boolean unsubscribeForRegistryEvents​(String subscriptionId,
                                                           int tenantId)
        Unsubscribe from registry events
        Parameters:
        subscriptionId - ID of an existing subscription
        tenantId - Current tenant ID
        Returns:
        true if successfully unsubscribed
      • getEventReceiverEndpoint

        public static String getEventReceiverEndpoint()
        Returns the endpoint URL of the AutoCheckoutService
        Returns:
        a String URL or null of the service is not available