|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.dotmarketing.tag.factories.TagFactory
public class TagFactory
| Constructor Summary | |
|---|---|
TagFactory()
|
|
| Method Summary | |
|---|---|
protected static void |
_checkUserPermissions(Inode webAsset,
com.liferay.portal.model.User user,
int permission)
Checks the permission access of an user over an object |
static Tag |
addTag(java.lang.String tagName,
java.lang.String userId)
Creates a new tag |
static java.util.List |
addTag(java.lang.String tagName,
java.lang.String userId,
java.lang.String inode)
Tags an object, validates the existence of a tag(s), creates it if it doesn't exists and then tags the object |
static TagInode |
addTagInode(java.lang.String tagName,
java.lang.String inode,
java.lang.String hostId)
Gets a tagInode and a host identifier, if doesn't exists then the tagInode it's created |
static void |
deleteTag(java.lang.String tagId)
Deletes a tag |
static void |
deleteTag(java.lang.String tagName,
java.lang.String userId)
Deletes a tag |
static void |
deleteTag(Tag tag)
Deletes a tag |
static java.util.List |
deleteTagInode(java.lang.String tagName,
java.lang.String inode)
Deletes an object tag assignment(s) |
static void |
deleteTagInode(TagInode tagInode)
Deletes a TagInode |
static void |
editTag(java.lang.String tagName,
java.lang.String oldTagName,
java.lang.String userId)
Renames a tag |
static java.util.List |
getAllTag(java.lang.String userId)
Gets all the tags created, with the respective owner and permission information |
static java.util.List<Tag> |
getAllTags()
Get a list of all the tags created |
static java.util.List<Tag> |
getAllTagsForUsers(java.util.List<java.lang.String> userIds)
Gets all the tags given a user List |
static java.util.List<java.lang.String> |
getAllTagsName()
Get a list of all the tags name created |
static java.util.List<Tag> |
getSuggestedTag(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.String selectedHostId)
Gets a suggested tag(s), by name |
static java.util.List<Tag> |
getSuggestedTag(java.lang.String name)
Gets a suggested tag(s), by name |
static Tag |
getTag(java.lang.String name,
java.lang.String userId)
Gets a Tag by name, validates the existance of the tag, if it doesn't exists then is created |
static Tag |
getTag(java.lang.String name,
java.lang.String userId,
java.lang.String hostId)
Gets a Tag by name, validates the existance of the tag, if it doesn't exists then is created |
static java.util.List<Tag> |
getTagByName(java.lang.String name)
Gets a Tag by name |
static Tag |
getTagByTagId(java.lang.String tagId)
Gets a Tag by a tagId retrieved from a TagInode. |
static Tag |
getTagByTagIdAndHostId(java.lang.String tagId,
java.lang.String hostId)
Gets a Tag by a tagId and a hostId. |
static java.util.List<Tag> |
getTagByUser(java.lang.String userId)
Gets all the tag created by an user |
static java.util.List |
getTagInfoByName(java.lang.String name)
Gets a tag with the owner information, searching by name |
static TagInode |
getTagInode(java.lang.String tagId,
java.lang.String inode)
Gets a tagInode by name and inode |
static java.util.List |
getTagInodeByInode(java.lang.String inode)
Gets all tags associated to an object |
static java.util.List<TagInode> |
getTagInodeByTagId(java.lang.String tagId)
Gets all tags associated to an object |
static boolean |
isGlobalTag(Tag tag)
Check if tag is global |
static Tag |
saveTag(java.lang.String tagName,
java.lang.String userId,
java.lang.String hostId)
Creates a new tag |
static void |
setPermissionAPI(PermissionAPI permissionAPIRef)
|
static void |
updateTag(java.lang.String tagId,
java.lang.String tagName,
boolean updateTagReference,
java.lang.String hostId)
|
static void |
updateTag(java.lang.String tagId,
java.lang.String tagName,
java.lang.String hostId)
|
static void |
updateTagReferences(java.lang.String hostIdentifier,
java.lang.String oldTagStorageId,
java.lang.String newTagStorageId)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TagFactory()
| Method Detail |
|---|
public static void setPermissionAPI(PermissionAPI permissionAPIRef)
permissionAPI - the permissionAPI to setpublic static java.util.List<Tag> getAllTags()
public static java.util.List<java.lang.String> getAllTagsName()
public static java.util.List<Tag> getTagByName(java.lang.String name)
name - name of the tag to get
public static java.util.List<Tag> getTagByUser(java.lang.String userId)
userId - id of the user
public static Tag getTag(java.lang.String name,
java.lang.String userId)
name - name of the tag to getuserId - owner of the tag
public static Tag addTag(java.lang.String tagName,
java.lang.String userId)
tagName - name of the new taguserId - owner of the new tag
public static java.util.List addTag(java.lang.String tagName,
java.lang.String userId,
java.lang.String inode)
throws java.lang.Exception
tagName - tag(s) to createuserId - owner of the taginode - object to tag
java.lang.Exceptionpublic static void deleteTag(Tag tag)
tag - tag to be deleted
public static void deleteTag(java.lang.String tagName,
java.lang.String userId)
tagName - name of the tag to be deleteduserId - id of the tag owner
public static void editTag(java.lang.String tagName,
java.lang.String oldTagName,
java.lang.String userId)
tagName - new tag nameoldTagName - current tag nameuserId - owner of the tagpublic static java.util.List getAllTag(java.lang.String userId)
userId - id of the user that searches the tag
public static java.util.List getTagInfoByName(java.lang.String name)
name - name of the tag
protected static void _checkUserPermissions(Inode webAsset,
com.liferay.portal.model.User user,
int permission)
throws com.liferay.portal.struts.ActionException,
DotDataException
webAsset - object to validates accessuser - user to validate accesspermission - read or write permission to validates
com.liferay.portal.struts.ActionException
DotDataException
public static TagInode addTagInode(java.lang.String tagName,
java.lang.String inode,
java.lang.String hostId)
throws java.lang.Exception
tagName - name of the taginode - inode of the object taggedhostId - the identifier of host that storage the tag
java.lang.Exceptionpublic static java.util.List getTagInodeByInode(java.lang.String inode)
inode - inode of the object tagged
public static TagInode getTagInode(java.lang.String tagId,
java.lang.String inode)
name - name of the taginode - inode of the object tagged
public static void deleteTagInode(TagInode tagInode)
tagInode - TagInode to delete
public static java.util.List deleteTagInode(java.lang.String tagName,
java.lang.String inode)
tagName - name(s) of the tag(s)inode - inode of the object tagged
java.lang.Exceptionpublic static java.util.List<Tag> getSuggestedTag(java.lang.String name)
name - name of the tag searched
public static java.util.List<Tag> getAllTagsForUsers(java.util.List<java.lang.String> userIds)
userIds - the user id's associated with the tags
public static Tag getTag(java.lang.String name,
java.lang.String userId,
java.lang.String hostId)
throws java.lang.Exception
name - name of the tag to getuserId - owner of the taghostId -
java.lang.Exception
public static Tag saveTag(java.lang.String tagName,
java.lang.String userId,
java.lang.String hostId)
throws java.lang.Exception
tagName - name of the new taguserId - owner of the new taghostId -
DotHibernateException
java.lang.Exceptionpublic static boolean isGlobalTag(Tag tag)
tag -
public static java.util.List<TagInode> getTagInodeByTagId(java.lang.String tagId)
tagId - tagId of the object tagged
public static Tag getTagByTagId(java.lang.String tagId)
throws DotHibernateException
tagId - the tag id to get
DotHibernateException
public static void deleteTag(java.lang.String tagId)
throws DotHibernateException
tagName - name of the tag to be deleteduserId - id of the tag owner
DotHibernateException
public static void updateTagReferences(java.lang.String hostIdentifier,
java.lang.String oldTagStorageId,
java.lang.String newTagStorageId)
public static void updateTag(java.lang.String tagId,
java.lang.String tagName,
java.lang.String hostId)
throws java.lang.Exception
java.lang.Exception
public static void updateTag(java.lang.String tagId,
java.lang.String tagName,
boolean updateTagReference,
java.lang.String hostId)
throws java.lang.Exception
java.lang.Exception
public static Tag getTagByTagIdAndHostId(java.lang.String tagId,
java.lang.String hostId)
throws DotHibernateException
tagId - the tag id to gethostId - the host id
DotHibernateException
public static java.util.List<Tag> getSuggestedTag(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.String selectedHostId)
name - name of the tag searched
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||