Examples of newResource()


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

                                CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_DETAILS, elementMappingResource);

                        registry.put(queryPath + elementMappingPathString +
                                CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_PROPERTIES, registry.newCollection());
                        for (Property property : elementMapping.getProperties()) {
                            Resource elementMappingProperties = registry.newResource();
                            elementMappingProperties.addProperty(CEPConstants.CEP_REGISTRY_NAME, property.getName());
                            elementMappingProperties.addProperty(CEPConstants.CEP_REGISTRY_XML_FIELD_NAME, property.getXmlFieldName());
                            elementMappingProperties.addProperty(CEPConstants.CEP_REGISTRY_XML_FIELD_TYPE, property.getXmlFieldType());
                            registry.put(queryPath + elementMappingPathString +
                                    CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_PROPERTIES +
View Full Code Here

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

                        registry.put(queryPath +
                                CEPConstants.CEP_REGISTRY_BS +
                                CEPConstants.CEP_REGISTRY_OUTPUT +
                                CEPConstants.CEP_REGISTRY_BS +
                                CEPConstants.CEP_REGISTRY_XML_MAPPING, registry.newCollection());
                        Resource xmlMappingResource = registry.newResource();
                        xmlMappingResource.addProperty(CEPConstants.CEP_REGISTRY_TEXT, output.getXmlMapping().getMappingXMLText());
                        registry.put(queryPath +
                                CEPConstants.CEP_REGISTRY_BS +
                                CEPConstants.CEP_REGISTRY_OUTPUT +
                                CEPConstants.CEP_REGISTRY_BS +
View Full Code Here

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

            String secretKey = UUID.randomUUID().toString();

            //User suppose to give where he wants to store interemdiate data to them after confirmation
            //here there's not tenant registration happened yet so get the super tenant registry instance
            Registry registry = Util.getConfigSystemRegistry(0);
            Resource resource = registry.newResource();
            // store the redirector url
            resource.setProperty("redirectPath", serviceConfig.getRedirectPath());
            // store the user data, redirectPath can be overwritten here.
            for (String s : data.keySet()) {
                resource.setProperty(s, data.get(s));
View Full Code Here

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

            }
            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);
                }
            }
View Full Code Here

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

public class WSDLToolService extends AbstractAdmin {

    public void addMEXService(String path, ServiceInfoBean serviceInfo) throws Exception {
        Registry registry = getGovernanceRegistry();
        Resource resource = registry.newResource();
        //String parentPath = RegistryUtils.getParentPath(path);
        //String wsdlURL = serviceInfo.getWsdlURL();

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMElement serviceInfoElement = fac.createOMElement("wsdltool", null);
View Full Code Here

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

                sysRegistry.put(DashboardConstants.GS_REGISTRY_ROOT +
                                DashboardConstants.GADGET_PATH + gadgetName
                                + RegistryConstants.PATH_SEPARATOR + entryName, col);
            } else {
                //if a file, creating a resource
                Resource res = sysRegistry.newResource();
                try {
                    while ((i = zis.read(buff, 0, buff.length)) > 0) {
                        byteOut.write(buff, 0, i);
                    }
                } catch (IOException ioe) {
View Full Code Here

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

     */
    private String[] getGadgetUrlSetForUnSignedUser() {
        Registry registry;
        try {
            registry = getConfigSystemRegistry();
            Resource comQuery = registry.newResource();

            String sql = "SELECT R.REG_NAME, R.REG_PATH_ID FROM REG_RESOURCE R, REG_PROPERTY P, REG_RESOURCE_PROPERTY RP, REG_PATH PA WHERE "
                    + "R.REG_VERSION=RP.REG_VERSION AND "
                    + "P.REG_NAME='"
                    + DashboardConstants.UNSIGNED_USER_GADGET
View Full Code Here

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

            String fileRegistryPath =
                    SYSTEM_GADGETS_PATH + file.getAbsolutePath().substring(rootPath.length())
                            .replaceAll("[/\\\\]+", "/");

            // Adding the file to the Registry            
            Resource fileResource = registry.newResource();
            fileResource.setMediaType(new MimetypesFileTypeMap().getContentType(file));
            fileResource.setContentStream(new FileInputStream(file));
            registry.put(fileRegistryPath, fileResource);

        } catch (DashboardPopulatorException e) {
View Full Code Here

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

            registry = getConfigSystemRegistry(); //TODO: Multitenancy
            if (registry != null) {
                if (registry.resourceExists(resourcePath)) {
                    resource = registry.get(resourcePath);
                } else {
                    resource = registry.newResource();
                }
                if (resource.getProperty(trustedService) != null) {
                    resource.removeProperty(trustedService);
                }
                resource.addProperty(trustedService, certAlias);
View Full Code Here

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

            String modified;
            List<String> productServerRolesList = ServerRoleUtils.readProductServerRoles();

            if (resource == null) {
                try {
                    resource = configReg.newResource();
                    resource.setProperty(serverRoleType, productServerRolesList);
                    resource.setProperty(ServerRoleConstants.MODIFIED_TAG,
                            ServerRoleConstants.MODIFIED_TAG_FALSE);
                    this.putResourceToRegistry(configReg, resource, regPath);
                } catch (RegistryException 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.