Package org.wso2.carbon.registry.core

Examples of org.wso2.carbon.registry.core.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

            if (!transactionStarted) {
                registry.beginTransaction();
            }

            userResource.removeProperty("OpenIDRememberMeToken");
            userResource.addProperty("OpenIDRememberMeToken", rememberMe.getToken());
            registry.put(RegistryConstants.PROFILES_PATH + rememberMe.getUserName(), userResource);

            if (!transactionStarted) {
                registry.commitTransaction();
            }
View Full Code Here

                    userResource = (Collection) registry.get(RegistryConstants.PROFILES_PATH
                            + consumer.getConsumerKey());
                    userResource.removeProperty(IdentityRegistryResources.OAUTH_CONSUMER_PATH);
                }

                userResource.addProperty(IdentityRegistryResources.OAUTH_CONSUMER_PATH, consumer
                        .getConsumerSecret());

                registry.put(RegistryConstants.PROFILES_PATH + consumer.getConsumerKey(),
                        userResource);
                if (!transactionStarted) {
View Full Code Here

                                RegistryResources.Associations.EXPOSED_TRANSPORTS);
                    }
                }
                if (configRegistry.resourceExists(serviceResourcePath)) {
                    service = (Collection) configRegistry.get(serviceResourcePath);
                    service.addProperty(RegistryResources.SUCCESSFULLY_ADDED, "true");
                    configRegistry.put(serviceResourcePath, service);
                }

                configRegistry.commitTransaction();
View Full Code Here

                }
                Date date = new Date();
                int ttl = 300000; // 5 seconds in ms
                key = "Key:=" + key + "&Timestamp:=" + date.getTime() + "&TTL:=" + ttl;
                profile.removeProperty(RegistryConstants.USER_TOKEN);
                profile.addProperty(RegistryConstants.USER_TOKEN, key);
                registry.put(path, profile);
                sessionStore.put(baseString, getHttpSession());
                return baseString;

            } catch (SignatureException e) {
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

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.