Package org.wso2.carbon.registry.core

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


            captchaInfoBean.setSecretKey(randomSecretKey);   //random generated value as secret key
            captchaInfoBean.setImagePath("registry" + RegistryConstants.PATH_SEPARATOR + "resource" +
                                         RegistryConstants.CONFIG_REGISTRY_BASE_PATH + imagePath);

            // now create an entry in the registry on the captcha
            Resource recordResource = superTenantRegistry.newResource();
            ((ResourceImpl) recordResource).setVersionableChange(false); // no need to version
            recordResource.setProperty(StratosConstants.CAPTCHA_TEXT_PROPERTY_KEY, captchaText);
            recordResource.setProperty(StratosConstants.CAPTCHA_PATH_PROPERTY_KEY, imagePath);

            superTenantRegistry.put(StratosConstants.CAPTCHA_DETAILS_PATH +
View Full Code Here


                             + RegistryResources.SERVICES + axisService.getName();

        Registry registry = getConfigSystemRegistry();

        // Add the new policy to the registry
        Resource policyResource = registry.newResource();
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_UUID, policy.getId());
        // do a performance improvement
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
        policy.serialize(writer);
View Full Code Here

                             + RegistryResources.SERVICES + axisService.getName();

        Registry registry = getConfigSystemRegistry();

        // Add the new policy to the registry
        Resource policyResource = registry.newResource();
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_UUID, policy.getId());
        // do a performance improvement
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
        policy.serialize(writer);
View Full Code Here

        String policyResourcePath = servicePath + RegistryResources.POLICIES + policy.getId();

        Registry registry = getConfigSystemRegistry();

        // at registry
        Resource policyResource = registry.newResource();
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_UUID, policy.getId());
        // do a performance improvement
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
        policy.serialize(writer);
View Full Code Here

        Registry registry = getConfigSystemRegistry();

        // Add the new policy to the registry
        String policyResourcePath = servicePath + RegistryResources.POLICIES + policy.getId();
        Resource policyResource = registry.newResource();
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_UUID, policy.getId());
        // do a performance improvement
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
        policy.serialize(writer);
View Full Code Here

                             + RegistryResources.SERVICES + axisService.getName();

        Registry registry = getConfigSystemRegistry();

        // Add new policy to registry
        Resource policyResource = registry.newResource();
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_UUID, policy.getId());
        // do a performance improvement
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
        policy.serialize(writer);
View Full Code Here

        } else {
            policyType = "" + PolicyInclude.BINDING_OUTPUT_POLICY;
        }

        // Add the new policy to registry
        Resource policyResource = registry.newResource();
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_UUID, policy.getId());
        // do a performance improvement
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
        policy.serialize(writer);
View Full Code Here

                    JRXmlLoader.load(inputStream);
                } catch (JRException e) {
                    throw new JRException(fileName +" is not a valide template" ,e);
                }
                Registry registry = getConfigSystemRegistry();
                Resource reportFilesResource = registry.newResource();
                reportFilesResource.setContent(fileContent);

                registry.put("/reports/" + fileName + ".jrxml", reportFilesResource);
                status = "success";
            } catch (RegistryException e) {
View Full Code Here

        }
        try {
            RegistryService registryService = ReportingComponent.getRegistryService();
            Registry registry = registryService.getConfigSystemRegistry();
            registry.beginTransaction();
            Resource reportFilesResource = registry.newResource();
            InputStream xmlStream = null;
            try{
            while (enumeration.hasMoreElements()) {
                String path = enumeration.nextElement().toString();
                URL url = bundleContext.getBundle().getResource(path);
View Full Code Here

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

            regAdminDataResource
                    .setProperty(DashboardConstants.USER_SELF_REG_PROPERTY_ID,
                            String.valueOf(flag));
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.