Package org.springframework.social.alfresco.api.entities

Examples of org.springframework.social.alfresco.api.entities.Tag


    public void getNamedTag()
        throws JsonParseException,
            JsonMappingException,
            IOException
    {
        Tag tag = alfresco.getTag(network, "test");

        assertEquals("test", tag.getTag());
    }
View Full Code Here


    public void updateTag()
        throws JsonParseException,
            JsonMappingException,
            IOException
    {
        Tag _tag = alfresco.getTag(network, tag);

        alfresco.updateTag(network, _tag.getId(), tag + "-test");

        _tag = alfresco.getTag(network, tag + "-test");

        assertNotNull(_tag);

        alfresco.updateTag(network, _tag.getId(), tag);
    }
View Full Code Here

    public void nodeTagOperations()
        throws JsonParseException,
            JsonMappingException,
            IOException
    {
        Tag tag = alfresco.addTagToNode(network, node, "test");

        assertEquals("test", tag.getTag());

        alfresco.removeTagFromNode(network, node, tag.getId());

        // TODO test tag was removed from node
    }
View Full Code Here

        Map<String, String> parameters = new HashMap<String, String>();
        parameters.put(Pagination.MAXITEMS, Integer.toString(MAXITEMS));

        boolean found = false;
        Tag tagFound = null;

        AlfrescoList<Tag> response = getTags(network, parameters);
        while (!found)
        {
            for (Iterator<Tag> iterator = response.getEntries().iterator(); iterator.hasNext();)
            {
                Tag _tag = iterator.next();
                if (_tag.getTag().equals(tag))
                {
                    tagFound = _tag;
                    found = true;
                    break;
                }
View Full Code Here

    {
        Map<String, String> vars = new HashMap<String, String>();
        vars.put(TemplateParams.NETWORK, network);
        vars.put(TemplateParams.TAG, tagId);

        Tag _tag = new Tag();
        _tag.setTag(tag);

        getRestTemplate().put(TAG_URL, new HttpEntity<Tag>(_tag, headers), vars);
        log.debug("updateTag: " + tag);

    }
View Full Code Here

    {
        Map<String, String> vars = new HashMap<String, String>();
        vars.put(TemplateParams.NETWORK, network);
        vars.put(TemplateParams.NODE, node);

        Tag _tag = new Tag();
        _tag.setTag(tag);

        String response = getRestTemplate().postForObject(NODE_TAG_URL, new HttpEntity<Tag>(_tag, headers), String.class, vars);
        log.debug("addTagToNode: " + response);
        Response<Tag> t = mapper.readValue(response, entryResponseType(Tag.class));
        return t.getEntry();
View Full Code Here

        vars.put(TemplateParams.NODE, node);

        java.util.List<Tag> _tags = new ArrayList<Tag>();
        for (String tag : tags)
        {
            Tag _tag = new Tag();
            _tag.setTag(tag);
            _tags.add(_tag);
        }

        String response = getRestTemplate().postForObject(NODE_TAGS_URL, new HttpEntity<java.util.List<Tag>>(_tags, headers), String.class, vars);
        log.debug("addTagsToNode: " + response);
View Full Code Here

TOP

Related Classes of org.springframework.social.alfresco.api.entities.Tag

Copyright © 2018 www.massapicom. 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.