package olstore.session.helper;

import olstore.dto.ItemValue;

public interface ItemHelper {
    /**
     * A convenience method to help create new items. The fields {@param name}, {@param name}, {@param shortDescr}, {@param type} are mandatory.
     */
    public olstore.entity.ItemLocal createItem( java.lang.String name,java.lang.String price,java.lang.String shortDesc,java.lang.String longDesc,java.lang.String type ) throws javax.naming.NamingException, javax.ejb.CreateException;

    /**
     * This method returns the first picture with priority 0. Will return a random picture if there is none with prioriy 0
     */
    public olstore.entity.PictureLocal getPicture( olstore.entity.ItemLocal item ) ;

    public olstore.dto.PictureValue getPicture( java.lang.String itemId ) throws java.lang.Exception;

    /**
     * This method will return an array of PropertyValues that indicate the default properties associated with the specified type
     */
    public java.util.Vector getPropertiesForType( java.lang.String type ) throws java.lang.Exception;

    public olstore.dto.ItemValue getItemValueForId( java.lang.String itemId ) throws java.lang.Exception;

    public void saveItem( olstore.dto.ItemValue itemVal ) throws java.lang.Exception;

    public void markItemAsInteresting( java.lang.String itemId,java.lang.String username ) throws java.lang.Exception;
    
    public ItemValue convertToDTO( olstore.entity.ItemLocal item ) throws Exception;

}
