KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > shares > AppsShareService


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
// AppsShareService
14
//
15
// NK 31.04.2001
16
//
17
package org.jahia.services.shares;
18
19 import org.jahia.data.JahiaDOMObject;
20 import org.jahia.data.applications.ApplicationBean;
21 import org.jahia.exceptions.JahiaException;
22 import org.jahia.services.JahiaService;
23 import org.jahia.services.sites.JahiaSite;
24
25 import java.util.Enumeration JavaDoc;
26
27
28 /**
29  * Application Share Service
30  *
31  * @author Khue ng
32  */

33 public abstract class AppsShareService extends JahiaService {
34
35
36     /**
37      * return an enumeration of sites' key having access to a gived app
38      *
39      * @param ApplicationBean, the app
40      *
41      * @return Enumeration, an enumeration of sites' keys
42      */

43     public abstract Enumeration JavaDoc getSites (ApplicationBean app) throws JahiaException;
44
45
46     /**
47      * add a share between a site and an application
48      *
49      * @param JahiaSite, the site
50      * @param ApplicationBean, the app
51      */

52     public abstract void addShare (JahiaSite site, ApplicationBean app) throws JahiaException;
53
54     /**
55      * remove a share between a site and an application
56      *
57      * @param JahiaSite, the site
58      * @param ApplicationBean, the app
59      */

60     public abstract void removeShare (JahiaSite site, ApplicationBean app)
61             throws JahiaException;
62
63     /**
64      * remove all share referencing a site
65      *
66      * @param JahiaSite, the site
67      */

68     public abstract void removeShares (JahiaSite site) throws JahiaException;
69
70     /**
71      * remove all share referencing an app
72      *
73      * @param ApplicationBean, the app
74      */

75     public abstract void removeShares (ApplicationBean app) throws JahiaException;
76
77
78     //--------------------------------------------------------------------------
79
/**
80      * Return a share between a site and an application
81      *
82      * @param JahiaSite, the site
83      * @param ApplicationBean, the app
84      */

85     public abstract AppShare getShare (JahiaSite site, ApplicationBean app)
86             throws JahiaException;
87
88
89     //--------------------------------------------------------------------------
90
/**
91      * return a DOM document of application shares content
92      *
93      * @param int the site id
94      *
95      * @return JahiaDOMObject a DOM representation of this object
96      *
97      * @author NK
98      */

99     public abstract JahiaDOMObject getApplicationSharesAsDOM (int siteID)
100             throws JahiaException;
101
102
103 }
104
105
Popular Tags