KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > engines > JahiaEngine


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
// JahiaEngine Interface
15
// EV 19.11.2000
16
// AK 14.12.2000 kicked the renderButton method in the balls !
17
// EV 03.01.2001 all methods require now ParamBean, no JahiaData anymore
18
// AK 04.01.2001 add rendertype_include and rendertype_forward constants
19
//
20
// authoriseRender()
21
// renderLink()
22
// needsJahiaData()
23
// handleActions()
24
//
25

26 package org.jahia.engines;
27
28 import org.jahia.data.JahiaData;
29 import org.jahia.exceptions.JahiaException;
30 import org.jahia.params.ParamBean;
31
32
33 public interface JahiaEngine {
34
35     public static final String JavaDoc ENGINE_MODE_ATTRIBUTE = "JahiaEngine.mode";
36
37     public static final String JavaDoc CLOSE_JSP = "/jsp/jahia/engines/shared/close.jsp";
38     public static final String JavaDoc RELOAD_JSP = "/jsp/jahia/engines/shared/reload.jsp";
39     public static final String JavaDoc CANCEL_JSP = "/jsp/jahia/engines/shared/cancel.jsp";
40     public static final String JavaDoc NOT_EDITABLE_FIELD = "/jsp/jahia/engines/shared/not_editable_field.jsp";
41
42     public static final int LOAD_MODE = 1;
43     public static final int UPDATE_MODE = 2;
44     public static final int SAVE_MODE = 3;
45     public static final int DELETE_MODE = 4;
46     public static final int CANCEL_MODE = 5;
47     public static final int VALIDATE_MODE = 6;
48
49     public static final int RENDERTYPE_INCLUDE = 1;
50     public static final int RENDERTYPE_FORWARD = 2;
51     public static final int RENDERTYPE_REDIRECT = 3;
52     public static final int RENDERTYPE_NAMED_DISPATCHER = 4;
53
54
55     public static final String JavaDoc RENDER_TYPE_PARAM = "renderType";
56     public static final String JavaDoc ENGINE_NAME_PARAM = "engineName";
57     public static final String JavaDoc ENGINE_URL_PARAM = "engineUrl";
58     public static final String JavaDoc ENGINE_OUTPUT_FILE_PARAM = "engineOutputFile";
59     public static final String JavaDoc EMPTY_STRING = "";
60
61
62     /* the name of the attribute "language code being processing" stored in engine map */
63     public static final String JavaDoc PROCESSING_LANGUAGECODE = "processingLanguageCode";
64
65     /* the name of the attribute "engine validation helper" stored in engine map */
66     public static final String JavaDoc ENGINE_VALIDATION_HELPER
67         = "org.jahia.engines.JahiaEngine.engineValidationHelper";
68
69     public boolean authoriseRender (ParamBean jParams);
70
71     public String JavaDoc renderLink (ParamBean jParams, Object JavaDoc theObj)
72             throws JahiaException;
73
74     public boolean needsJahiaData (ParamBean jParams);
75
76     public void handleActions (ParamBean jParams, JahiaData jData)
77             throws JahiaException;
78
79     /**
80      * Retrieve the engine name.
81      *
82      * @return the engine name.
83      */

84     public String JavaDoc getName ();
85 }
86
Popular Tags