com.dotmarketing.tag.ajax
Class TagAjax

java.lang.Object
  extended by com.dotmarketing.tag.ajax.TagAjax

public class TagAjax
extends java.lang.Object


Constructor Summary
TagAjax()
           
 
Method Summary
static java.util.Map<java.lang.String,java.lang.Object> addTag(java.lang.String tagNames, java.lang.String userId, java.lang.String hostId)
          Tags an object, validates the existence of a tag(s), creates it if it doesn't exists and then tags the object
static void addTagFullCommand(java.lang.String tagName, java.lang.String userId)
          Tags the users in selected in the User Manager, validates the existence of a tag(s), creates it if it doesn't exists and then tags the object
 void deleteTag(java.lang.String tagId)
          Deletes a tag
 java.util.Map<java.lang.String,java.util.List<Tag>> deleteTag(java.lang.String tagName, java.lang.String userId)
          Deletes an object tag assignment(s)
static void deleteTagFullCommand(java.lang.String tagName)
           
 java.util.List deleteTagInode(java.lang.String tagName, java.lang.String inode)
          Deletes an object tag assignment(s)
 java.util.List getAllTag(java.lang.String userId)
          Gets all the tags created, with the respective owner and permission information
 java.util.List<Tag> getAllTags()
          Get a list of all the tags created
 java.util.List<Tag> getSuggestedTag(java.lang.String tagName, java.lang.String selectedHostId)
          Gets a suggested tag(s), by name
static java.util.List<Tag> getTagByName(java.lang.String tagName)
          Gets a tag with the owner information, searching by name
 java.util.List<Tag> getTagByUser(java.lang.String userId)
          Gets all the tag created by an user
 java.util.List getTagInfoByName(java.lang.String tagName)
          Gets a tag with the owner information, searching by name
static java.util.List getTagInodeByInode(java.lang.String inode)
          Gets all tags associated to an object
 java.util.Map<java.lang.String,java.util.List<Tag>> getTagsByUser(java.lang.String userId)
          Gets all the tag created by an user
 java.util.List<Tag> getUsersTags()
           
static java.util.Map<java.lang.String,java.lang.Object> importTags(byte[] uploadFile)
           
static java.util.Map<java.lang.String,java.lang.Object> updateTag(java.lang.String tagId, java.lang.String tagName, java.lang.String hostId)
          Updates an existing tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagAjax

public TagAjax()
Method Detail

addTag

public static java.util.Map<java.lang.String,java.lang.Object> addTag(java.lang.String tagNames,
                                                                      java.lang.String userId,
                                                                      java.lang.String hostId)
Tags an object, validates the existence of a tag(s), creates it if it doesn't exists and then tags the object

Parameters:
tagName - tag(s) to create
userId - owner of the tag
inode - object to tag
Returns:
a list of all tags assigned to an object

updateTag

public static java.util.Map<java.lang.String,java.lang.Object> updateTag(java.lang.String tagId,
                                                                         java.lang.String tagName,
                                                                         java.lang.String hostId)
Updates an existing tag.

Parameters:
tagName - tag to update
userId - owner of the tag
hostId - the storage host id

addTagFullCommand

public static void addTagFullCommand(java.lang.String tagName,
                                     java.lang.String userId)
Tags the users in selected in the User Manager, validates the existence of a tag(s), creates it if it doesn't exists and then tags the object

Parameters:
tagName - tag(s) to create
userId - owner of the tag

getTagByUser

public java.util.List<Tag> getTagByUser(java.lang.String userId)
Gets all the tag created by an user

Parameters:
userId - id of the user
Returns:
a list of all the tags created

getTagsByUser

public java.util.Map<java.lang.String,java.util.List<Tag>> getTagsByUser(java.lang.String userId)
Gets all the tag created by an user

Parameters:
userId - id of the user
Returns:
a Map with a list of all the tags created

deleteTag

public void deleteTag(java.lang.String tagId)
Deletes a tag

Parameters:
tagName - name of the tag to be deleted
userId - id of the tag owner

getAllTag

public java.util.List getAllTag(java.lang.String userId)
Gets all the tags created, with the respective owner and permission information

Parameters:
userId - id of the user that searches the tag
Returns:
a complete list of all the tags, with the owner information and the respective permission information

getTagByName

public static java.util.List<Tag> getTagByName(java.lang.String tagName)
Gets a tag with the owner information, searching by name

Parameters:
name - name of the tag
Returns:
the tag with the owner information

getTagInfoByName

public java.util.List getTagInfoByName(java.lang.String tagName)
Gets a tag with the owner information, searching by name

Parameters:
name - name of the tag
Returns:
the tag with the owner information

getTagInodeByInode

public static java.util.List getTagInodeByInode(java.lang.String inode)
Gets all tags associated to an object

Parameters:
inode - inode of the object tagged
Returns:
list of all the TagInode where the tags are associated to the object

deleteTagInode

public java.util.List deleteTagInode(java.lang.String tagName,
                                     java.lang.String inode)
Deletes an object tag assignment(s)

Parameters:
tagName - name(s) of the tag(s)
inode - inode of the object tagged
Returns:
a list of all tags assigned to an object

deleteTag

public java.util.Map<java.lang.String,java.util.List<Tag>> deleteTag(java.lang.String tagName,
                                                                     java.lang.String userId)
Deletes an object tag assignment(s)

Parameters:
tagName - name(s) of the tag(s)
inode - inode of the object tagged
Returns:
a list of all tags assigned to a user

deleteTagFullCommand

public static void deleteTagFullCommand(java.lang.String tagName)

getSuggestedTag

public java.util.List<Tag> getSuggestedTag(java.lang.String tagName,
                                           java.lang.String selectedHostId)
Gets a suggested tag(s), by name

Parameters:
name - name of the tag searched
Returns:
list of suggested tags

getAllTags

public java.util.List<Tag> getAllTags()
Get a list of all the tags created

Returns:
list of all tags created

getUsersTags

public java.util.List<Tag> getUsersTags()

importTags

public static java.util.Map<java.lang.String,java.lang.Object> importTags(byte[] uploadFile)


Copyright © 2013 dotCMS Inc. All Rights Reserved.