KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > applications > JahiaApplicationsDispatchingService


1 //
2
// JahiaApplicationsService
3
// EV 29.11.2000
4
//
5
// getAppOutput( fieldID, appID, params )
6
//
7

8 package org.jahia.services.applications;
9
10 import org.jahia.exceptions.JahiaException;
11 import org.jahia.exceptions.JahiaInitializationException;
12 import org.jahia.params.ParamBean;
13 import org.jahia.services.JahiaInitializableService;
14 import org.jahia.settings.SettingsBean;
15
16 import javax.servlet.http.HttpSession JavaDoc;
17
18 /**
19  * This service generates the dispatching and aggregation on an application.
20  * This functionality is central to the portal behavior of Jahia, allowing it
21  * to display multiple applications on a web page and interact with them
22  * simultaneously.
23  *
24  * @author Serge Huber
25  * @author Eric Vassalli
26  * @version 1.0
27  */

28 public abstract class JahiaApplicationsDispatchingService extends JahiaInitializableService {
29
30     public abstract void init (SettingsBean jSettings) throws JahiaInitializationException;
31
32     /**
33      * Dispatches processing to an application, and retrieves it's output for
34      * Jahia to aggregate
35      *
36      * @param fieldID identifier of Jahia's field
37      * @param appIDString application identifier passed as a String (converted
38      * from an integer)
39      * @param jParams Jahia's ParamBean object, containing the standard request /
40      * response pair, the servlet context, and additional information
41      *
42      * @throws JahiaException generated if there was a problem dispatching,
43      * during processing of the application, or when recuperating the application's
44      * output.
45      * @returns String containing the output of the application
46      */

47     public abstract String JavaDoc getAppOutput (int fieldID, String JavaDoc appIDStr, ParamBean jParams)
48             throws JahiaException;
49
50     /**
51      * Flushes all the application caches (output and request) for the session.
52      * Use this function instead of the two below ones because this one is MUCH
53      * faster if you have to do both.
54      *
55      * @param session the session in which to purge the caches
56      */

57     public abstract void flushAllSessionsCaches (HttpSession JavaDoc session);
58
59     /**
60      * Flushes the application output cache stored in the session.
61      *
62      * @param session the session in which to purge the caches
63      */

64     public abstract void flushSessionOutputCache (HttpSession JavaDoc session);
65
66     /**
67      * Flushes the application request cache stored in the session.
68      *
69      * @param session the session in which to purge the caches
70      */

71     public abstract void flushSessionRequestCache (HttpSession JavaDoc session);
72
73     /**
74      * Flushes the application request cache stored in the session.
75      *
76      * @param session the session in which to purge the caches
77      * @param appUniqueIDStr
78      */

79     public abstract void flushApplicationSessionRequestCache (HttpSession JavaDoc session,
80                                                               String JavaDoc appUniqueIDStr);
81
82     /**
83      * if session is null flush all output entries for the given appID
84      *
85      * @param session
86      * @param appUniqueIDStr
87      */

88     public abstract void flushOutputCacheByAppUniqueID (HttpSession JavaDoc session,
89                                                         String JavaDoc appUniqueIDStr);
90
91     public abstract void setApplicationSessionRequestCache (HttpSession JavaDoc session,
92                                                             PersistantServletRequest request);
93
94 } // end JahiaApplicationsService
95
Popular Tags