1 package org.argeo.people;
2
3 import java.awt.Image;
4
5 import javax.jcr.Node;
6
7 /**
8 * Provides method interfaces to manage contact concept in a people repository.
9 * Implementing applications should extend and/or override the canonical
10 * implementation in order to provide business specific behaviours.
11 *
12 * The correct instance of this interface is usually acquired through the
13 * peopleService.
14 * */
15 public interface ContactService {
16
17 /** Retrieves the valid possible contact types */
18 public String[] getKnownContactTypes();
19
20 /** Retrieves the valid possible contact type labels */
21 public String[] getKnownContactLabels();
22
23 /** Returns the list of possible contacts given an entity */
24 public String[] getContactTypeLabels(Node entity);
25
26 /**
27 * Returns the list of possible values given the other information we already
28 * have for this contact instance
29 */
30 public String[] getContactPossibleCategories(Node contact);
31
32 /**
33 * Returns the list of valid categories, depending on the contact type and contact
34 * nature before the creation of the contact
35 */
36 public String[] getContactCategories(String contactableType,
37 String contactType, boolean isPro);
38
39 /** Return corresponding icon given a contact instance */
40 public Image getContactIcon(Node contact);
41
42 }