KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > columba > core > association > api > IAssociationStore


1 package org.columba.core.association.api;
2
3 import java.util.Collection JavaDoc;
4
5 public interface IAssociationStore {
6     
7     /**
8      * initialize the store
9      */

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 JavaDoc<String JavaDoc> getAssociatedItems(String JavaDoc serviceId, String JavaDoc metaDataId);
25     
26     /**
27      * remove an association for a given item, service and metadata
28      *
29      * @param serviceId metadata service
30      * @param metaDataId metadata entry in the given service
31      * @param itemId item id
32      */

33     void removeAssociation(String JavaDoc serviceId, String JavaDoc metaDataId, String JavaDoc itemId);
34     
35     /**
36      * add an association from an item to a metadata entry (from the metadata service "service")
37      *
38      * @param serviceId metadata service
39      * @param metaDataId metadata entry in the given service
40      * @param itemId item id
41      */

42     void addAssociation(String JavaDoc serviceId, String JavaDoc metaDataId, String JavaDoc itemId);
43     
44     /**
45      * retrieve list of all associations for an item
46      *
47      * @param itemId item id to get the associations for
48      * @return a colloection of all associations
49      */

50     Collection JavaDoc<IAssociation> getAllAssociations(String JavaDoc itemId);
51     
52     /**
53      * upper layers call this if their item is deleted
54      *
55      * @param itemId corresponding item id
56      */

57     void removeItem(String JavaDoc itemId);
58 }
59
Popular Tags