Package org.wso2.carbon.registry.core

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


                resource = systemRegistry.newResource();
                resource.setContent(getDefaultSubcribers().toString());
                systemRegistry.put(SUBSCRIBERS_PATH, resource);
            }

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


                resource = systemRegistry.newResource();
                resource.setContent(getDefaultSubcriberStores().toString());
                systemRegistry.put(SUBSCRIBER_STORES_PATH, resource);
            }

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

                resource = systemRegistry.newResource();
                resource.setContent(getDefaultFilters().toString());
                systemRegistry.put(FILTERS_PATH, resource);
            }

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

                for (ManagementPermission uiPermission : uiPermissions) {
                    if (uiPermission == null ||
                            uiPermission.getResourceId() == null ||
                            uiPermission.getResourceId().startsWith(
                                    CarbonConstants.UI_PROTECTED_PERMISSION_COLLECTION) ||
                            registry.resourceExists(uiPermission.getResourceId())) {
                        continue;
                    }
                    Collection resource = registry.newCollection();
                    resource.setProperty(UserMgtConstants.DISPLAY_NAME,
                            uiPermission.getDisplayName());
View Full Code Here

            public void run() {
                try {
                    Registry superTenantRegistry =
                            TenantMgtServiceComponent.getConfigSystemRegistry(
                                    MultitenantConstants.SUPER_TENANT_ID);
                    if (!superTenantRegistry.resourceExists(
                            StratosConstants.CAPTCHA_DETAILS_PATH)) {
                        return// resource doesn't exist in the superTenantRegistry. just return.
                    }
                    CollectionImpl c = (CollectionImpl) superTenantRegistry.get(
                            StratosConstants.CAPTCHA_DETAILS_PATH);
View Full Code Here

        String recordPath = StratosConstants.CAPTCHA_DETAILS_PATH +
                            RegistryConstants.PATH_SEPARATOR + secretKey;
        Registry superTenantRegistry = TenantMgtServiceComponent.getConfigSystemRegistry(
                MultitenantConstants.SUPER_TENANT_ID);
        if (!superTenantRegistry.resourceExists(recordPath)) {
            String msg = "The captcha details are not available.";
            log.error(msg);
            throw new Exception(msg);
        }
View Full Code Here

        try {
              // delete the persisted parameters
              Map<String, Object> params = service.getParameterMap();

              if (registry.resourceExists(serviceParametersPath)) {
                  // there are service level parameters
                  Resource serviceParamsResource = registry.get(serviceParametersPath);
                  if (serviceParamsResource instanceof Collection) {
                      Collection serviceParamsCollection =
                              (Collection) serviceParamsResource;
View Full Code Here

            String baseString = "TenantId:=" + tenantId + "&UserId:=" + userId;
            Registry registry = registryService.getConfigSystemRegistry(tenantId);

            String path = RegistryConstants.PROFILES_PATH + username;
            Collection profile = null;
            if (!registry.resourceExists(path)) {
                return false;
            } else {
                profile = (Collection) registry.get(path);
            }
View Full Code Here

        try {
            if (key.startsWith(RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH)) {
                key = key.substring(RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH.length());
                Registry registry =
                        registryService.getGovernanceSystemRegistry(tenantId);
                if (registry.resourceExists(key)) {
                    Resource resource = registry.get(key);
                    if (resource != null) {
                        return resource.getContentStream();
                    }
                }
View Full Code Here

                }
            }else if(key.startsWith(RegistryConstants.CONFIG_REGISTRY_BASE_PATH)){
                key = key.substring(RegistryConstants.CONFIG_REGISTRY_BASE_PATH.length());
                Registry registry =
                        registryService.getConfigSystemRegistry(tenantId);
                if (registry.resourceExists(key)) {
                    Resource resource = registry.get(key);
                    if (resource != null) {
                        return resource.getContentStream();
                    }
                }
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.