Tutorials > Content management > Create a content-managed resource > Integrate the new resource
Create the UpdateExtendedCatalogDescCmd interface
Create the interface for updating the extended catalog description 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 UpdateExtendedCatalogDescCmd.
- Click the Add button next to the Extended Interface box.
- In the Extended Interfaces Selection window, type TaskCommand into the Choose interfaces field.
- 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 = UpdateExtendedCatalogDescCmdImpl.class.getName();
- Create a constant to store the class name.
public static final String CLASSNAME = UpdateExtendedCatalogDescCmd.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(); public void setCatalogId(Long catalogId); public void setLanguageId(Integer languageId);
- 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();
- 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
- Save and close the file.