Package org.wso2.carbon.registry.core

Examples of org.wso2.carbon.registry.core.Resource.removePropertyValue()


        r1.addProperty("p1", "v1");
        r1.addProperty("p1", "v2");
        registry.put("/props/t2/r1", r1);

        Resource r1e1 = registry.get("/props/t2/r1");
        r1e1.removePropertyValue("p1", "v1");
        registry.put("/props/t2/r1", r1e1);

        Resource r1e2 = registry.get("/props/t2/r1");

        assertFalse("Property is not removed.", r1e2.getPropertyValues("p1").contains("v1"));
View Full Code Here


            /* remove owner from viewer's pending requests list */
            viewerResourcePath = viewerResourcePath +
                                 SocialImplConstants.PENDING_RELATIONSHIP_REQUEST_PATH;
            if (registry.resourceExists(viewerResourcePath)) {
                Resource resource = registry.get(viewerResourcePath);
                resource.removePropertyValue(SocialImplConstants.RELATIONSHIP_REQUESTS_PROPERTY,
                                             owner);
                registry.put(viewerResourcePath, resource);
            }
        } catch (RegistryException e) {
            log.error(e.getMessage(), e);
View Full Code Here

                if (registry.resourceExists(resourcePath)) {
                    ownerResource = registry.get(resourcePath);
                    if (ownerResource.getPropertyValues(SocialImplConstants.
                            RELATIONSHIP_REQUESTS_PROPERTY).indexOf(owner) >= 0) {
                        // remove property
                        ownerResource.removePropertyValue(SocialImplConstants
                                .RELATIONSHIP_REQUESTS_PROPERTY, owner);
                        registry.put(resourcePath, ownerResource);
                    }

                    result = true;
View Full Code Here

        r1.addProperty("p1", "v2");
        registry.put("/props/t2/r1", r1);

        Resource r1e1 = registry.get("/props/t2/r1");
        r1e1.setContent("r1 content updated");
        r1e1.removePropertyValue("p1", "v1");
        registry.put("/props/t2/r1", r1e1);

        Resource r1e2 = registry.get("/props/t2/r1");

        assertFalse("Property is not removed.", r1e2.getPropertyValues("p1").contains("v1"));
View Full Code Here

        r1.addProperty("p1", "v2");
        registry.put("/props/t2/r1", r1);

        Resource r1e1 = registry.get("/props/t2/r1");
        r1e1.setContent("r1 content updated");
        r1e1.removePropertyValue("p1", "v1");
        registry.put("/props/t2/r1", r1e1);

        Resource r1e2 = registry.get("/props/t2/r1");

        assertFalse("Property is not removed.", r1e2.getPropertyValues("p1").contains("v1"));
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.