org.wso2.carbon.deployment.synchronizer.registry
Class RegistryUtils

java.lang.Object
  extended by org.wso2.carbon.deployment.synchronizer.registry.RegistryUtils

public class RegistryUtils
extends Object


Constructor Summary
RegistryUtils()
           
 
Method Summary
static String getAbsoluteRegistryPath(String registryPath, String basePath)
          Calculate and return the absolute path of a resource
static String getEventReceiverEndpoint()
          Returns the endpoint URL of the AutoCheckoutService
static String subscribeForRegistryEvents(org.wso2.carbon.registry.core.session.UserRegistry registry, String absolutePath, String endpoint)
          Subscribe for events on a given registry collection
static boolean unsubscribeForRegistryEvents(String subscriptionId, int tenantId)
          Unsubscribe from registry events
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 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:
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


Copyright © 2015 WSO2. All rights reserved.