01: package olstore.session.helper;
02:
03: import olstore.dto.ItemValue;
04:
05: public interface ItemHelper {
06: /**
07: * A convenience method to help create new items. The fields {@param name}, {@param name}, {@param shortDescr}, {@param type} are mandatory.
08: */
09: public olstore.entity.ItemLocal createItem(java.lang.String name,
10: java.lang.String price, java.lang.String shortDesc,
11: java.lang.String longDesc, java.lang.String type)
12: throws javax.naming.NamingException,
13: javax.ejb.CreateException;
14:
15: /**
16: * This method returns the first picture with priority 0. Will return a random picture if there is none with prioriy 0
17: */
18: public olstore.entity.PictureLocal getPicture(
19: olstore.entity.ItemLocal item);
20:
21: public olstore.dto.PictureValue getPicture(java.lang.String itemId)
22: throws java.lang.Exception;
23:
24: /**
25: * This method will return an array of PropertyValues that indicate the default properties associated with the specified type
26: */
27: public java.util.Vector getPropertiesForType(java.lang.String type)
28: throws java.lang.Exception;
29:
30: public olstore.dto.ItemValue getItemValueForId(
31: java.lang.String itemId) throws java.lang.Exception;
32:
33: public void saveItem(olstore.dto.ItemValue itemVal)
34: throws java.lang.Exception;
35:
36: public void markItemAsInteresting(java.lang.String itemId,
37: java.lang.String username) throws java.lang.Exception;
38:
39: public ItemValue convertToDTO(olstore.entity.ItemLocal item)
40: throws Exception;
41:
42: }
|