Package org.wso2.carbon.registry.core

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


            Registry systemGovernanceRegistry = getGovernanceSystemRegistry(registry);
            if (systemGovernanceRegistry == null) {
                systemGovernanceRegistry = registry;
            }
            Resource govIndexResource;
            if (systemGovernanceRegistry.resourceExists(
                    GovernanceConstants.GOVERNANCE_ARTIFACT_INDEX_PATH)) {
                govIndexResource = systemGovernanceRegistry.get(
                        GovernanceConstants.GOVERNANCE_ARTIFACT_INDEX_PATH);
            } else {
                govIndexResource = systemGovernanceRegistry.newResource();
View Full Code Here


                        + tabId
                        + DashboardConstants.CURRENT_GADGET_LAYOUT_PATH;
            }

            Resource gadgetLayout;
            if (registry.resourceExists(gadgetLayoutPath)) {
                gadgetLayout = registry.get(gadgetLayoutPath);
            } else {
                gadgetLayout = registry.newCollection();
            }
View Full Code Here

        Boolean response = false;
        try {
            Registry registry = getConfigSystemRegistry();

            Resource regAdminDataResource;
            if (registry
                    .resourceExists(DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH)) {
                regAdminDataResource = registry
                        .get(DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH);

                String storedValue = regAdminDataResource
View Full Code Here

        try {
            Registry registry = getConfigSystemRegistry();

            Resource regAdminDataResource;
            if (registry
                    .resourceExists(DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH)) {
                regAdminDataResource = registry
                        .get(DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH);

                String storedValue = regAdminDataResource
View Full Code Here

            String[] qPaths = (String[]) qResults.getContent();
            ArrayList gadgetUrlsList = new ArrayList();

            for (String qPath : qPaths) {
                if (registry.resourceExists(qPath)) {
                    Resource tempRes = registry.get(qPath);
                    String gadgetUrlTmp = tempRes.getProperty(
                            DashboardConstants.GADGET_URL);
                    if (isGadgetAutharized(userId, gadgetUrlTmp)) {
                        gadgetUrlsList.add(gadgetUrlTmp);
View Full Code Here

                + userId
                + DashboardConstants.REGISTRY_PRODUCT_ID_PATH
                + DashboardConstants.NEXT_GADGET_ID_PATH;
        try {
            registry = getConfigSystemRegistry();
            newUser = registry.resourceExists(nextGadgetIdPath);
            return newUser;

        } catch (Exception e) {
            log.error(e.getMessage(), e);
            return false;
View Full Code Here

    public String getPortalStylesUrl(String user) {
        Registry userRegistry = getConfigSystemRegistry();
        String retPath = null;
        try {
            if (userRegistry.resourceExists(DashboardConstants.USER_DASHBOARD_REGISTRY_ROOT + user + DashboardConstants.GS_DEFAULT_THEME_PATH)) {
                Resource res = userRegistry.get(DashboardConstants.USER_DASHBOARD_REGISTRY_ROOT + user + DashboardConstants.GS_DEFAULT_THEME_PATH);
                retPath = res.getProperty("theme.location");
                return retPath;
            }
            return retPath;
View Full Code Here

            registry = registryService.getGovernanceSystemRegistry(getCurrentTenantId());
          } else {
            throw new DataServiceFault("Empty governance registry path given");
          }
        }
        if (registry.resourceExists(path)) {
          Resource serviceResource = registry.get(path);
          ins = serviceResource.getContentStream();
        } else {
          throw new DataServiceFault(
              "The given XSLT resource path at '" + path + "' does not exist");
View Full Code Here

            stsSamlConfig.setCallbackHandlerName(AttributeCallbackHandler.class.getName());

            String resourcePath = null;
            resourcePath = RegistryResources.SERVICE_GROUPS + ServerConstants.STS_NAME
                    + RegistryResources.SERVICES + ServerConstants.STS_NAME + "/trustedServices";
            if (systemRegistry.resourceExists(resourcePath)) {
                Resource trustedService = null;
                Properties properties = null;
                Iterator iterator = null;
                trustedService = systemRegistry.get(resourcePath);
                properties = trustedService.getProperties();
View Full Code Here

           log.error("Error in getting registry for the super tenant");
           throw new BMConfigurationException("Error in getting registry for the super tenant", e);
        }
        try {
            // create broker base if not exists
            if (!registry.resourceExists(BROKER_BASE)) {
                registry.put(BROKER_BASE, registry.newCollection());
            }
        } catch (RegistryException e) {
            if (log.isErrorEnabled()) {
                log.error("Failed to create new collection in registry", e);
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.