Package org.wso2.carbon.registry.core

Examples of org.wso2.carbon.registry.core.Collection.addProperty()


    public void testNullValuedProperties() throws RegistryException {

        Resource r2 = registry.newResource();
        r2.setContent("Some content for r2");
        r2.addProperty("p1", null);
        registry.put("/propTest3/r2", r2);

        Resource r2b = registry.get("/propTest3/r2");
        String p1Value = r2b.getProperty("p1");
View Full Code Here


    public void testNullMultiValuedProperties() throws RegistryException {

        Resource r1 = registry.newResource();
        r1.setContent("Some content for r1");
        r1.addProperty("p1", null);
        r1.addProperty("p1", null);
        registry.put("/propTest4/r1", r1);

        Resource r1b = registry.get("/propTest4/r1");
        List<String> propValues = r1b.getPropertyValues("p1");
View Full Code Here

    public void testNullMultiValuedProperties() throws RegistryException {

        Resource r1 = registry.newResource();
        r1.setContent("Some content for r1");
        r1.addProperty("p1", null);
        r1.addProperty("p1", null);
        registry.put("/propTest4/r1", r1);

        Resource r1b = registry.get("/propTest4/r1");
        List<String> propValues = r1b.getPropertyValues("p1");
View Full Code Here

     public void testRemovingMultivaluedProperties() throws RegistryException {

        Resource r1 = registry.newResource();
        r1.setContent("r1 content");
        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");
View Full Code Here

     public void testRemovingMultivaluedProperties() throws RegistryException {

        Resource r1 = registry.newResource();
        r1.setContent("r1 content");
        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);
View Full Code Here

     public void testEditingMultivaluedProperties() throws RegistryException {

        Resource r1 = registry.newResource();
        r1.setContent("r1 content");
        r1.addProperty("p1", "v1");
        r1.addProperty("p1", "v2");
        registry.put("/props/t3/r1", r1);

        Resource r1e1 = registry.get("/props/t3/r1");
        r1e1.editPropertyValue("p1", "v1", "v3");
View Full Code Here

     public void testEditingMultivaluedProperties() throws RegistryException {

        Resource r1 = registry.newResource();
        r1.setContent("r1 content");
        r1.addProperty("p1", "v1");
        r1.addProperty("p1", "v2");
        registry.put("/props/t3/r1", r1);

        Resource r1e1 = registry.get("/props/t3/r1");
        r1e1.editPropertyValue("p1", "v1", "v3");
        registry.put("/props/t3/r1", r1e1);
View Full Code Here

    public void testResourcePropertyVersioning() throws RegistryException {

        Resource r1 = registry.newResource();
        r1.setContent("content 1");
        r1.addProperty("p1", "v1");
        registry.put("/v4/r1", r1);

        Resource r1v2 = registry.get("/v4/r1");
        r1v2.addProperty("p2", "v2");
        registry.put("/v4/r1", r1v2);
View Full Code Here

        r1.setContent("content 1");
        r1.addProperty("p1", "v1");
        registry.put("/v4/r1", r1);

        Resource r1v2 = registry.get("/v4/r1");
        r1v2.addProperty("p2", "v2");
        registry.put("/v4/r1", r1v2);
        registry.put("/v4/r1", r1v2);

        String[] r1Versions = registry.getVersions("/v4/r1");
View Full Code Here

                    "(R.REG_PATH_ID=RT.REG_PATH_ID AND R.REG_NAME=RT.REG_RESOURCE_NAME)) " +
                    "AND R.REG_DESCRIPTION LIKE ?";
            Resource q1 = registry.newResource();
            q1.setContent(sql1);
            q1.setMediaType(RegistryConstants.SQL_QUERY_MEDIA_TYPE);
            q1.addProperty(RegistryConstants.RESULT_TYPE_PROPERTY_NAME,
                    RegistryConstants.RATINGS_RESULT_TYPE);
            registry.put(QUERY_PATH, q1);
        } catch (RegistryException e) {
            e.printStackTrace();
        }
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.