Package org.wso2.carbon.event.core.subscription

Examples of org.wso2.carbon.event.core.subscription.Subscription.addProperty()


        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


            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 + "/" +
                relativePath.replace("/", "-");
View Full Code Here

            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 + "/" +
                relativePath.replace("/", "-");
        if (!registry.resourceExists(mountPath)) {
            registry.put(mountPath, r);
View Full Code Here

    // todo: uncomment below part after completing the associations
    public void testSettingDependenciesInResources() throws RegistryException {

        Resource r1 = registry.newResource();
        r1.setContent("some content for first r1".getBytes());
        r1.addProperty("url", "http://test.property");
        String path = registry.put("/depTest/test1/r1", r1);
        r1 = registry.get(path);

        Resource r2 = registry.newResource();
        r2.setContent("this is dependent on r1".getBytes());
View Full Code Here

            if (configRegistry.resourceExists(globalPath)) {
                Resource resource = configRegistry.get(globalPath);
                if (!Boolean.parseBoolean(resource
                        .getProperty(GLOBALLY_ENGAGED_CUSTOM))) {
                    resource.removeProperty(GLOBALLY_ENGAGED_CUSTOM);
                    resource.addProperty(GLOBALLY_ENGAGED_CUSTOM, "true");
                    configRegistry.put(globalPath, resource);
                }
            } else {
                Resource globalResource = configRegistry.newResource();
                globalResource.addProperty(GLOBALLY_ENGAGED_CUSTOM, "true");
View Full Code Here

                    resource.addProperty(GLOBALLY_ENGAGED_CUSTOM, "true");
                    configRegistry.put(globalPath, resource);
                }
            } else {
                Resource globalResource = configRegistry.newResource();
                globalResource.addProperty(GLOBALLY_ENGAGED_CUSTOM, "true");
                configRegistry.put(globalPath, globalResource);
            }

            // Gets a Policy object representing the configuration data.
            Policy policy = confData.toPolicy();
View Full Code Here

            if (configRegistry.resourceExists(globalPath)) {
                Resource resource = configRegistry.get(globalPath);
                if (Boolean.parseBoolean(resource
                        .getProperty(GLOBALLY_ENGAGED_CUSTOM))) {
                    resource.removeProperty(GLOBALLY_ENGAGED_CUSTOM);
                    resource.addProperty(GLOBALLY_ENGAGED_CUSTOM, "false");
                    configRegistry.put(globalPath, resource);
                }
            }

            Parameter param = module.getParameter(GLOBALLY_ENGAGED_PARAM_NAME);
View Full Code Here

                embeddedRegistryService.getUserRegistry(realmConfig.getAdminUserName(), 0);
        Resource r = registry1.newResource();
        registry1.put("/test", r);

        r = registry1.get("/");
        r.addProperty("name", "value");
        registry1.put("/", r);

        UserRegistry registry2 =
                embeddedRegistryService.getUserRegistry(realmConfig.getAdminUserName(), 1);
        r = registry2.get("/");
View Full Code Here

            }
            r = registry.get(lookupPath);
        } else {
            r = registry.newResource();
        }
        r.addProperty(RegistryConstants.REGISTRY_FIXED_MOUNT, Boolean.toString(true));
        registry.put(lookupPath, r);
    }

    // Determines whether a given mount point is a fixed mount or not.
    private boolean isFixedMount(Registry registry, String path, String targetPath,
View Full Code Here

    private void createPseudoLink(Registry registry, String path, String target,
                                  String targetSubPath) throws RegistryException {
        Resource resource;
        if (registry.resourceExists(path)) {
            resource = registry.get(path);
            resource.addProperty(RegistryConstants.REGISTRY_EXISTING_RESOURCE, "true");
        } else {
            resource = new CollectionImpl();
        }
        resource.addProperty(RegistryConstants.REGISTRY_NON_RECURSIVE, "true");
        resource.addProperty(RegistryConstants.REGISTRY_LINK_RESTORATION,
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.