com.konakartadmin.blif
Interface AdminProdAttrMgrIf

All Known Implementing Classes:
AdminProductAttrMgr

public interface AdminProdAttrMgrIf

AdminCustomerTagMgrIf


Method Summary
 void addProdAttrDescsToTemplate(AdminProdAttrDesc[] attrDescs, int templateId)
          Add the array of ProdAttrDesc objects to the template.
 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.
 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.
 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
 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.
 

Method Detail

insertProdAttrDesc

int insertProdAttrDesc(AdminProdAttrDesc attrDesc)
                       throws KKAdminException,
                              org.apache.torque.TorqueException
An AdminProdAttrDesc object is inserted into the database. The following attributes are compulsory: The id of the new object is returned.

Parameters:
attrDesc -
Returns:
Returns the id of the ProdAttrDesc object
Throws:
KKAdminException
org.apache.torque.TorqueException

updateProdAttrDesc

int updateProdAttrDesc(AdminProdAttrDesc attrDesc)
                       throws KKAdminException,
                              org.apache.torque.TorqueException,
                              com.workingdogs.village.DataSetException
Update an AdminProdAttrDesc object. If the value of an attribute is null, the current value is not updated.

Parameters:
attrDesc - An AdminProdAttrDesc object
Returns:
returns the id of the updated AdminProdAttrDesc object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

deleteProdAttrDesc

int deleteProdAttrDesc(int id)
                       throws KKAdminException,
                              org.apache.torque.TorqueException
Delete an AdminProdAttrDesc

Parameters:
id - The id of the deleted AdminProdAttrDesc object
Returns:
Returns the id of the deleted AdminProdAttrDesc object
Throws:
KKAdminException
org.apache.torque.TorqueException

getProdAttrDesc

AdminProdAttrDesc getProdAttrDesc(int id)
                                  throws KKAdminException,
                                         org.apache.torque.TorqueException,
                                         com.workingdogs.village.DataSetException
Returns the AdminProdAttrDesc object for the id parameter, or Null if the AdminProdAttrDesc doesn't exist in the DB.

Parameters:
id -
Returns:
Returns a AdminProdAttrDesc object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getProdAttrDescsForTemplate

AdminProdAttrDesc[] getProdAttrDescsForTemplate(int templateId)
                                                throws org.apache.torque.TorqueException,
                                                       KKAdminException,
                                                       com.workingdogs.village.DataSetException
This method fetches all of the AdminProdAttrDesc objects for the template referenced by the templateId parameter.

An empty array is returned if no AdminProdAttrDesc objects exist.

Parameters:
templateId -
Returns:
Returns an array of AdminProdAttrDesc objects
Throws:
org.apache.torque.TorqueException
KKAdminException
com.workingdogs.village.DataSetException

getProdAttrDescs

AdminProdAttrDescSearchResult getProdAttrDescs(AdminProdAttrDescSearch search,
                                               int offset,
                                               int size)
                                               throws org.apache.torque.TorqueException,
                                                      com.workingdogs.village.DataSetException,
                                                      KKAdminException
This returns an AdminProdAttrDescSearchResult object.

Parameters:
search -
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminProdAttrDescSearchResult object
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException

insertProdAttrTemplate

int insertProdAttrTemplate(AdminProdAttrTemplate template)
                           throws KKAdminException,
                                  org.apache.torque.TorqueException
An AdminProdAttrTemplate object is inserted into the database. The following attributes are compulsory: The id of the new object is returned.

Parameters:
template -
Returns:
Returns the id of the ProdAttrTemplate object
Throws:
KKAdminException
org.apache.torque.TorqueException

updateProdAttrTemplate

int updateProdAttrTemplate(AdminProdAttrTemplate template)
                           throws KKAdminException,
                                  org.apache.torque.TorqueException,
                                  com.workingdogs.village.DataSetException
Update an AdminProdAttrTemplate object. If the value of an attribute is null, the current value is not updated.

Parameters:
template - An AdminProdAttrTemplate object
Returns:
returns the id of the updated AdminProdAttrTemplate object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

deleteProdAttrTemplate

int deleteProdAttrTemplate(int id)
                           throws KKAdminException,
                                  org.apache.torque.TorqueException
Delete an AdminProdAttrTemplate

Parameters:
id - The id of the deleted AdminProdAttrTemplate object
Returns:
Returns the id of the deleted AdminProdAttrTemplate object
Throws:
KKAdminException
org.apache.torque.TorqueException

getProdAttrTemplate

AdminProdAttrTemplate getProdAttrTemplate(int id)
                                          throws KKAdminException,
                                                 org.apache.torque.TorqueException,
                                                 com.workingdogs.village.DataSetException
Returns the AdminProdAttrTemplate object for the 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.

Parameters:
id -
Returns:
Returns a AdminProdAttrTemplate object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getProdAttrTemplates

AdminProdAttrTemplateSearchResult getProdAttrTemplates(AdminProdAttrTemplateSearch search,
                                                       int offset,
                                                       int size)
                                                       throws org.apache.torque.TorqueException,
                                                              com.workingdogs.village.DataSetException,
                                                              KKAdminException
This returns an AdminProdAttrTemplateSearchResult object.

Parameters:
search -
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminProdAttrTemplateSearchResult object
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException

addProdAttrDescsToTemplate

void addProdAttrDescsToTemplate(AdminProdAttrDesc[] attrDescs,
                                int templateId)
                                throws org.apache.torque.TorqueException,
                                       KKAdminException
Add the array of ProdAttrDesc objects to the template. We assume that the ProdAttrDesc objects have already been inserted.

Parameters:
attrDescs -
templateId -
Throws:
org.apache.torque.TorqueException
KKAdminException

removeProdAttrDescsFromTemplate

void removeProdAttrDescsFromTemplate(AdminProdAttrDesc[] attrDescs,
                                     int templateId)
                                     throws org.apache.torque.TorqueException,
                                            KKAdminException
Remove an array of ProdAttrDesc objects from the template

Parameters:
attrDescs -
templateId -
Throws:
org.apache.torque.TorqueException
KKAdminException

getTemplateCountPerProdAttrDesc

int getTemplateCountPerProdAttrDesc(int attrDescId)
                                    throws com.workingdogs.village.DataSetException,
                                           KKAdminException,
                                           org.apache.torque.TorqueException
Returns the number of templates using the product attribute descriptor

Parameters:
attrDescId -
Returns:
Return the number of templates using the product attribute descriptor
Throws:
com.workingdogs.village.DataSetException
KKAdminException
org.apache.torque.TorqueException

getProductCountPerProdAttrDesc

int getProductCountPerProdAttrDesc(int attrDescId)
                                   throws com.workingdogs.village.DataSetException,
                                          KKAdminException,
                                          org.apache.torque.TorqueException
Returns the number of products using the product attribute descriptor

Parameters:
attrDescId -
Returns:
Return the number of products using the product attribute descriptor
Throws:
com.workingdogs.village.DataSetException
KKAdminException
org.apache.torque.TorqueException

getProductCountPerTemplate

int getProductCountPerTemplate(int templateId)
                               throws com.workingdogs.village.DataSetException,
                                      KKAdminException,
                                      org.apache.torque.TorqueException
Returns the number of products using the custom product attribute template

Parameters:
templateId -
Returns:
Return the number of products using the custom product attribute template
Throws:
com.workingdogs.village.DataSetException
KKAdminException
org.apache.torque.TorqueException

getXMLFromCustomAttrs

java.lang.String getXMLFromCustomAttrs(AdminProdAttrDesc[] attrDescArray)
Create an XML structure for the custom attributes

Parameters:
attrDescArray - Array of custom attributes
Returns:
Returns an XML structure

getCustomAttrsFromXML

AdminProdAttrDesc[] getCustomAttrsFromXML(java.lang.String xml)
Create an array of custom attributes from the XML

Parameters:
xml - The custom attribute data in xml format
Returns:
Returns an array of AdminProdAttrDesc objects

updateProductsUsingProdAttrDesc

int updateProductsUsingProdAttrDesc(int attrDescId)
                                    throws java.lang.Exception
Loop through all templates containing the custom attribute. For each template, loop through the products and update the custom fields.

Parameters:
attrDescId -
Returns:
Returns the number of products updated
Throws:
java.lang.Exception

updateProductsUsingTemplates

int updateProductsUsingTemplates(int[] templateIds)
                                 throws java.lang.Exception
For each template, loop through the products and update the custom fields.

Parameters:
templateIds -
Returns:
Returns the number of products updated
Throws:
java.lang.Exception


Copyright © 2011 DS Data Systems UK Ltd.