01: package org.columba.core.association.api;
02:
03: import java.util.Collection;
04:
05: public interface IAssociationStore {
06:
07: /**
08: * initialize the store
09: */
10: void init();
11:
12: /**
13: * shutdown the store
14: */
15: void shutdown();
16:
17: /**
18: * retrieve list of item ids for a given association
19: *
20: * @param serviceId metadata service
21: * @param metaDataId metadata entry for the given service
22: * @return list of item ids
23: */
24: Collection<String> getAssociatedItems(String serviceId,
25: String metaDataId);
26:
27: /**
28: * remove an association for a given item, service and metadata
29: *
30: * @param serviceId metadata service
31: * @param metaDataId metadata entry in the given service
32: * @param itemId item id
33: */
34: void removeAssociation(String serviceId, String metaDataId,
35: String itemId);
36:
37: /**
38: * add an association from an item to a metadata entry (from the metadata service "service")
39: *
40: * @param serviceId metadata service
41: * @param metaDataId metadata entry in the given service
42: * @param itemId item id
43: */
44: void addAssociation(String serviceId, String metaDataId,
45: String itemId);
46:
47: /**
48: * retrieve list of all associations for an item
49: *
50: * @param itemId item id to get the associations for
51: * @return a colloection of all associations
52: */
53: Collection<IAssociation> getAllAssociations(String itemId);
54:
55: /**
56: * upper layers call this if their item is deleted
57: *
58: * @param itemId corresponding item id
59: */
60: void removeItem(String itemId);
61: }
|