|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.konakartadmin.bl.AdminBaseMgr
com.konakartadmin.bl.AdminProductAttrMgr
public class AdminProductAttrMgr
The AdminProductAttrMgr - for managing custom product attributes
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.konakartadmin.bl.AdminBaseMgr |
---|
AdminBaseMgr.StaticData |
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
the log |
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr |
---|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir |
Constructor Summary | |
---|---|
AdminProductAttrMgr(KKAdminIf eng)
Constructor |
Method Summary | |
---|---|
protected void |
addProdAttrDescOrderBy(com.konakart.bl.KKCriteria c,
AdminProdAttrDescSearch search)
Add order by constraints for AdminProdAttrDescs |
protected int |
addProdAttrDescSearchCriteria(com.konakart.bl.KKCriteria c,
AdminProdAttrDescSearch search)
Add search criteria for ProdAttrDescs |
void |
addProdAttrDescsToTemplate(AdminProdAttrDesc[] attrDescs,
int templateId)
Add the array of ProdAttrDesc objects to the template. |
protected void |
addProdAttrTemplateOrderBy(com.konakart.bl.KKCriteria c,
AdminProdAttrTemplateSearch search)
Add order by constraints for AdminProdAttrTemplates |
protected int |
addProdAttrTemplateSearchCriteria(com.konakart.bl.KKCriteria c,
AdminProdAttrTemplateSearch search)
Add search criteria for ProdAttrTemplates |
int |
deleteProdAttrDesc(int id)
Delete an AdminProdAttrDesc |
int |
deleteProdAttrTemplate(int id)
Delete an AdminProdAttrTemplate |
AdminProdAttrDesc[] |
getCustomAttrsFromXML(java.lang.String xml)
Create an array of custom attributes from the XML |
AdminProdAttrDesc |
getProdAttrDesc(int id)
Returns the AdminProdAttrDesc object for the id parameter, or Null if the
AdminProdAttrDesc doesn't exist in the DB. |
protected int |
getProdAttrDescCount(AdminProdAttrDescSearch search)
Returns a count of the number of ProdAttrDescs |
AdminProdAttrDescSearchResult |
getProdAttrDescs(AdminProdAttrDescSearch search,
int offset,
int size)
This returns an AdminProdAttrDescSearchResult object. |
AdminProdAttrDesc[] |
getProdAttrDescsForTemplate(int templateId)
This method fetches all of the AdminProdAttrDesc objects for the template referenced by the templateId parameter. |
AdminProdAttrTemplate |
getProdAttrTemplate(int id)
Returns the AdminProdAttrTemplate object for the id parameter, or Null if the
AdminProdAttrTemplate doesn't exist in the DB. |
protected int |
getProdAttrTemplateCount(AdminProdAttrTemplateSearch search)
Returns a count of the number of ProdAttrTemplates |
AdminProdAttrTemplateSearchResult |
getProdAttrTemplates(AdminProdAttrTemplateSearch search,
int offset,
int size)
This returns an AdminProdAttrTemplateSearchResult object. |
int |
getProductCountPerProdAttrDesc(int attrDescId)
Returns the number of products using the product attribute descriptor |
int |
getProductCountPerTemplate(int templateId)
Returns the number of products using the custom product attribute template |
int |
getTemplateCountPerProdAttrDesc(int attrDescId)
Returns the number of templates using the product attribute descriptor |
java.lang.String |
getXMLFromCustomAttrs(AdminProdAttrDesc[] attrDescArray)
Create an XML structure for the custom attributes |
int |
insertProdAttrDesc(AdminProdAttrDesc attrDesc)
An AdminProdAttrDesc object is inserted into the database. |
int |
insertProdAttrTemplate(AdminProdAttrTemplate template)
An AdminProdAttrTemplate object is inserted into the database. |
void |
removeProdAttrDescsFromTemplate(AdminProdAttrDesc[] attrDescs,
int templateId)
Remove an array of ProdAttrDesc objects from the template |
protected void |
setProdAttrDescCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c)
Common code to avoid duplication |
protected void |
setProdAttrTemplateCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c)
Common code to avoid duplication |
int |
updateProdAttrDesc(AdminProdAttrDesc attrDesc)
Update an AdminProdAttrDesc object. |
int |
updateProdAttrTemplate(AdminProdAttrTemplate template)
Update an AdminProdAttrTemplate object. |
int |
updateProductsUsingProdAttrDesc(int attrDescId)
Loop through all templates containing the custom attribute. |
int |
updateProductsUsingTemplates(int[] templateIds)
For each template, loop through the products and update the custom fields. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
Constructor Detail |
---|
public AdminProductAttrMgr(KKAdminIf eng) throws java.lang.Exception
eng
-
java.lang.Exception
Method Detail |
---|
public int insertProdAttrDesc(AdminProdAttrDesc attrDesc) throws KKAdminException, org.apache.torque.TorqueException
insertProdAttrDesc
in interface AdminProdAttrMgrIf
attrDesc
-
KKAdminException
org.apache.torque.TorqueException
public int updateProdAttrDesc(AdminProdAttrDesc attrDesc) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
updateProdAttrDesc
in interface AdminProdAttrMgrIf
attrDesc
- An AdminProdAttrDesc object
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public int deleteProdAttrDesc(int id) throws KKAdminException, org.apache.torque.TorqueException
deleteProdAttrDesc
in interface AdminProdAttrMgrIf
id
- The id of the deleted AdminProdAttrDesc object
KKAdminException
org.apache.torque.TorqueException
public AdminProdAttrDesc getProdAttrDesc(int id) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
id
parameter, or Null if the
AdminProdAttrDesc doesn't exist in the DB.
getProdAttrDesc
in interface AdminProdAttrMgrIf
id
-
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminProdAttrDesc[] getProdAttrDescsForTemplate(int templateId) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
templateId
parameter.
An empty array is returned if no AdminProdAttrDesc objects exist.
getProdAttrDescsForTemplate
in interface AdminProdAttrMgrIf
templateId
-
org.apache.torque.TorqueException
KKAdminException
com.workingdogs.village.DataSetException
public AdminProdAttrDescSearchResult getProdAttrDescs(AdminProdAttrDescSearch search, int offset, int size) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getProdAttrDescs
in interface AdminProdAttrMgrIf
search
- offset
- the offset in the dbsize
- the number of records from the specified offset
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException
protected void addProdAttrDescOrderBy(com.konakart.bl.KKCriteria c, AdminProdAttrDescSearch search)
c
- search
- protected int getProdAttrDescCount(AdminProdAttrDescSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
search
- Search criteria
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
protected int addProdAttrDescSearchCriteria(com.konakart.bl.KKCriteria c, AdminProdAttrDescSearch search)
c
- search
-
protected void setProdAttrDescCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c)
c
- public int insertProdAttrTemplate(AdminProdAttrTemplate template) throws KKAdminException, org.apache.torque.TorqueException
insertProdAttrTemplate
in interface AdminProdAttrMgrIf
template
-
KKAdminException
org.apache.torque.TorqueException
public int updateProdAttrTemplate(AdminProdAttrTemplate template) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
updateProdAttrTemplate
in interface AdminProdAttrMgrIf
template
- An AdminProdAttrTemplate object
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public int deleteProdAttrTemplate(int id) throws KKAdminException, org.apache.torque.TorqueException
deleteProdAttrTemplate
in interface AdminProdAttrMgrIf
id
- The id of the deleted AdminProdAttrTemplate object
KKAdminException
org.apache.torque.TorqueException
public AdminProdAttrTemplate getProdAttrTemplate(int id) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
id
parameter, or Null if the
AdminProdAttrTemplate doesn't exist in the DB. If the Template contains an array of
ProdAttrDesc objects, these are also fetched from the DB.
getProdAttrTemplate
in interface AdminProdAttrMgrIf
id
-
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminProdAttrTemplateSearchResult getProdAttrTemplates(AdminProdAttrTemplateSearch search, int offset, int size) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getProdAttrTemplates
in interface AdminProdAttrMgrIf
search
- offset
- the offset in the dbsize
- the number of records from the specified offset
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException
protected void addProdAttrTemplateOrderBy(com.konakart.bl.KKCriteria c, AdminProdAttrTemplateSearch search)
c
- search
- protected int getProdAttrTemplateCount(AdminProdAttrTemplateSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
search
- Search criteria
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
protected int addProdAttrTemplateSearchCriteria(com.konakart.bl.KKCriteria c, AdminProdAttrTemplateSearch search)
c
- search
-
protected void setProdAttrTemplateCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c)
c
- public void addProdAttrDescsToTemplate(AdminProdAttrDesc[] attrDescs, int templateId) throws org.apache.torque.TorqueException, KKAdminException
addProdAttrDescsToTemplate
in interface AdminProdAttrMgrIf
attrDescs
- templateId
-
org.apache.torque.TorqueException
KKAdminException
public void removeProdAttrDescsFromTemplate(AdminProdAttrDesc[] attrDescs, int templateId) throws org.apache.torque.TorqueException, KKAdminException
removeProdAttrDescsFromTemplate
in interface AdminProdAttrMgrIf
attrDescs
- templateId
-
org.apache.torque.TorqueException
KKAdminException
public int getTemplateCountPerProdAttrDesc(int attrDescId) throws com.workingdogs.village.DataSetException, KKAdminException, org.apache.torque.TorqueException
getTemplateCountPerProdAttrDesc
in interface AdminProdAttrMgrIf
attrDescId
-
com.workingdogs.village.DataSetException
KKAdminException
org.apache.torque.TorqueException
public int getProductCountPerProdAttrDesc(int attrDescId) throws com.workingdogs.village.DataSetException, KKAdminException, org.apache.torque.TorqueException
getProductCountPerProdAttrDesc
in interface AdminProdAttrMgrIf
attrDescId
-
com.workingdogs.village.DataSetException
KKAdminException
org.apache.torque.TorqueException
public int updateProductsUsingProdAttrDesc(int attrDescId) throws java.lang.Exception
updateProductsUsingProdAttrDesc
in interface AdminProdAttrMgrIf
attrDescId
-
java.lang.Exception
public int updateProductsUsingTemplates(int[] templateIds) throws java.lang.Exception
updateProductsUsingTemplates
in interface AdminProdAttrMgrIf
templateIds
-
java.lang.Exception
public int getProductCountPerTemplate(int templateId) throws com.workingdogs.village.DataSetException, KKAdminException, org.apache.torque.TorqueException
getProductCountPerTemplate
in interface AdminProdAttrMgrIf
templateId
-
com.workingdogs.village.DataSetException
KKAdminException
org.apache.torque.TorqueException
public java.lang.String getXMLFromCustomAttrs(AdminProdAttrDesc[] attrDescArray)
getXMLFromCustomAttrs
in interface AdminProdAttrMgrIf
attrDescArray
- Array of custom attributes
public AdminProdAttrDesc[] getCustomAttrsFromXML(java.lang.String xml)
getCustomAttrsFromXML
in interface AdminProdAttrMgrIf
xml
- The custom attribute data in xml format
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |