Examples of resourceExists()


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

                if (!scenarioId.equals(SecurityConstants.SCENARIO_DISABLE_SECURITY) &&
                        !scenarioId.equals(SecurityConstants.POLICY_FROM_REG_SCENARIO)) {
                    Resource scenarioResource = new ResourceImpl();
                    scenarioResource.setContentStream(
                            bundleContext.getBundle().getResource(scenarioId + "-policy.xml").openStream());
                    if (!registry.resourceExists(resourceUri)) {
                        registry.put(resourceUri, scenarioResource);
                    }
                }

            }
View Full Code Here

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

                String policyResourcePath = servicePath + RegistryResources.POLICIES;
                int tenantID = SuperTenantCarbonContext.getCurrentContext(axisService).getTenantId();
                Registry registry = SecurityServiceHolder.getRegistryService()
                        .getConfigSystemRegistry(tenantID);
                if (!registry.resourceExists(policyResourcePath)) {
                    // do nothing, because no policy
                    return;
                }

                Collection coll = (Collection) registry.get(policyResourcePath);
View Full Code Here

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

            String dashboardConfigFile = dashboardDiskRoot + File.separator + "dashboard.xml";
            String gadgetsDiskLocation = dashboardDiskRoot + File.separator + "gadgets";

            // Check whether the system dasboard is already available if not populate
            Registry registry = DashboardPopulatorContext.getRegistry();
            if (!registry.resourceExists(REGISTRY_SYSTEM_DASHBOARDS_ROOT)) {

                // Creating an OMElement from file
                File dashboardConfigXml = new File(dashboardConfigFile);

                if (dashboardConfigXml.exists()) {
View Full Code Here

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

        try {
            boolean transactionStarted = Transaction.isStarted();
            if (!transactionStarted) {
                registry.beginTransaction();
            }
            if (!registry.resourceExists(SecurityConstants.KEY_STORES)) {
                Collection kstores = registry.newCollection();
                registry.put(SecurityConstants.KEY_STORES, kstores);

                Resource primResource = registry.newResource();
                if (!registry.resourceExists(RegistryResources.SecurityManagement.PRIMARY_KEYSTORE_PHANTOM_RESOURCE)) {
View Full Code Here

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

                            "'. Giving up.");
                }
            }

            // Check whether Gadgets are stored. If not store
            if (!registry.resourceExists(GadgetPopulator.SYSTEM_GADGETS_PATH)) {

                File gadgetsDir = new File(gadgetsDiskLocation);
                if (gadgetsDir.exists()) {
                    GadgetPopulator.beginFileTansfer(gadgetsDir);
View Full Code Here

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

            if (!registry.resourceExists(SecurityConstants.KEY_STORES)) {
                Collection kstores = registry.newCollection();
                registry.put(SecurityConstants.KEY_STORES, kstores);

                Resource primResource = registry.newResource();
                if (!registry.resourceExists(RegistryResources.SecurityManagement.PRIMARY_KEYSTORE_PHANTOM_RESOURCE)) {
                    registry.put(RegistryResources.SecurityManagement.PRIMARY_KEYSTORE_PHANTOM_RESOURCE,
                                 primResource);
                }
            }
            if (!transactionStarted) {
View Full Code Here

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

            Registry registry = SecurityServiceHolder.getRegistryService().getConfigSystemRegistry(tenantID);
            String servicePath = RegistryResources.SERVICE_GROUPS
                    + service.getAxisServiceGroup().getServiceGroupName()
                    + RegistryResources.SERVICES + service.getName();
            Resource serviceResource = null;
            if (registry.resourceExists(servicePath)) {
                serviceResource = registry.get(servicePath);
            } else {
                return InvocationResponse.CONTINUE;
            }
View Full Code Here

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

            boolean transactionStarted = Transaction.isStarted();
            if (!transactionStarted) {
                registry.beginTransaction();
            }
            for (String resourceLoc : policyResourceMap.keySet()) {
                if (!registry.resourceExists(resourceLoc)) {
                    registry.put(resourceLoc, policyResourceMap.get(resourceLoc));
                }
            }
            if (!transactionStarted) {
                registry.commitTransaction();
View Full Code Here

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

        try {
            Registry registry = DashboardContext.getRegistry(MultitenantUtils.getTenantId(DashboardContext.getConfigContext()));

            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

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

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

            for (String qPath : qPaths) {
                if (registry.resourceExists(qPath)) {
                    Resource tempRes = registry.get(qPath);
                    String gadgetNameTmp = tempRes.getProperty(DashboardConstants.GADGET_NAME);
                    String gadgetUrlTmp = tempRes.getProperty(DashboardConstants.GADGET_URL);
                    if (isGadgetAutharized(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME, gadgetUrlTmp)) {
                        gadgetUrlsList.add(gadgetNameTmp + "," + gadgetUrlTmp);
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.