|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TagsDAO
Data Access Object for Tags
Method Summary | |
---|---|
void |
addTagging(java.lang.String tagName,
ResourceImpl resource,
java.lang.String userID)
Method to persist a tag. |
void |
addTaggings(ResourceImpl resource,
TaggingDO[] taggingDOs)
Method to persist tags. |
void |
copyTags(ResourceImpl fromResource,
ResourceImpl toResource)
Method to copy tags. |
java.util.List |
getPathsWithAnyTag(java.lang.String[] tags)
Method to obtain the list of paths having any of the given tags. |
ResourceImpl |
getResourceWithMinimumData(java.lang.String path)
Gets the resource with sufficient data to differentiate it from another resource. |
long |
getTagCount(ResourceImpl resourceImpl,
java.lang.String tag)
Method to get the number of tags added to the given resource, by the given name. |
java.util.List<TaggingDO> |
getTagDOs(ResourceImpl resourceImpl)
Method to get the data objects of tags added to the given resource. |
TaggingDO |
getTagging(long taggingID)
Method to get a tagging by the given id. |
TaggingDO[] |
getTagging(ResourceImpl resource)
Method to get all taggings added to a given resource. |
TaggingDO[] |
getTagging(ResourceImpl resource,
java.lang.String tag,
java.lang.String userID)
Method to get a tagging added to a given resource by the given user. |
java.lang.String[] |
getTags(ResourceImpl resourceImpl)
Method to get the names of tags added to the given resource. |
Tag[] |
getTagsWithCount(ResourceImpl resourceImpl)
Method to get tags added to the given resource, along with the count. |
void |
moveTagPaths(ResourceIDImpl source,
ResourceIDImpl target)
Method to move tag paths. |
void |
moveTags(ResourceIDImpl source,
ResourceIDImpl target)
Method to move tags. |
void |
removeTags(ResourceImpl resource)
Removes all tags added to the given resource by user with the given id. |
void |
removeTags(ResourceImpl resource,
java.lang.String tag)
Removes a tag by the given name added to the given resource by any user. |
void |
removeTags(ResourceImpl resource,
java.lang.String tag,
java.lang.String userID)
Removes a tag by the given name added to the given resource by user with the given id. |
boolean |
taggingExists(java.lang.String tagName,
ResourceImpl resourceImpl,
java.lang.String userID)
Method to determine whether the given tag exists. |
Method Detail |
---|
void addTagging(java.lang.String tagName, ResourceImpl resource, java.lang.String userID) throws RegistryException
resource
- the resourceuserID
- the id of the user who added the tag.tagName
- the name of tag to be persisted.
RegistryException
- if some error occurs while adding a tagvoid addTaggings(ResourceImpl resource, TaggingDO[] taggingDOs) throws RegistryException
resource
- the resourcetaggingDOs
- the tags to be persisted.
RegistryException
- if some error occurs while adding tagsvoid copyTags(ResourceImpl fromResource, ResourceImpl toResource) throws RegistryException
fromResource
- the source resource.toResource
- the target resource.
RegistryException
- if some error occurs while copying tagsboolean taggingExists(java.lang.String tagName, ResourceImpl resourceImpl, java.lang.String userID) throws RegistryException
resourceImpl
- the resourceuserID
- the id of the user who added the tag.tagName
- the name of tag to be persisted.
RegistryException
- if some error occurs while checking whether a tag exists.void removeTags(ResourceImpl resource, java.lang.String tag) throws RegistryException
resource
- the resourcetag
- the name of tag to be persisted.
RegistryException
- if an error occurred while removing the tag.void removeTags(ResourceImpl resource, java.lang.String tag, java.lang.String userID) throws RegistryException
resource
- the resourcetag
- the name of tag to be persisted.userID
- the id of the user who added the tag.
RegistryException
- if an error occurred while removing the tag.void removeTags(ResourceImpl resource) throws RegistryException
resource
- the resource
RegistryException
- if an error occurred while removing tags.java.lang.String[] getTags(ResourceImpl resourceImpl) throws RegistryException
resourceImpl
- the resource.
RegistryException
- if an error occurs while getting the tag names.java.util.List<TaggingDO> getTagDOs(ResourceImpl resourceImpl) throws RegistryException
resourceImpl
- the resource.
RegistryException
- if an error occurs while getting the tagging data objects.java.util.List getPathsWithAnyTag(java.lang.String[] tags) throws RegistryException
tags
- the tags.
RegistryException
- if an error occurs.long getTagCount(ResourceImpl resourceImpl, java.lang.String tag) throws RegistryException
resourceImpl
- the resource.tag
- the tag name
RegistryException
- if an error occurred while getting the number of tags.Tag[] getTagsWithCount(ResourceImpl resourceImpl) throws RegistryException
resourceImpl
- the resource.
RegistryException
- if an error occurred while getting tags.TaggingDO[] getTagging(ResourceImpl resource, java.lang.String tag, java.lang.String userID) throws RegistryException
resource
- the resource.tag
- the name of the tag.userID
- the id of the user who added the tagging.
RegistryException
- if an error occurs while getting the tagging.TaggingDO[] getTagging(ResourceImpl resource) throws RegistryException
resource
- the resource.
RegistryException
- if an error occurs while getting the taggings.TaggingDO getTagging(long taggingID) throws RegistryException
taggingID
- the id of the tagging.
RegistryException
- if an error occurs while getting the tagging.ResourceImpl getResourceWithMinimumData(java.lang.String path) throws RegistryException
ResourceImpl
with the path, name and path identifier
of a resource.
path
- the path of the resource.
RegistryException
- if an error occurs while retrieving resource data.void moveTags(ResourceIDImpl source, ResourceIDImpl target) throws RegistryException
source
- the source resource.target
- the target resource.
RegistryException
- if some error occurs while moving tagsvoid moveTagPaths(ResourceIDImpl source, ResourceIDImpl target) throws RegistryException
source
- the source resource.target
- the target resource.
RegistryException
- if some error occurs while moving tag paths
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |