Examples of newCollection()


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

            }
            String queriesCollectionPath = parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_QUERIES;
            registry.put(queriesCollectionPath, registry.newCollection());
            for (Query query : bucket.getQueries()) {
                String queryPath = queriesCollectionPath + "/" + query.getName();
                registry.put(queryPath, registry.newCollection());
                Resource queryResource = registry.newResource();
                queryResource.setProperty(CEPConstants.CEP_REGISTRY_NAME, query.getName());
                queryResource.setProperty(CEPConstants.CEP_REGISTRY_TYPE, query.getExpression().getType());
//                queryResource.setProperty(CEPConstants.CEP_REGISTRY_EXPRESSION,query.getExpression().getText());
                queryResource.setContent(query.getExpression().getText());
View Full Code Here

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

                queryResource.setProperty(CEPConstants.CEP_REGISTRY_TYPE, query.getExpression().getType());
//                queryResource.setProperty(CEPConstants.CEP_REGISTRY_EXPRESSION,query.getExpression().getText());
                queryResource.setContent(query.getExpression().getText());
                registry.put(queryPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_DETAILS, queryResource);

                registry.put(queryPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_OUTPUT, registry.newCollection());

                Output output = query.getOutput();
                Resource outputResource = registry.newResource();
                outputResource.addProperty(CEPConstants.CEP_REGISTRY_TOPIC, output.getTopic());
                outputResource.addProperty(CEPConstants.CEP_CONF_ELE_BROKER_NAME, output.getBrokerName());
View Full Code Here

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

                if (elementMapping != null) {
                    String elementMappingPathString = CEPConstants.CEP_REGISTRY_BS +
                            CEPConstants.CEP_REGISTRY_OUTPUT +
                            CEPConstants.CEP_REGISTRY_BS +
                            CEPConstants.CEP_REGISTRY_ELEMENT_MAPPING;
                    registry.put(queryPath + elementMappingPathString, registry.newCollection());
                    Resource elementMappingResource = registry.newResource();
                    elementMappingResource.addProperty(CEPConstants.CEP_REGISTRY_DOC_ELEMENT, elementMapping.getDocumentElement());
                    elementMappingResource.addProperty(CEPConstants.CEP_REGISTRY_NS, elementMapping.getNamespace());
                    registry.put(queryPath + elementMappingPathString +
                            CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_DETAILS, elementMappingResource);
View Full Code Here

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

                    elementMappingResource.addProperty(CEPConstants.CEP_REGISTRY_NS, elementMapping.getNamespace());
                    registry.put(queryPath + elementMappingPathString +
                            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());
View Full Code Here

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

                } else {
                    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 +
View Full Code Here

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

        try {
            Registry registry = CEPServiceValueHolder.getInstance().getRegistry(tenantId);

            String parentCollectionPath = CEPConstants.CEP_CONF_ELE_CEP_BUCKETS + CEPConstants.CEP_REGISTRY_BS + bucket.getName();
            if (registry.resourceExists(parentCollectionPath)) {
                registry.put(parentCollectionPath, registry.newCollection());

                Resource bucketProperties = registry.newResource();
                bucketProperties.addProperty(CEPConstants.CEP_CONF_ELE_NAME, bucket.getName());
                bucketProperties.addProperty(CEPConstants.CEP_CONF_ELE_DESCRIPTION, bucket.getDescription());
                bucketProperties.addProperty(CEPConstants.CEP_CONF_ELE_CEP_ENGINE_PROVIDER, bucket.getEngineProvider());
View Full Code Here

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

                bucketProperties.addProperty(CEPConstants.CEP_CONF_ELE_CEP_ENGINE_PROVIDER, bucket.getEngineProvider());
//               registry.put(parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_PROPERTIES, bucketProperties);

                String inputsCollectionPath = parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_INPUTS;
                if (!registry.resourceExists(inputsCollectionPath)) {
                    registry.put(inputsCollectionPath, registry.newCollection());
                }
                for (Input input : bucket.getInputs()) {
                    String inputResourcePath = inputsCollectionPath + "/" + input.getTopic();

                    registry.put(inputResourcePath, registry.newCollection());
View Full Code Here

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

                    registry.put(inputsCollectionPath, registry.newCollection());
                }
                for (Input input : bucket.getInputs()) {
                    String inputResourcePath = inputsCollectionPath + "/" + input.getTopic();

                    registry.put(inputResourcePath, registry.newCollection());

                    Resource inputTopic = registry.newResource();
                    inputTopic.addProperty(CEPConstants.CEP_CONF_ELE_TOPIC, input.getTopic());
                    inputTopic.addProperty(CEPConstants.CEP_CONF_ELE_BROKER_NAME, input.getBrokerName());
                    registry.put(inputResourcePath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_DETAILS, inputTopic);
View Full Code Here

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

                    Resource inputTopic = registry.newResource();
                    inputTopic.addProperty(CEPConstants.CEP_CONF_ELE_TOPIC, input.getTopic());
                    inputTopic.addProperty(CEPConstants.CEP_CONF_ELE_BROKER_NAME, input.getBrokerName());
                    registry.put(inputResourcePath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_DETAILS, inputTopic);
                    registry.put(inputResourcePath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_MAPPING, registry.newCollection());
                    String mappingPath = inputResourcePath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_MAPPING + CEPConstants.CEP_REGISTRY_BS;

                    Resource streamResource = registry.newResource();
                    streamResource.addProperty(CEPConstants.CEP_REGISTRY_STREAM, input.getMapping().getStream());
                    registry.put(mappingPath + CEPConstants.CEP_REGISTRY_STREAM, streamResource);
View Full Code Here

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

                        }
                    }
                }
                String queriesCollectionPath = parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_QUERIES;
                if (registry.resourceExists(queriesCollectionPath)) {
                    registry.put(queriesCollectionPath, registry.newCollection());
                }
                for (Query query : bucket.getQueries()) {
                    String queryPath = queriesCollectionPath + "/" + query.getName();
                    registry.put(queryPath, registry.newCollection());
                    Resource queryResource = registry.newResource();
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.