com.konakartadmin.blif
Interface AdminTagMgrIf

All Known Implementing Classes:
AdminTagMgr

public interface AdminTagMgrIf

AdminTagMgrIf


Method Summary
 void addCategoriesToTagGroups(int tagGroupId, int[] categories)
          Add the array of categories to the tagGroup specified.
 void addTagGroupsToCategory(AdminTagGroup[] tagGroups, int categoryId)
          Add the array of tagGroups to the category identified by categoryId.
 void addTagsToProduct(AdminTag[] tags, int productId)
          Add the array of tags to the product identified by productId.
 void deleteTag(java.lang.String sessionId, int id)
          Delete a Tag from the database.
 void deleteTagGroup(java.lang.String sessionId, int id)
          Delete a TagGroup from the database.
 AdminTagGroupSearchResult getTagGroups(java.lang.String sessionId, AdminSearch search, int offset, int size)
          Return the TagGroup objects defined by the search criteria.
 AdminTagGroup[] getTagGroupsPerCategory(int categoryId, int languageId)
          Return an array of AdminTagGroup objects for a category.
 AdminTagGroupToTag[] getTagGroupToTags(java.lang.String sessionId, AdminSearch search, int offset, int size)
          Return the TagGroupToTag objects defined by the search criteria.
 AdminTagSearchResult getTags(java.lang.String sessionId, AdminSearch search, int offset, int size)
          Return the Tag objects defined by the search criteria.
 AdminTag[] getTagsPerProduct(int productId, int languageId)
          Fetches all of the tags for a product.
 int insertTag(java.lang.String sessionId, AdminTag tag)
          Insert a new Tag object.
 int insertTagGroup(java.lang.String sessionId, AdminTagGroup tagGroup)
          Insert a new TagGroup object.
 int insertTagGroups(java.lang.String sessionId, AdminTagGroup[] tagGroups)
          Insert an array of TagGroup objects - provide a TagGroup object for each language
 void insertTagGroupToTags(AdminTagGroupToTag tagGroupToTag)
          Insert an AdminTagGroupToTag record
 int insertTags(java.lang.String sessionId, AdminTag[] tags)
          Insert an array of Tag objects - provide a Tag record for each supported language.
 void refreshConfigs()
          Refresh the configuration of the Manager
 void removeTagGroupsFromCategory(AdminTagGroup[] tagGroups, int categoryId)
          If associations exist between the tagGroupss and the category identified by categoryId, then they are removed.
 void removeTagsFromProduct(AdminTag[] tags, int productId)
          If associations exist between the tags and the product identified by productId, then they are removed.
 int updateTag(java.lang.String sessionId, AdminTag tag)
          Update an existing Tag object - only the Name, the SortOrder and associated TagGroups (if present) can be updated.
 int updateTagGroup(java.lang.String sessionId, AdminTagGroup tagGroup)
          Update an existing TagGroup object - You can update the name, description and the set of tags associated to the tag group if the tags attribute is non-null.
 

Method Detail

getTags

AdminTagSearchResult getTags(java.lang.String sessionId,
                             AdminSearch search,
                             int offset,
                             int size)
                             throws KKAdminException
Return the Tag objects defined by the search criteria. If the includeChildren attribute on the AdminSearch is true we also populate the TagGroup children on the Tag objects.

Parameters:
sessionId - session Id of logged in Admin user
search - the generic Admin search object that defines the tag objects to search for. If null we use the default AdminSearch object. If null we use the default AdminSearch object. If you specify the LanguageId in the search object, only the tag for that specified language will be returned. If you specify AdminLanguage.ALL_LANGUAGES for the languageId the search will be made on the default language, and if tags are found, tags with these tagIds for all of the languages are returned.
offset - starting offset in database - so that you can page through results
size - size of the group that will be returned - the maximum number of records returned
Returns:
an AdminTagSearchResult object
Throws:
KKAdminException

getTagGroups

AdminTagGroupSearchResult getTagGroups(java.lang.String sessionId,
                                       AdminSearch search,
                                       int offset,
                                       int size)
                                       throws KKAdminException
Return the TagGroup objects defined by the search criteria. If the includeChildren attribute on the AdminSearch is true we also populate the Tag children on the TagGroup objects.

Parameters:
sessionId - session Id of logged in Admin user
search - the generic Admin search object that defines the tag group objects to search for
offset - starting offset in database - so that you can page through results
size - size of the group that will be returned - the maximum number of records returned
Returns:
an AdminTagSearchResult object
Throws:
KKAdminException

getTagGroupToTags

AdminTagGroupToTag[] getTagGroupToTags(java.lang.String sessionId,
                                       AdminSearch search,
                                       int offset,
                                       int size)
                                       throws KKAdminException
Return the TagGroupToTag objects defined by the search criteria.

Parameters:
sessionId - session Id of logged in Admin user
search - the generic Admin search object that defines the tag objects to search for. If null we use the default AdminSearch object. If id is not -1 this is used to define the tag Group Id. If id2 is not -1 this is used to define the tag Id.
offset - starting offset in database - so that you can page through results
size - size of the group that will be returned - the maximum number of records returned
Returns:
an array of AdminTagGroupToTag records
Throws:
KKAdminException

insertTags

int insertTags(java.lang.String sessionId,
               AdminTag[] tags)
               throws java.lang.Exception
Insert an array of Tag objects - provide a Tag record for each supported language.

Parameters:
sessionId - session Id of logged in Admin user
tags - the array of AdminTag objects to insert - do not fill out the Id on these as this will be created. It is assumed that all of these tags will have the same ID, and there will be one for each language.
Returns:
the id of the AdminTag object created
Throws:
java.lang.Exception

insertTag

int insertTag(java.lang.String sessionId,
              AdminTag tag)
              throws java.lang.Exception
Insert a new Tag object. If associated TagGroups are included in the tag object (i.e. not null and at least one of them) these are also added to the kk_tag_group_to_tag table.

Parameters:
sessionId - session Id of logged in Admin user
tag - the new AdminTag object to insert - do not fill out the Id as this will be created. If the tag specifies -1 (KonakartAdminConstants.DEFAULT_LANGUAGE_ID) for the languageId, we set the id of the default language before inserting)
Returns:
the id of the AdminTag object created
Throws:
java.lang.Exception

insertTagGroups

int insertTagGroups(java.lang.String sessionId,
                    AdminTagGroup[] tagGroups)
                    throws KKAdminException
Insert an array of TagGroup objects - provide a TagGroup object for each language

Parameters:
sessionId - session Id of logged in Admin user
tagGroups - the new AdminTagGroup object to insert - do not fill out the Id on these as this will be created. It is assumed that all of these tagGroups will have the same ID, and there will be one for each language.
Returns:
the id of the AdminTagGroup object created
Throws:
KKAdminException

insertTagGroup

int insertTagGroup(java.lang.String sessionId,
                   AdminTagGroup tagGroup)
                   throws KKAdminException
Insert a new TagGroup object. If associated Tags are included in the tagGroup object (i.e. not null and at least one of them) these are also added to the kk_tag_group_to_tag table.

Parameters:
sessionId - session Id of logged in Admin user
tagGroup - the new AdminTagGroup object to insert - do not fill out the Id as this will be created. If the tag group specifies -1 (KonakartAdminConstants.DEFAULT_LANGUAGE_ID) for the languageId, we set the id of the default language before inserting)
Returns:
the id of the AdminTagGroup object created
Throws:
KKAdminException

insertTagGroupToTags

void insertTagGroupToTags(AdminTagGroupToTag tagGroupToTag)
                          throws KKAdminException
Insert an AdminTagGroupToTag record

Parameters:
tagGroupToTag -
Throws:
KKAdminException

updateTag

int updateTag(java.lang.String sessionId,
              AdminTag tag)
              throws KKAdminException
Update an existing Tag object - only the Name, the SortOrder and associated TagGroups (if present) can be updated. If the associated TagGroups attribute is null, no changes are made to the kk_tag_group_to_tag table otherwise these are updated to match the state of the input object).

Parameters:
sessionId - session Id of logged in Admin user
tag - the AdminTag object to update
Returns:
the id of the AdminTagGroup object updated
Throws:
KKAdminException

updateTagGroup

int updateTagGroup(java.lang.String sessionId,
                   AdminTagGroup tagGroup)
                   throws KKAdminException
Update an existing TagGroup object - You can update the name, description and the set of tags associated to the tag group if the tags attribute is non-null.

Parameters:
sessionId - session Id of logged in Admin user
tagGroup - the AdminTagGroup object to update
Returns:
the id of the AdminTagGroup object updated
Throws:
KKAdminException

deleteTag

void deleteTag(java.lang.String sessionId,
               int id)
               throws KKAdminException
Delete a Tag from the database. This will also remove this tag from all Tag Groups that it was in.

Parameters:
sessionId - session Id of logged in Admin user
id - the id of the AdminTag to delete
Throws:
KKAdminException

deleteTagGroup

void deleteTagGroup(java.lang.String sessionId,
                    int id)
                    throws KKAdminException
Delete a TagGroup from the database.

Parameters:
sessionId - session Id of logged in Admin user
id - the id of the AdminTagGroup to delete
Throws:
KKAdminException

getTagGroupsPerCategory

AdminTagGroup[] getTagGroupsPerCategory(int categoryId,
                                        int languageId)
                                        throws java.lang.Exception
Return an array of AdminTagGroup objects for a category. Each TagGroup is populated with an array of AdminTags which are sorted first by sort order and then by name. An empty array is returned if no TagGroup objects exist.

Parameters:
categoryId -
languageId -
Returns:
Returns an array of AdminTag groups
Throws:
java.lang.Exception

addTagGroupsToCategory

void addTagGroupsToCategory(AdminTagGroup[] tagGroups,
                            int categoryId)
                            throws org.apache.torque.TorqueException,
                                   com.workingdogs.village.DataSetException,
                                   KKAdminException
Add the array of tagGroups to the category identified by categoryId. We assume that the category and the tag groups already exist in the database since this method inserts an association between a tag groups and a category rather than the actual objects.

Parameters:
tagGroups -
categoryId -
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

addCategoriesToTagGroups

void addCategoriesToTagGroups(int tagGroupId,
                              int[] categories)
                              throws org.apache.torque.TorqueException,
                                     KKAdminException
Add the array of categories to the tagGroup specified. It is assumed that the categories and the tag group already exist in the database since this method inserts associations between a tag group and the specified categories rather than the actual objects.

Parameters:
tagGroupId - the tag group Id to link to the categories
categories - an array of category Ids to link to the Tag Group
Throws:
org.apache.torque.TorqueException
KKAdminException

removeTagGroupsFromCategory

void removeTagGroupsFromCategory(AdminTagGroup[] tagGroups,
                                 int categoryId)
                                 throws org.apache.torque.TorqueException,
                                        KKAdminException
If associations exist between the tagGroupss and the category identified by categoryId, then they are removed. If tagGroups is set to null, all associations to the category are removed.

Parameters:
tagGroups -
categoryId -
Throws:
org.apache.torque.TorqueException
KKAdminException

getTagsPerProduct

AdminTag[] getTagsPerProduct(int productId,
                             int languageId)
                             throws java.lang.Exception
Fetches all of the tags for a product.

Parameters:
productId -
languageId -
Returns:
Returns an array of Admin Tag objects
Throws:
java.lang.Exception

addTagsToProduct

void addTagsToProduct(AdminTag[] tags,
                      int productId)
                      throws org.apache.torque.TorqueException,
                             KKAdminException
Add the array of tags to the product identified by productId. We assume that the product and the tags already exist in the database since this method inserts an association between a tag and a product rather than the actual objects.

Parameters:
tags -
productId -
Throws:
org.apache.torque.TorqueException
KKAdminException

removeTagsFromProduct

void removeTagsFromProduct(AdminTag[] tags,
                           int productId)
                           throws org.apache.torque.TorqueException,
                                  KKAdminException
If associations exist between the tags and the product identified by productId, then they are removed. If tags is set to null, all associations to the product are removed.

Parameters:
tags -
productId -
Throws:
org.apache.torque.TorqueException
KKAdminException

refreshConfigs

void refreshConfigs()
                    throws java.lang.Exception
Refresh the configuration of the Manager

Throws:
java.lang.Exception


Copyright © 2011 DS Data Systems UK Ltd.