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

< Previous | Next >


Create the UpdateExtendedCatalogDescCmd interface

Create the interface for updating the extended catalog description 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 UpdateExtendedCatalogDescCmd.

  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.

  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:

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

  10. Create a constant to store the class name.

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

  11. 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();
    public void setCatalogId(Long catalogId);
    public void setLanguageId(Integer languageId);
    

  12. 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();
    

  13. Press CTRL+SHIFT+O to organize imports and resolve any errors. Ensure the following classes are selected if prompted for a selection:

    • com.ibm.commerce.command.TaskCommand

  14. Save and close the file.

< Previous | Next >


+

Search Tips   |   Advanced Search