Examples of applyTag()


Examples of org.wso2.carbon.registry.core.Registry.applyTag()

      resource.setProperty(RESETTLEMENT, NOT_PROVIDED);
    }

    requestContext.getRepository().put(resourcePath, resource);
    if (env && feasibility && resettlement) {
      registry.applyTag(resourcePath, COMPLETE_TAG);
    } else {
      registry.applyTag(resourcePath, INCOMPLETE_TAG);
    }

    requestContext.setProcessingComplete(true);
View Full Code Here

Examples of org.wso2.carbon.registry.core.Registry.applyTag()

    requestContext.getRepository().put(resourcePath, resource);
    if (env && feasibility && resettlement) {
      registry.applyTag(resourcePath, COMPLETE_TAG);
    } else {
      registry.applyTag(resourcePath, INCOMPLETE_TAG);
    }

    requestContext.setProcessingComplete(true);
  }
View Full Code Here

Examples of org.wso2.carbon.registry.core.session.UserRegistry.applyTag()

        fooRegistry.put("/r1", r1);

        adminRegistry.applyTag("/r1", "java");
        fooRegistry.applyTag("/r1", "java");
        barRegistry.applyTag("/r1", "java");

        Tag[] tags1 = adminRegistry.getTags("/r1");
        assertEquals("There should be 3 taggings on resource '/r1'", 3, tags1[0].getTagCount());

        // owner of the /r1 removes a tag. all tags should be removed
View Full Code Here

Examples of org.wso2.carbon.registry.core.session.UserRegistry.applyTag()

        Tag[] tags2 = adminRegistry.getTags("/r1");
        assertEquals("There should be 0 taggings on resource '/r1'", 0, tags2.length);

        adminRegistry.applyTag("/r1", "java");
        fooRegistry.applyTag("/r1", "java");
        barRegistry.applyTag("/r1", "java");

        // admin removes a tag. all tags should be removed
        adminRegistry.removeTag("/r1", "java");
        Tag[] tags3 = adminRegistry.getTags("/r1");
        assertEquals("There should be 0 taggings on resource '/r1'", 0, tags3.length);
View Full Code Here

Examples of org.wso2.carbon.registry.core.session.UserRegistry.applyTag()

        Tag[] tags3 = adminRegistry.getTags("/r1");
        assertEquals("There should be 0 taggings on resource '/r1'", 0, tags3.length);

        adminRegistry.applyTag("/r1", "java");
        fooRegistry.applyTag("/r1", "java");
        barRegistry.applyTag("/r1", "java");

        // normal user removes a tag. only the tag applied by the user is removed
        barRegistry.removeTag("/r1", "java");
        Tag[] tags4 = adminRegistry.getTags("/r1");
        assertEquals("There should be 2 taggings on resource '/r1'", 2, tags4[0].getTagCount());
View Full Code Here

Examples of org.wso2.carbon.registry.core.session.UserRegistry.applyTag()

        return TagBeanPopulator.populate(registry, path);
    }

    public void addTag(String tag, String path, String sessionId) throws RegistryException {
        UserRegistry registry = (UserRegistry) getRootRegistry();
        registry.applyTag(path, tag);
    }
   
    public void removeTag(String tag, String path, String sessionId)
    throws RegistryException {
        UserRegistry registry = (UserRegistry) getRootRegistry();
View Full Code Here

Examples of org.wso2.carbon.registry.core.session.UserRegistry.applyTag()

            nodeResource.setContent(resourceBytes);
            // store the resource in the registry
            registry.put(path, nodeResource);
            if (tag != null) {
                // apply the tag
                registry.applyTag(path, tag);
            }
            // commit
            registry.commitTransaction();

        } catch (RegistryException e) {
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.