Package org.wso2.carbon.registry.core

Examples of org.wso2.carbon.registry.core.Resource.addProperty()


                mediaResource = registry.get(resourcePath);
            } else {
                mediaResource = registry.newCollection();
            }
            // Add the no. of mediaItems as a property to this resource
            mediaResource.addProperty(SocialImplConstants.ACTIVITY_MEDIA_ITEM_NOS,
                    userActivity.getMediaItems().size() + "");
            registry.put(resourcePath, mediaResource);
            // Add all mediaItems as resources in the path /activityId/{mediaItem}/{mediaItemId}/...
            Resource mediaItemResource;
            int index = 0;
View Full Code Here


                if (isUpdate) {
                    String oldValue = templateParamResource.getProperty(param);
                    templateParamResource.editPropertyValue(
                            param, oldValue, userActivity.getTemplateParams().get(param));
                } else {
                    templateParamResource.addProperty(param,
                            userActivity.getTemplateParams().get(param));
                }
            }
            registry.put(templateParamResourcePath, templateParamResource);
        }
View Full Code Here

                bindingResource = registry.get(bindingResourcePath);
            }else{
                bindingResource = registry.newResource();
            }

            bindingResource.addProperty(RegistryResources.ServiceProperties.POLICY_UUID,
                    policy.getId());
            registry.put(bindingResourcePath, bindingResource);
        }
        if (!transactionStarted) {
            registry.commitTransaction();
View Full Code Here

                return;
            }
            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());
            bucketProperties.addProperty(CEPConstants.CEP_CONF_ELE_CEP_BUCKET_OWNER, bucket.getOwner());
            registry.put(parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_PROPERTIES, bucketProperties);
View Full Code Here

            }
            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());
            bucketProperties.addProperty(CEPConstants.CEP_CONF_ELE_CEP_BUCKET_OWNER, bucket.getOwner());
            registry.put(parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_PROPERTIES, bucketProperties);

            String inputsCollectionPath = parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_INPUTS;
View Full Code Here

            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());
            bucketProperties.addProperty(CEPConstants.CEP_CONF_ELE_CEP_BUCKET_OWNER, bucket.getOwner());
            registry.put(parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_PROPERTIES, bucketProperties);

            String inputsCollectionPath = parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_INPUTS;
            registry.put(inputsCollectionPath, registry.newCollection());
View Full Code Here

            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());
            bucketProperties.addProperty(CEPConstants.CEP_CONF_ELE_CEP_BUCKET_OWNER, bucket.getOwner());
            registry.put(parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_PROPERTIES, bucketProperties);

            String inputsCollectionPath = parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_INPUTS;
            registry.put(inputsCollectionPath, registry.newCollection());
            for (Input input : bucket.getInputs()) {
View Full Code Here

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

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

                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);

              /*  Map<String, String> xpathDefinitionsTable = input.getMapping().getXpathNamespacePrefixes();
                if (xpathDefinitionsTable != null && xpathDefinitionsTable.size() > 0) {
                    Set set = xpathDefinitionsTable.keySet();
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.