KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > usermanager > JahiaSiteGroupManagerService


1 //
2
// ____.
3
// __/\ ______| |__/\. _______
4
// __ .____| | \ | +----+ \
5
// _______| /--| | | - \ _ | : - \_________
6
// \\______: :---| : : | : | \________>
7
// |__\---\_____________:______: :____|____:_____\
8
// /_____|
9
//
10
// . . . i n j a h i a w e t r u s t . . .
11
//
12
//
13
//
14
package org.jahia.services.usermanager;
15
16 import org.jahia.data.JahiaDOMObject;
17 import org.jahia.exceptions.JahiaException;
18 import org.jahia.services.JahiaService;
19
20 import java.util.Hashtable JavaDoc;
21
22
23 /**
24  * Manage groups memberhip in a multi site context.
25  * Doesn't delete or create a group or user, only handle the association
26  * between users, groups and sites
27  *
28  * @author Khue Ng
29  */

30 public abstract class JahiaSiteGroupManagerService extends JahiaService {
31
32
33     //-------------------------------------------------------------------------
34
/**
35      * Create a new membership for a group on a gived site
36      *
37      * @param int siteID, the site identifier
38      * @param JahiaGroup group, the group to add to a site
39      *
40      * @author NK
41      */

42     public abstract boolean addGroup (int siteID, JahiaGroup grp) throws JahiaException;
43
44
45     //-------------------------------------------------------------------------
46
/**
47      * Remove a group from a site, doesn't delete the group
48      *
49      * @param int siteID, the site identifier
50      * @param JahiaGroup grp reference on the group to be removed from the site.
51      *
52      * @author NK
53      */

54     public abstract boolean removeGroup (int siteID, JahiaGroup grp) throws JahiaException;
55
56
57     //-------------------------------------------------------------------------
58
/**
59      * Remove a group membership from all sites
60      *
61      * @param JahiaGroup grp, the group to be removed from all sites.
62      *
63      * @author Khue Ng
64      */

65     public abstract boolean removeGroup (JahiaGroup grp) throws JahiaException;
66
67
68     //-------------------------------------------------------------------------
69
/**
70      * Remove all groups of a site ( only the membership, not the groups )
71      *
72      * @param int siteID, the identifier of the site.
73      *
74      * @author Khue Ng
75      */

76     public abstract boolean removeGroups (int siteID) throws JahiaException;
77
78
79     //-------------------------------------------------------------------------
80
/**
81      * This method returns an hashtable of groupname/grp_id couples of members of the requested site
82      *
83      * @param int siteID, the site identifier
84      *
85      * @return Return an Hashtable of groupname/grp_id couples members of this site.
86      *
87      * @author Khue Ng
88      */

89     public abstract Hashtable JavaDoc getGroups (int siteID) throws JahiaException;
90
91
92     //--------------------------------------------------------------------------
93
/**
94      * return a DOM document of all groups membership of a site
95      *
96      * @param int the site id
97      *
98      * @return JahiaDOMObject a DOM representation of this object
99      *
100      * @author NK
101      */

102     public abstract JahiaDOMObject getGroupMembershipsAsDOM (int siteID)
103             throws JahiaException;
104
105
106     //--------------------------------------------------------------------------
107
/**
108      * return a DOM document of external groups ( from other sites )
109      * that have membership access on this site
110      *
111      * @param int the site id
112      *
113      * @return JahiaDOMObject a DOM representation of this object
114      *
115      * @author NK
116      */

117     public abstract JahiaDOMObject getAuthExternalGroupsAsDOM (int siteID)
118             throws JahiaException;
119
120
121 }
122
Popular Tags