|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.registry.core.jdbc.dao.JDBCTagsDAO
org.wso2.carbon.registry.core.jdbc.dao.JDBCTagsVersionDAO
public class JDBCTagsVersionDAO
An extension of JDBCTagsDAO implements TagsDAO to store tags on a JDBC-based
database, when versioning for tags has been enabled.
| Field Summary |
|---|
| Fields inherited from class org.wso2.carbon.registry.core.jdbc.dao.JDBCTagsDAO |
|---|
ADD_TAG_LOCK |
| Constructor Summary | |
|---|---|
JDBCTagsVersionDAO(DAOManager daoManager)
Default constructor |
|
| Method Summary | |
|---|---|
void |
addTagging(String tagName,
ResourceImpl resource,
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. |
List |
getPathsWithAnyTag(String[] tags)
Method to obtain the list of paths having any of the given tags. |
ResourceImpl |
getResourceWithMinimumData(String path)
Gets the resource with sufficient data to differentiate it from another resource. |
long |
getTagCount(ResourceImpl resourceImpl,
String tag)
Method to get the number of tags added to the given resource, by the given name. |
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,
String tag,
String userID)
Method to get a tagging added to a given resource by the given user. |
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. |
boolean |
taggingExists(String tagName,
ResourceImpl resourceImpl,
String userID)
Method to determine whether the given tag exists. |
| Methods inherited from class org.wso2.carbon.registry.core.jdbc.dao.JDBCTagsDAO |
|---|
getPathsWithTag, removeTags, removeTags, removeTags, removeVersionTags |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.wso2.carbon.registry.core.dao.TagsDAO |
|---|
removeTags, removeTags, removeTags, removeVersionTags |
| Constructor Detail |
|---|
public JDBCTagsVersionDAO(DAOManager daoManager)
daoManager - instance of the data access object manager.| Method Detail |
|---|
public void addTagging(String tagName,
ResourceImpl resource,
String userID)
throws RegistryException
addTagging in interface TagsDAOaddTagging in class JDBCTagsDAOresource - 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 tag
public void addTaggings(ResourceImpl resource,
TaggingDO[] taggingDOs)
throws RegistryException
addTaggings in interface TagsDAOaddTaggings in class JDBCTagsDAOresource - the resourcetaggingDOs - the tags to be persisted.
RegistryException - if some error occurs while adding tags
public void copyTags(ResourceImpl fromResource,
ResourceImpl toResource)
throws RegistryException
copyTags in interface TagsDAOcopyTags in class JDBCTagsDAOfromResource - the source resource.toResource - the target resource.
RegistryException - if some error occurs while copying tags
public boolean taggingExists(String tagName,
ResourceImpl resourceImpl,
String userID)
throws RegistryException
taggingExists in interface TagsDAOtaggingExists in class JDBCTagsDAOresourceImpl - 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.
public String[] getTags(ResourceImpl resourceImpl)
throws RegistryException
getTags in interface TagsDAOgetTags in class JDBCTagsDAOresourceImpl - the resource.
RegistryException - if an error occurs while getting the tag names.
public List<TaggingDO> getTagDOs(ResourceImpl resourceImpl)
throws RegistryException
getTagDOs in interface TagsDAOgetTagDOs in class JDBCTagsDAOresourceImpl - the resource.
RegistryException - if an error occurs while getting the tagging data objects.
public List getPathsWithAnyTag(String[] tags)
throws RegistryException
getPathsWithAnyTag in interface TagsDAOgetPathsWithAnyTag in class JDBCTagsDAOtags - the tags.
RegistryException - if an error occurs.
public long getTagCount(ResourceImpl resourceImpl,
String tag)
throws RegistryException
getTagCount in interface TagsDAOgetTagCount in class JDBCTagsDAOresourceImpl - the resource.tag - the tag name
RegistryException - if an error occurred while getting the number of tags.
public Tag[] getTagsWithCount(ResourceImpl resourceImpl)
throws RegistryException
getTagsWithCount in interface TagsDAOgetTagsWithCount in class JDBCTagsDAOresourceImpl - the resource.
RegistryException - if an error occurred while getting tags.
public TaggingDO[] getTagging(ResourceImpl resource,
String tag,
String userID)
throws RegistryException
getTagging in interface TagsDAOgetTagging in class JDBCTagsDAOresource - 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.
public TaggingDO[] getTagging(ResourceImpl resource)
throws RegistryException
getTagging in interface TagsDAOgetTagging in class JDBCTagsDAOresource - the resource.
RegistryException - if an error occurs while getting the taggings.
public TaggingDO getTagging(long taggingID)
throws RegistryException
getTagging in interface TagsDAOgetTagging in class JDBCTagsDAOtaggingID - the id of the tagging.
RegistryException - if an error occurs while getting the tagging.
public ResourceImpl getResourceWithMinimumData(String path)
throws RegistryException
ResourceImpl with the path, name and path identifier
of a resource.
getResourceWithMinimumData in interface TagsDAOgetResourceWithMinimumData in class JDBCTagsDAOpath - the path of the resource.
RegistryException - if an error occurs while retrieving resource data.
public void moveTags(ResourceIDImpl source,
ResourceIDImpl target)
throws RegistryException
moveTags in interface TagsDAOmoveTags in class JDBCTagsDAOsource - the source resource.target - the target resource.
RegistryException - if some error occurs while moving tags
public void moveTagPaths(ResourceIDImpl source,
ResourceIDImpl target)
throws RegistryException
moveTagPaths in interface TagsDAOmoveTagPaths in class JDBCTagsDAOsource - 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 | |||||||||