Package org.wso2.carbon.registry.core

Examples of org.wso2.carbon.registry.core.Registry.resourceExists()


        ThrottlingAccessValidation accessValidation = throttlingDataContext.getAccessValidation();
        try {
            Registry governanceSystemRegistry = Util.getSuperTenantGovernanceSystemRegistry();

            Resource tenantValidationInfoResource;
            if (governanceSystemRegistry.resourceExists(tenantValidationInfoResourcePath)) {
                tenantValidationInfoResource =
                        governanceSystemRegistry.get(tenantValidationInfoResourcePath);
            } else {
                tenantValidationInfoResource = governanceSystemRegistry.newResource();
            }
View Full Code Here


                        }
                    }
                    resourceContent.append("#");
                }
                Registry registry = requestContext.getRegistry();
                if (registry.resourceExists(path)) {
                    col = (ResourceImpl) registry.get(path);
                    col.setContent(resourceContent.toString());
                }
            } catch (UserStoreException e) {
                log.error("An error occurred while reading profile details", e);
View Full Code Here

      if (transactionStarted) {
        registry.beginTransaction();
      }
      String serviceResourcePath = RegistryResources.SERVICE_GROUPS + serviceGroupName;
      /* the resource should already exist */
      if (registry.resourceExists(serviceResourcePath)) {
        Resource serviceResource = registry.get(serviceResourcePath);
        serviceResource.setProperty(RegistryResources.ServiceGroupProperties.HASH_VALUE,
            hash);
        registry.put(serviceResourcePath, serviceResource);
        serviceResource.discard();
View Full Code Here

        Resource resource = null;

        try {
            systemRegistry = EventingServiceComponent.getRegistry();

            if (systemRegistry.resourceExists(EVENTING_ROOT + serviceName + "/subscribers/"
                    + subscriberId)) {
                resource = systemRegistry.get(EVENTING_ROOT + serviceName + "/subscribers/"
                        + subscriberId);
                return getSubscriber(resource);
            }
View Full Code Here

        ArrayList allSubscribers = new ArrayList();

        try {
            systemRegistry = EventingServiceComponent.getRegistry();

            if (systemRegistry.resourceExists(EVENTING_ROOT + serviceName
                    + "/subscribers")) {
                resourceCollection = (CollectionImpl) systemRegistry.get(EVENTING_ROOT
                        + serviceName + "/subscribers");
                String[] resources = resourceCollection.getChildren();
                for (int i = 0; i < resources.length; i++) {
View Full Code Here

        String content = null;

        try {
            systemRegistry = EventingServiceComponent.getRegistry();

            if (systemRegistry.resourceExists(PROTOCOL_PATH)) {
                resource = systemRegistry.get(PROTOCOL_PATH);
                content = new String((byte[]) resource.getContent());
                processProtocols(AXIOMUtil.stringToOM(content));
            }
View Full Code Here

                resource = systemRegistry.get(PROTOCOL_PATH);
                content = new String((byte[]) resource.getContent());
                processProtocols(AXIOMUtil.stringToOM(content));
            }

            if (systemRegistry.resourceExists(SUBSCRIBERS_PATH)) {
                resource = systemRegistry.get(SUBSCRIBERS_PATH);
                content = new String((byte[]) resource.getContent());
                processSubscribers(AXIOMUtil.stringToOM(content));
            }
View Full Code Here

                resource = systemRegistry.get(SUBSCRIBERS_PATH);
                content = new String((byte[]) resource.getContent());
                processSubscribers(AXIOMUtil.stringToOM(content));
            }

            if (systemRegistry.resourceExists(SUBSCRIBER_STORES_PATH)) {
                resource = systemRegistry.get(SUBSCRIBER_STORES_PATH);
                content = new String((byte[]) resource.getContent());
                processSubscriberStores(AXIOMUtil.stringToOM(content));
            }
View Full Code Here

                resource = systemRegistry.get(SUBSCRIBER_STORES_PATH);
                content = new String((byte[]) resource.getContent());
                processSubscriberStores(AXIOMUtil.stringToOM(content));
            }

            if (systemRegistry.resourceExists(FILTERS_PATH)) {
                resource = systemRegistry.get(FILTERS_PATH);
                content = new String((byte[]) resource.getContent());
                processFilters(AXIOMUtil.stringToOM(content));
            }
View Full Code Here

        try {
            systemRegistry = EventingServiceComponent.getRegistry();

            systemRegistry.beginTransaction();

            if (!systemRegistry.resourceExists(SUBSCRIBERS_PATH)) {
                resource = systemRegistry.newResource();
                resource.setContent(getDefaultSubcribers().toString());
                systemRegistry.put(SUBSCRIBERS_PATH, resource);
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.