Tutorials > Content management > Create a content-managed resource > Integrate the new resource
Create the AddExtendedCatalogDescCmd interface
Create the interface for adding the extended catalog information in the database.
Procedure
- In the Enterprise Explorer view, navigate to Other Projects > WebSphereCommerceServerExtensionsLogic.
- Right-click src and select New > Interface.
- In the Package field, type com.mycompany.catalog.commands.
- In the Name field, type AddExtendedCatalogDescCmd.
- Click the Add button next to the Extended Interface box.
- In the Extended Interfaces Selection window, type TaskCommand into the Choose interfaces field and select com.ibm.commerce.command.TaskCommand.
- Click OK.
- Click Finish to create the interface.
- Set the default implementation class used by the interface by copying the following code:
public static final String defaultCommandClassName = AddExtendedCatalogDescCmdImpl.class.getName();
- Create a constant to store the class name.
public static final String CLASSNAME = AddExtendedCatalogDescCmd.class.getName();
- 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();
- 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();
- Save and close the file.