Package org.wso2.carbon.brokermanager.core

Examples of org.wso2.carbon.brokermanager.core.BrokerConfiguration.addProperty()


        brokerConfiguration.setName(brokerName);
        brokerConfiguration.setType(brokerType);
        int tenantId = CarbonContext.getCurrentContext().getTenantId();
        // add broker properties
        for (BrokerProperty brokerProperty : properties) {
            brokerConfiguration.addProperty(brokerProperty.getKey(), brokerProperty.getValue());
        }
        // add broker configuration
        try {
            brokerManager.getBrokerManagerService().addBrokerConfiguration(brokerConfiguration, tenantId);
            testBrokerConfiguration(brokerName);
View Full Code Here


        for (; propertyIter.hasNext();) {
            propertyOMElement = (OMElement) propertyIter.next();
            String name = propertyOMElement.getAttributeValue(
                    new QName("", BMConstants.BM_ATTR_NAME));
            String value = propertyOMElement.getText();
            brokerConfiguration.addProperty(name, value);
        }

        return brokerConfiguration;

    }
View Full Code Here

                                if ("name".equals(propertyName)) {
                                    brokerConfiguration.setName(propertyValue);
                                } else if ("type".equals(propertyName)) {
                                    brokerConfiguration.setType(propertyValue);
                                } else {
                                    brokerConfiguration.addProperty(propertyName, propertyValue);
                                }

                            }
                            brokerConfigurationMap.put(brokerConfiguration.getName(), brokerConfiguration);
View Full Code Here

        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

                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.