Package org.wso2.carbon.registry.api

Examples of org.wso2.carbon.registry.api.Collection.addProperty()


        for (Iterator iterator = elementMappingOMElement.getChildrenWithName(new QName(CEPConstants.CEP_CONF_NAMESPACE,
                CEPConstants.CEP_CONF_ELE_PROPERTY)); iterator.hasNext();) {
            OMElement propertyElement = (OMElement) iterator.next();
            Property property = PropertyHelper.fromOM(propertyElement);
            property.setInputProperty(false);
            elementMapping.addProperty(property);
        }

        return elementMapping;
    }
}
View Full Code Here


        for (Iterator iterator = mappingElement.getChildrenWithName(new QName(CEPConstants.CEP_CONF_NAMESPACE,
                CEPConstants.CEP_CONF_ELE_PROPERTY)); iterator.hasNext();) {
            OMElement propertyElement = (OMElement) iterator.next();
            Property property = PropertyHelper.fromOM(propertyElement);
            property.setInputProperty(true);
            mapping.addProperty(property);
        }

        return mapping;
    }
}
View Full Code Here

                } else if (EventBrokerConstants.EB_RES_CREATED_TIME.equals(propertyName)) {
                    subscription.setCreatedTime(new Date(Long.parseLong(subscriptionResource.getProperty(EventBrokerConstants.EB_RES_CREATED_TIME))));
                } else if (EventBrokerConstants.EB_RES_MODE.equals(propertyName)) {
                    subscription.setMode(subscriptionResource.getProperty(EventBrokerConstants.EB_RES_MODE));
                } else {
                    subscription.addProperty(propertyName, subscriptionResource.getProperty(propertyName));
                }
            }
        }
        return subscription;
    }
View Full Code Here

                accessKeyId = accessKeyId.replaceAll("-", "").substring(12);

                // store keys in registry
                userCollection = registry.newCollection();
                registry.put(RegistryConstants.PROFILES_PATH + userName, userCollection);
                userCollection.addProperty(MessageBoxConstants.ACCESS_KEY_ID, accessKeyId);
                userCollection.addProperty(MessageBoxConstants.SECRET_ACCESS_KEY_ID, secretAccessKeyId);
                registry.put(RegistryConstants.PROFILES_PATH + userName, userCollection);


                // store user/access key in registry
View Full Code Here

                // store keys in registry
                userCollection = registry.newCollection();
                registry.put(RegistryConstants.PROFILES_PATH + userName, userCollection);
                userCollection.addProperty(MessageBoxConstants.ACCESS_KEY_ID, accessKeyId);
                userCollection.addProperty(MessageBoxConstants.SECRET_ACCESS_KEY_ID, secretAccessKeyId);
                registry.put(RegistryConstants.PROFILES_PATH + userName, userCollection);


                // store user/access key in registry
                String accessKeyIndexPath = MessageBoxConstants.REGISTRY_ACCESS_KEY_INDEX_PATH;
View Full Code Here

                if (!registry.resourceExists(accessKeyIndexPath)) {
                    userCollection = registry.newCollection();
                    registry.put(accessKeyIndexPath, userCollection);
                }
                userCollection = (Collection) registry.get(accessKeyIndexPath);
                userCollection.addProperty(accessKeyId, userName);

                registry.put(accessKeyIndexPath, userCollection);
            }

            // we only allow user and admin to see the secret keys
View Full Code Here

                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

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.