Tutorials > Content management > Create a content-managed resource > Integrate the new resource

< Previous | Next >


Create the AddExtendedCatalogDescCmd interface

Create the interface for adding the extended catalog information in the database.


Procedure

  1. In the Enterprise Explorer view, navigate to Other Projects > WebSphereCommerceServerExtensionsLogic.

  2. Right-click src and select New > Interface.

  3. In the Package field, type com.mycompany.catalog.commands.

  4. In the Name field, type AddExtendedCatalogDescCmd.

  5. Click the Add button next to the Extended Interface box.

  6. In the Extended Interfaces Selection window, type TaskCommand into the Choose interfaces field and select com.ibm.commerce.command.TaskCommand.

  7. Click OK.

  8. Click Finish to create the interface.

  9. Set the default implementation class used by the interface by copying the following code:


  10. public static final String defaultCommandClassName = AddExtendedCatalogDescCmdImpl.class.getName();
    

  11. Create a constant to store the class name.

    public static final String CLASSNAME = AddExtendedCatalogDescCmd.class.getName();
    

  12. Create getter and setter methods for the two primary key columns of the EXTCATALOGDSC table - CATALOG_ID and LANGUAGE_ID.

    public Long getCatalogId();
    public Integer getLanguageId();
    

  13. Create setter and getter methods for the five other columns (excluding OPTCOUNTER) of the EXTCATALOGDSC table.

    public void setLastModified(java.sql.Timestamp atTimeStamp);
    public void setFrontImg(java.lang.String astrFrontImg);
    public void setBackImg(java.lang.String astrBackImg);
    public void setTopImg(java.lang.String astrTopImg);
    public void setSideImg(java.lang.String astrSideImg);
    public java.sql.Timestamp getLastModified();
    public java.lang.String getFrontImg();
    public java.lang.String getBackImg();
    public java.lang.String getTopImg();
    public java.lang.String getSideImg();
    public void setCatalogId(Long catalogId);
    public void setLanguageId(java.lang.Integer languageId);
    public void setCatalogCode(String catalogCode); 
    public String getCatalogCode(); 
    

  14. Save and close the file.

< Previous | Next >


+

Search Tips   |   Advanced Search