public class AdminTagMgr extends AdminBaseMgr implements AdminTagMgrIf
AdminBaseMgr.StaticData
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log
the log
|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminTagMgr(KKAdminIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addCategoriesToTagGroups(int tagGroupId,
int[] categories)
Add the array of categories to the tagGroup specified.
|
protected void |
addTagGroupOrderBy(com.konakart.db.KKCriteria c,
AdminSearch search) |
protected int |
addTagGroupSearchCriteria(com.konakart.db.KKCriteria c,
AdminSearch search,
boolean getAllLanguages) |
void |
addTagGroupsToCategory(AdminTagGroup[] tagGroups,
int categoryId)
Add the array of tagGroups to the category identified by categoryId.
|
protected void |
addTagGroupToTagOrderBy(com.konakart.db.KKCriteria c,
AdminSearch search) |
protected int |
addTagGroupToTagSearchCriteria(com.konakart.db.KKCriteria c,
AdminSearch search) |
protected void |
addTagOrderBy(com.konakart.db.KKCriteria c,
AdminSearch search) |
protected int |
addTagSearchCriteria(com.konakart.db.KKCriteria c,
AdminSearch search) |
void |
addTagsToProduct(AdminTag[] tags,
int productId)
Add the array of tags to the product identified by productId.
|
void |
deleteSingleTag(int id,
int languageId)
Delete a single Tag from the database with this Id and languageId.
|
void |
deleteSingleTagGroup(int id,
int languageId)
Delete a single TagGroup from the database.
|
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.
|
protected boolean |
doesTagExist(int id)
Return true if the tag exists.
|
protected boolean |
doesTagExist(int id,
int langId)
Return true if the tag exists.
|
protected boolean |
doesTagGroupExist(int id)
Return true if the tagGroup exists.
|
protected boolean |
doesTagGroupExist(int id,
int langId)
Return true if the tagGroup exists.
|
AdminTagGroupSearchResult |
getTagGroups(java.lang.String sessionId,
AdminSearch search,
int offset,
int size)
Return the TagGroup objects defined by the search criteria.
|
int |
getTagGroupsCount(AdminSearch search,
boolean getAllLanguages,
int defaultLanguageId)
Returns a count of the number of Tag Groups
|
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.
|
int |
getTagsCount(AdminSearch search)
Returns a count of the number of Tags
|
AdminTag[] |
getTagsPerProduct(int productId,
int languageId)
Fetches all of the tags for a product.
|
protected AdminTag[] |
getTagsPerTagGroup(int tagGroupId,
int languageId)
Fetches all of the tags for a tag group
|
int |
insertTag(AdminTag tag)
Insert a new Tag object.
|
int |
insertTag(java.lang.String sessionId,
AdminTag tag)
Insert a new Tag object.
|
int |
insertTagGroup(AdminTagGroup tagGroup)
Insert a new TagGroup 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
|
protected void |
insertTagGroupToTagRecords(AdminTag tag,
java.sql.Connection con) |
protected void |
insertTagGroupToTagRecords(AdminTagGroup tagGroup,
java.sql.Connection con) |
protected void |
insertTagGroupToTagRecords(AdminTagGroupToTag tagGroupToTag,
java.sql.Connection con)
Insert an AdminTagGroupToTag record
|
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 tagGroups 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.
|
protected void |
setTagCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c,
int languageId)
Set the Criteria attribute with standard attributes for a Tag object
|
protected void |
setTagGroupCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c,
int languageId)
Set the Criteria attribute with standard attributes for a TagGroup object
|
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.
|
addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkAPICallEnabled, checkIntInRange, checkIntIsSet, checkRequired, executeQuery, executeQuery, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminContentMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustPwdHistMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminEngineCacheMgr, getAdminEventMgr, getAdminExecuteMgr, getAdminFileMgr, getAdminFilterMgr, getAdminHtmlMgr, getAdminImportMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminMiscPriceMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminServletMgr, getAdminShipmentMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminSuggestionMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getDebugStackTraceExclusions, getEmailThreadGracefulShutdownTimeout, getExportMgr, getExportMgr, getExportXMLData, getIntFromString, getKkAdminPropsFilePath, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getNewCriteria, getNewCriteria, getOtherModuleByName, getPostSearchText, getPreSearchText, getProductsToCategoresCriteria, getPropertyValue, getPropertyValue, getPropertyValueAsBool, getPropertyValueAsInt, getPropertyValueAsLong, getRecordCount, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isCommunity, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, isUnix, isWindows, manageException, manageThrowable, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNow
public AdminTagMgr(KKAdminIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic AdminTagSearchResult getTags(java.lang.String sessionId, AdminSearch search, int offset, int size) throws KKAdminException
getTags
in interface AdminTagMgrIf
sessionId
- session Id of logged in Admin usersearch
- the generic Admin search object that defines the tag objects to search for. 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 resultssize
- size of the group that will be returned - the maximum number of records returnedKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected int addTagSearchCriteria(com.konakart.db.KKCriteria c, AdminSearch search) throws java.lang.Exception
java.lang.Exception
protected void addTagOrderBy(com.konakart.db.KKCriteria c, AdminSearch search)
public int getTagsCount(AdminSearch search) throws java.lang.Exception
search
- Search criteriajava.lang.Exception
- an unexpected exceptionpublic int getTagGroupsCount(AdminSearch search, boolean getAllLanguages, int defaultLanguageId) throws java.lang.Exception
search
- Search criteriagetAllLanguages
- true to get all languagesdefaultLanguageId
- default languageIdjava.lang.Exception
- an unexpected exceptionpublic AdminTagGroupSearchResult getTagGroups(java.lang.String sessionId, AdminSearch search, int offset, int size) throws KKAdminException
getTagGroups
in interface AdminTagMgrIf
sessionId
- session Id of logged in Admin usersearch
- the generic Admin search object that defines the tag group objects to search foroffset
- starting offset in database - so that you can page through resultssize
- size of the group that will be returned - the maximum number of records returnedKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected int addTagGroupSearchCriteria(com.konakart.db.KKCriteria c, AdminSearch search, boolean getAllLanguages)
protected void addTagGroupOrderBy(com.konakart.db.KKCriteria c, AdminSearch search)
public int insertTags(java.lang.String sessionId, AdminTag[] tags) throws java.lang.Exception
insertTags
in interface AdminTagMgrIf
sessionId
- session Id of logged in Admin usertags
- 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.java.lang.Exception
- an unexpected exceptionpublic int insertTag(AdminTag tag) throws java.lang.Exception
insertTag
in interface AdminTagMgrIf
tag
- the new AdminTag object to insert - do not fill out the Id (unless inserting a tag
for a new language) 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)java.lang.Exception
- an unexpected exceptionpublic int insertTag(java.lang.String sessionId, AdminTag tag) throws java.lang.Exception
insertTag
in interface AdminTagMgrIf
sessionId
- session Id of logged in Admin usertag
- the new AdminTag object to insert - do not fill out the Id (unless inserting a tag
for a new language) 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)java.lang.Exception
- an unexpected exceptionprotected void insertTagGroupToTagRecords(AdminTag tag, java.sql.Connection con) throws java.lang.RuntimeException, org.apache.torque.TorqueException, KKAdminException
java.lang.RuntimeException
org.apache.torque.TorqueException
KKAdminException
public int insertTagGroups(java.lang.String sessionId, AdminTagGroup[] tagGroups) throws KKAdminException
insertTagGroups
in interface AdminTagMgrIf
sessionId
- session Id of logged in Admin usertagGroups
- 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.KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int insertTagGroup(AdminTagGroup tagGroup) throws KKAdminException
insertTagGroup
in interface AdminTagMgrIf
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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int insertTagGroup(java.lang.String sessionId, AdminTagGroup tagGroup) throws KKAdminException
insertTagGroup
in interface AdminTagMgrIf
sessionId
- session Id of logged in Admin usertagGroup
- 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)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void insertTagGroupToTagRecords(AdminTagGroup tagGroup, java.sql.Connection con) throws java.lang.RuntimeException, org.apache.torque.TorqueException, KKAdminException
java.lang.RuntimeException
org.apache.torque.TorqueException
KKAdminException
public void insertTagGroupToTags(AdminTagGroupToTag tagGroupToTag) throws KKAdminException
insertTagGroupToTags
in interface AdminTagMgrIf
tagGroupToTag
- the tagGroupToTagKKAdminException
- unexpected exception in the KonaKart Admin Enginejava.lang.RuntimeException
- an unexpected RuntimeException exceptionprotected void insertTagGroupToTagRecords(AdminTagGroupToTag tagGroupToTag, java.sql.Connection con) throws java.lang.RuntimeException, org.apache.torque.TorqueException, KKAdminException, java.sql.SQLException
tagGroupToTag
- the tagGroupToTagcon
- db connection - if new, a new one is createdjava.lang.RuntimeException
- an unexpected RuntimeException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginejava.sql.SQLException
- an unexpected SQLException exceptionpublic int updateTag(java.lang.String sessionId, AdminTag tag) throws KKAdminException
updateTag
in interface AdminTagMgrIf
sessionId
- session Id of logged in Admin usertag
- the AdminTag object to updateKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int updateTagGroup(java.lang.String sessionId, AdminTagGroup tagGroup) throws KKAdminException
updateTagGroup
in interface AdminTagMgrIf
sessionId
- session Id of logged in Admin usertagGroup
- the AdminTagGroup object to updateKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void deleteTag(java.lang.String sessionId, int id) throws KKAdminException
deleteTag
in interface AdminTagMgrIf
sessionId
- session Id of logged in Admin userid
- the id of the AdminTag to deleteKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void deleteSingleTag(int id, int languageId) throws KKAdminException
deleteSingleTag
in interface AdminTagMgrIf
id
- the id of the AdminTag to deletelanguageId
- the languageId of the AdminTag to deleteKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected boolean doesTagExist(int id) throws org.apache.torque.TorqueException, KKAdminException
id
- tag idorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected boolean doesTagExist(int id, int langId) throws org.apache.torque.TorqueException, KKAdminException
id
- tag idlangId
- language idorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void deleteTagGroup(java.lang.String sessionId, int id) throws KKAdminException
deleteTagGroup
in interface AdminTagMgrIf
sessionId
- session Id of logged in Admin userid
- the id of the AdminTagGroup to deleteKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void deleteSingleTagGroup(int id, int languageId) throws KKAdminException
deleteSingleTagGroup
in interface AdminTagMgrIf
id
- the id of the AdminTagGroup to deletelanguageId
- the languageId of the AdminTagGroup to deleteKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected boolean doesTagGroupExist(int id) throws org.apache.torque.TorqueException, KKAdminException
id
- tagGroup idorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected boolean doesTagGroupExist(int id, int langId) throws org.apache.torque.TorqueException, KKAdminException
id
- tagGroup idlangId
- language idorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminTagGroup[] getTagGroupsPerCategory(int categoryId, int languageId) throws java.lang.Exception
getTagGroupsPerCategory
in interface AdminTagMgrIf
categoryId
- the categoryIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionprotected void setTagGroupCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c, int languageId)
c
- the clanguageId
- the languageIdprotected void setTagCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c, int languageId)
c
- the clanguageId
- the languageIdprotected AdminTag[] getTagsPerTagGroup(int tagGroupId, int languageId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, KKAdminException
tagGroupId
- the tagGroupIdlanguageId
- the languageIdcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void addTagGroupsToCategory(AdminTagGroup[] tagGroups, int categoryId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
addTagGroupsToCategory
in interface AdminTagMgrIf
tagGroups
- the tagGroupscategoryId
- the categoryIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void addCategoriesToTagGroups(int tagGroupId, int[] categories) throws org.apache.torque.TorqueException, KKAdminException
addCategoriesToTagGroups
in interface AdminTagMgrIf
tagGroupId
- the tag group Id to link to the categoriescategories
- an array of category Ids to link to the Tag Grouporg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void removeTagGroupsFromCategory(AdminTagGroup[] tagGroups, int categoryId) throws org.apache.torque.TorqueException, KKAdminException
removeTagGroupsFromCategory
in interface AdminTagMgrIf
tagGroups
- the tagGroupscategoryId
- the categoryIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminTag[] getTagsPerProduct(int productId, int languageId) throws java.lang.Exception
getTagsPerProduct
in interface AdminTagMgrIf
productId
- the productIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic void addTagsToProduct(AdminTag[] tags, int productId) throws org.apache.torque.TorqueException, KKAdminException
addTagsToProduct
in interface AdminTagMgrIf
tags
- the tagsproductId
- the productIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void removeTagsFromProduct(AdminTag[] tags, int productId) throws org.apache.torque.TorqueException, KKAdminException
removeTagsFromProduct
in interface AdminTagMgrIf
tags
- the tagsproductId
- the productIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface AdminTagMgrIf
refreshConfigs
in class AdminBaseMgr
java.lang.Exception
- an unexpected exceptionpublic AdminTagGroupToTag[] getTagGroupToTags(java.lang.String sessionId, AdminSearch search, int offset, int size) throws KKAdminException
getTagGroupToTags
in interface AdminTagMgrIf
sessionId
- session Id of logged in Admin usersearch
- 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 resultssize
- size of the group that will be returned - the maximum number of records returnedKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected int addTagGroupToTagSearchCriteria(com.konakart.db.KKCriteria c, AdminSearch search)
protected void addTagGroupToTagOrderBy(com.konakart.db.KKCriteria c, AdminSearch search)
Copyright © 2018 DS Data Systems UK Ltd.