Package org.wso2.eventing

Examples of org.wso2.eventing.SubscriptionManager.addProperty()


            resource.addProperty(RegistryConstants.REGISTRY_EXISTING_RESOURCE, "true");
        } else {
            resource = new CollectionImpl();
        }
        resource.addProperty(RegistryConstants.REGISTRY_NON_RECURSIVE, "true");
        resource.addProperty(RegistryConstants.REGISTRY_LINK_RESTORATION,
                path + RegistryConstants.URL_SEPARATOR + target +
                        RegistryConstants.URL_SEPARATOR + targetSubPath +
                        RegistryConstants.URL_SEPARATOR + CurrentSession.getUser());
        registry.put(path, resource);
        resource.discard();
View Full Code Here


    public void handleNewModuleAddition(AxisModule axisModule, String moduleName,String moduleVersion) throws Exception {
        try{
            configRegistry.beginTransaction();
            Resource module = configRegistry.newCollection();
            module.addProperty(RegistryResources.ModuleProperties.NAME,moduleName);

            if (!moduleVersion.equals(RegistryResources.ModuleProperties.UNDEFINED)) {
                module.addProperty(RegistryResources.ModuleProperties.VERSION, moduleVersion);
            }
            AxisConfigurator configurator = axisConfig.getConfigurator();
View Full Code Here

            configRegistry.beginTransaction();
            Resource module = configRegistry.newCollection();
            module.addProperty(RegistryResources.ModuleProperties.NAME,moduleName);

            if (!moduleVersion.equals(RegistryResources.ModuleProperties.UNDEFINED)) {
                module.addProperty(RegistryResources.ModuleProperties.VERSION, moduleVersion);
            }
            AxisConfigurator configurator = axisConfig.getConfigurator();
            boolean isGloballyEngaged = false;
            if(configurator instanceof CarbonAxisConfigurator) {
                isGloballyEngaged =
View Full Code Here

                ((CarbonAxisConfigurator) configurator).isGlobalyEngaged(axisModule);
            } else if (configurator instanceof TenantAxisConfigurator) {
                isGloballyEngaged =
                ((TenantAxisConfigurator) configurator).isGlobalyEngaged(axisModule);
            }
            module.addProperty(RegistryResources.ModuleProperties.GLOBALLY_ENGAGED,
                               String.valueOf(isGloballyEngaged));

            String registryResourcePath = RegistryResources.MODULES + moduleName + "/" + moduleVersion + "/";
            configRegistry.put(registryResourcePath, module);
           
View Full Code Here

            // add the subscription index
            String fullPath = this.indexStoragePath;
            Resource topicIndexResource;
            if(userRegistry.resourceExists(fullPath)){
                topicIndexResource = userRegistry.get(fullPath);
                topicIndexResource.addProperty(subscription.getId(), subscription.getTopicName());
            }else{
               topicIndexResource = userRegistry.newResource();
               topicIndexResource.addProperty(subscription.getId(), subscription.getTopicName());               
            }
            userRegistry.put(fullPath, topicIndexResource);
View Full Code Here

                                     String path, String target, String targetSubPath,
                                     String author)
            throws RegistryException {
        Resource r = new ResourceImpl();
        String relativePath = RegistryUtils.getRelativePath(registryContext, path);
        r.addProperty("path", relativePath);
        r.addProperty("target", target);
        r.addProperty("author", author);
        r.addProperty("subPath", targetSubPath);
        String mountPath = RegistryConstants.LOCAL_REPOSITORY_BASE_PATH +
                        RegistryConstants.SYSTEM_MOUNT_PATH + "/" +
View Full Code Here

                                     String author)
            throws RegistryException {
        Resource r = new ResourceImpl();
        String relativePath = RegistryUtils.getRelativePath(registryContext, path);
        r.addProperty("path", relativePath);
        r.addProperty("target", target);
        r.addProperty("author", author);
        r.addProperty("subPath", targetSubPath);
        String mountPath = RegistryConstants.LOCAL_REPOSITORY_BASE_PATH +
                        RegistryConstants.SYSTEM_MOUNT_PATH + "/" +
                relativePath.replace("/", "-");
View Full Code Here

            throws RegistryException {
        Resource r = new ResourceImpl();
        String relativePath = RegistryUtils.getRelativePath(registryContext, path);
        r.addProperty("path", relativePath);
        r.addProperty("target", target);
        r.addProperty("author", author);
        r.addProperty("subPath", targetSubPath);
        String mountPath = RegistryConstants.LOCAL_REPOSITORY_BASE_PATH +
                        RegistryConstants.SYSTEM_MOUNT_PATH + "/" +
                relativePath.replace("/", "-");
        if (!registry.resourceExists(mountPath)) {
View Full Code Here

        Resource r = new ResourceImpl();
        String relativePath = RegistryUtils.getRelativePath(registryContext, path);
        r.addProperty("path", relativePath);
        r.addProperty("target", target);
        r.addProperty("author", author);
        r.addProperty("subPath", targetSubPath);
        String mountPath = RegistryConstants.LOCAL_REPOSITORY_BASE_PATH +
                        RegistryConstants.SYSTEM_MOUNT_PATH + "/" +
                relativePath.replace("/", "-");
        if (!registry.resourceExists(mountPath)) {
            registry.put(mountPath, r);
View Full Code Here

        if (remote) {
            relativePath = path;
        } else {
            relativePath = RegistryUtils.getRelativePath(registryContext, path);
        }
        r.addProperty("path", relativePath);
        r.addProperty("target", RegistryUtils.getRelativePath(registryContext,
                target));
        r.addProperty("author", author);
        String mountPath = RegistryConstants.LOCAL_REPOSITORY_BASE_PATH +
                        RegistryConstants.SYSTEM_MOUNT_PATH + "/" +
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.