KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > admin > components > ManageComponents


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  * ----- BEGIN LICENSE BLOCK -----
15  * Version: JCSL 1.0
16  *
17  * The contents of this file are subject to the Jahia Community Source License
18  * 1.0 or later (the "License"); you may not use this file except in
19  * compliance with the License. You may obtain a copy of the License at
20  * http://www.jahia.org/license
21  *
22  * Software distributed under the License is distributed on an "AS IS" basis,
23  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
24  * for the rights, obligations and limitations governing use of the contents
25  * of the file. The Original and Upgraded Code is the Jahia CMS and Portal
26  * Server. The developer of the Original and Upgraded Code is JAHIA Ltd. JAHIA
27  * Ltd. owns the copyrights in the portions it created. All Rights Reserved.
28  *
29  * The Shared Modifications are Jahia View Helper.
30  *
31  * The Developer of the Shared Modifications is Jahia Solution S�rl.
32  * Portions created by the Initial Developer are Copyright (C) 2002 by the
33  * Initial Developer. All Rights Reserved.
34  *
35  * Contributor(s):
36  * 01-APR-2001, Xo3 SA, Alexandre Kraft
37  * 15-MAY-2001, Xo3 SA, Khue Nguyen
38  * 29-AUG-2003, Jahia Solutions Sarl, Fulco Houkes
39  *
40  * ----- END LICENSE BLOCK -----
41  */

42
43
44 package org.jahia.admin.components;
45
46 import org.jahia.bin.Jahia;
47 import org.jahia.bin.JahiaAdministration;
48 import org.jahia.data.JahiaData;
49 import org.jahia.data.applications.ApplicationBean;
50 import org.jahia.data.webapps.JahiaWebAppsPackage;
51 import org.jahia.exceptions.JahiaException;
52 import org.jahia.params.ParamBean;
53 import org.jahia.registries.ServicesRegistry;
54 import org.jahia.resourcebundle.JahiaResourceBundle;
55 import org.jahia.security.license.License;
56 import org.jahia.services.applications.JahiaApplicationsManagerService;
57 import org.jahia.services.jef.*;
58 import org.jahia.services.shares.AppsShareService;
59 import org.jahia.services.sites.JahiaSite;
60 import org.jahia.services.sites.JahiaSiteTools;
61 import org.jahia.services.sites.JahiaSitesService;
62 import org.jahia.services.usermanager.JahiaGroupManagerService;
63 import org.jahia.services.usermanager.JahiaUser;
64 import org.jahia.services.webapps_deployer.JahiaWebAppsDeployerService;
65 import org.jahia.utils.JahiaTools;
66
67 import javax.servlet.ServletException JavaDoc;
68 import javax.servlet.http.HttpServletRequest JavaDoc;
69 import javax.servlet.http.HttpServletResponse JavaDoc;
70 import javax.servlet.http.HttpSession JavaDoc;
71 import java.io.File JavaDoc;
72 import java.io.IOException JavaDoc;
73 import java.util.Enumeration JavaDoc;
74 import java.util.Hashtable JavaDoc;
75 import java.util.Vector JavaDoc;
76
77
78 /**
79  * desc: This class is used by the administration to manage
80  * all the components you've added to your Jahia portal. You can add a
81  * component, edit, change the visibility of the component and edit
82  * its options. You can also view non-installed components.
83  *
84  * Copyright: Copyright (c) 2002
85  * Company: Jahia Ltd
86  *
87  * @author Khue N'Guyen
88  * @author Alexandre Kraft
89  * @version 1.0
90  */

91 public class ManageComponents {
92
93     /** logging */
94     private static org.apache.log4j.Logger logger =
95             org.apache.log4j.Logger.getLogger (ManageComponents.class);
96
97     private static final String JavaDoc CLASS_NAME = JahiaAdministration.CLASS_NAME;
98     private static final String JavaDoc JSP_PATH = JahiaAdministration.JSP_PATH;
99
100     private JahiaSite site;
101     private JahiaUser user;
102     private ServicesRegistry sReg;
103
104     private License coreLicense;
105
106     /**
107      * Default constructor.
108      *
109      * @param request Servlet request.
110      * @param response Servlet response.
111      * @param session Servlet session for the current user.
112      */

113     public ManageComponents (HttpServletRequest JavaDoc request,
114                              HttpServletResponse JavaDoc response,
115                              HttpSession JavaDoc session)
116             throws Throwable JavaDoc {
117
118         JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
119         ParamBean jParams = null;
120         if (jData != null) {
121             jParams = jData.params ();
122         }
123         coreLicense = Jahia.getCoreLicense ();
124         if (coreLicense == null) {
125             // set request attributes...
126
String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.invalidLicense.label",
127                     jParams, jParams.getLocale ());
128             request.setAttribute ("jahiaDisplayMessage", dspMsg);
129             // redirect...
130
JahiaAdministration.doRedirect (request, response, session, JSP_PATH + "menu.jsp");
131             return;
132         }
133
134         userRequestDispatcher (request, response, session);
135     } // end constructor
136

137
138
139     //-------------------------------------------------------------------------
140
/**
141      * This method is used like a dispatcher for user requests.
142      *
143      * @param request Servlet request.
144      * @param response Servlet response.
145      * @param session Servlet session for the current user.
146      */

147     private void userRequestDispatcher (HttpServletRequest JavaDoc request,
148                                         HttpServletResponse JavaDoc response,
149                                         HttpSession JavaDoc session)
150             throws Throwable JavaDoc {
151         String JavaDoc operation = request.getParameter ("sub");
152
153         sReg = ServicesRegistry.getInstance ();
154
155         // check if the user has really admin access to this site...
156
user = (JahiaUser)session.getAttribute (ParamBean.SESSION_USER);
157         site = (JahiaSite)session.getAttribute (ParamBean.SESSION_SITE);
158         JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
159         ParamBean jParams = null;
160         if (jData != null) {
161             jParams = jData.params ();
162         }
163
164         if (site != null && user != null && sReg != null) {
165
166             if (JahiaSiteTools.getAdminGroup (site).isMember (user)) {
167
168                 // set the new site id to administrate...
169
request.setAttribute ("site", site);
170
171                 if (operation.equals ("display")) {
172                     displayComponentList (request, response, session);
173                 } else if (operation.equals ("displaynewlist")) {
174                     displayNewComponentList (request, response, session);
175                 } else if (operation.equals ("details")) {
176                     displayNewComponentDetail (request, response, session);
177                 } else if (operation.equals ("visibility")) {
178                     confirmComponentVisibilityChange (request, response, session);
179                 } else if (operation.equals ("savevisibility")) {
180                     saveComponentVisibility (request, response, session);
181                 } else if (operation.equals ("edit")) {
182                     editComponent (request, response, session);
183                 } else if (operation.equals ("add")) {
184                     addComponent (request, response, session);
185                 } else if (operation.equals ("share")) {
186                     shareComponent (request, response, session);
187                 } else if (operation.equals ("options")) {
188                     editComponentOption (request, response, session);
189                 } else if (operation.equals ("decryptjec")) {
190                     decryptJec (request, response, session);
191                 }
192
193             } else {
194 //System.out.println(" --> no admin access on this site <--");
195
String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
196                         jParams, jParams.getLocale ());
197                 request.setAttribute ("jahiaDisplayMessage", dspMsg);
198                 JahiaAdministration.doRedirect (request,
199                         response,
200                         session, JSP_PATH + "menu.jsp");
201             }
202         } else {
203             String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
204                     jParams, jParams.getLocale ());
205             request.setAttribute ("jahiaDisplayMessage", dspMsg);
206             JahiaAdministration.doRedirect (request,
207                     response,
208                     session, JSP_PATH + "menu.jsp");
209         }
210     } // userRequestDispatcher
211

212
213
214     //-------------------------------------------------------------------------
215
/**
216      * Display the list of components.
217      *
218      * @param request Servlet request.
219      * @param response Servlet response.
220      * @param session HttpSession object.
221      */

222     private void displayComponentList (HttpServletRequest JavaDoc request,
223                                        HttpServletResponse JavaDoc response,
224                                        HttpSession JavaDoc session)
225             throws IOException JavaDoc, ServletException JavaDoc {
226         JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
227         ParamBean jParams = null;
228         if (jData != null) {
229             jParams = jData.params ();
230         }
231         try {
232
233             JahiaApplicationsManagerService appPersServ =
234                     sReg.getJahiaApplicationsManagerService ();
235
236             AppsShareService appShareServ = sReg.getAppsShareService ();
237
238             if (appPersServ == null || appShareServ == null) {
239                 throw new JahiaException ("Unavailable Services",
240                         "Unavailable Services",
241                         JahiaException.SERVICE_ERROR,
242                         JahiaException.ERROR_SEVERITY);
243             }
244
245             // all apps
246
Vector JavaDoc appList = appPersServ.getApplications ();
247
248             // list of authorized apps
249
Vector JavaDoc authAppList = new Vector JavaDoc ();
250
251             int size = appList.size ();
252             ApplicationBean app = null;
253             for (int i = 0; i < size; i++) {
254                 app = (ApplicationBean)appList.get (i);
255                 if (app.isShared () || (app.getJahiaID () == site.getID ())
256                         || (appShareServ.getShare (site, app) != null)) {
257                     authAppList.add (app);
258                 }
259             }
260
261             request.setAttribute ("appsList", authAppList.elements ());
262
263             JahiaAdministration.doRedirect (request,
264                     response,
265                     session,
266                     JSP_PATH + "manage_components.jsp");
267
268         } catch (JahiaException je) {
269             String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
270                     jParams, jParams.getLocale ());
271             request.setAttribute ("jahiaDisplayMessage", dspMsg);
272             JahiaAdministration.doRedirect (request,
273                     response,
274                     session,
275                     JSP_PATH + "menu.jsp");
276         }
277
278
279     } // end displayComponentList
280

281
282
283     //-------------------------------------------------------------------------
284
/**
285      * Display the list of new components.
286      *
287      * @param request Servlet request.
288      * @param response Servlet response.
289      * @param session HttpSession object.
290      */

291     private void displayNewComponentList (HttpServletRequest JavaDoc request,
292                                           HttpServletResponse JavaDoc response,
293                                           HttpSession JavaDoc session)
294             throws IOException JavaDoc, ServletException JavaDoc {
295
296         JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
297         ParamBean jParams = null;
298         if (jData != null) {
299             jParams = jData.params ();
300         }
301         try {
302             JahiaWebAppsDeployerService appDepServ = sReg.getJahiaWebAppsDeployerService ();
303
304             if (appDepServ == null) {
305                 throw new JahiaException ("Unavailable Services",
306                         "Unavailable Services",
307                         JahiaException.SERVICE_ERROR,
308                         JahiaException.ERROR_SEVERITY);
309             }
310
311 // get the list of new web apps
312
Enumeration JavaDoc newWebAppsKeys = appDepServ.getWebAppsPackageKeys (site.getSiteKey ());
313
314             Enumeration JavaDoc enumeration = appDepServ.getWebAppsPackages (site.getSiteKey ());
315             Vector JavaDoc vec = new Vector JavaDoc ();
316             JahiaWebAppsPackage aPackage = null;
317
318             while (enumeration.hasMoreElements ()) {
319                 aPackage = (JahiaWebAppsPackage)enumeration.nextElement ();
320                 if (aPackage != null) {
321                     vec.add (aPackage);
322                 } else {
323 //System.out.println("displayNewComponentList packages is null");
324
}
325             }
326
327             request.setAttribute ("packagesList", vec.elements ());
328
329             JahiaAdministration.doRedirect (request,
330                     response,
331                     session,
332                     JSP_PATH + "new_components.jsp");
333         } catch (JahiaException je) {
334             String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
335                     jParams, jParams.getLocale ());
336             request.setAttribute ("jahiaDisplayMessage", dspMsg);
337             JahiaAdministration.doRedirect (request,
338                     response,
339                     session,
340                     JSP_PATH + "menu.jsp");
341         }
342
343     }
344
345
346     //-------------------------------------------------------------------------
347
/**
348      * Display informations about a new component
349      *
350      * @param request Servlet request.
351      * @param response Servlet response.
352      * @param session HttpSession object.
353      */

354     private void displayNewComponentDetail (HttpServletRequest JavaDoc request,
355                                             HttpServletResponse JavaDoc response,
356                                             HttpSession JavaDoc session)
357             throws IOException JavaDoc, ServletException JavaDoc {
358
359         JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
360         ParamBean jParams = null;
361         if (jData != null) {
362             jParams = jData.params ();
363         }
364
365         try {
366             JahiaWebAppsDeployerService appDepServ = sReg.getJahiaWebAppsDeployerService ();
367
368             if (appDepServ == null) {
369                 throw new JahiaException ("Unavailable Services",
370                         "Unavailable Services",
371                         JahiaException.SERVICE_ERROR,
372                         JahiaException.ERROR_SEVERITY);
373             }
374
375             // get the new component
376
String JavaDoc packageName = request.getParameter ("package_name");
377             JahiaWebAppsPackage aPackage = (JahiaWebAppsPackage)appDepServ
378                     .getWebAppsPackage (site.getSiteKey ()
379                     + "_"
380                     + packageName);
381
382             String JavaDoc subAction = request.getParameter ("subaction");
383
384             if (subAction == null) {
385                 request.setAttribute ("canDeploy", new Boolean JavaDoc (appDepServ.canDeploy ()));
386                 request.setAttribute ("aPackage", aPackage);
387                 JahiaAdministration.doRedirect (request,
388                         response,
389                         session,
390                         JSP_PATH + "new_component_detail.jsp");
391             } else if (subAction.equals ("deploy")) {
392
393                 try {
394                     if (appDepServ.deploy (site,
395                             aPackage.getContextRoot (),
396                             aPackage.getFilePath ())) {
397
398                         displayNewComponentList (request, response, session);
399
400                     } else {
401                         String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.deployingPackageError.label",
402                                 jParams, jParams.getLocale ());
403                         session.setAttribute (CLASS_NAME + "jahiaDisplayMessage", dspMsg);
404                         request.setAttribute ("aPackage", aPackage);
405                         JahiaAdministration.doRedirect (request,
406                                 response,
407                                 session,
408                                 JSP_PATH + "new_component_detail.jsp");
409                     }
410                 } catch (JahiaException je) {
411                     request.setAttribute ("aPackage", aPackage);
412                     String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.deployingPackageError.label",
413                             jParams, jParams.getLocale ());
414                     session.setAttribute (CLASS_NAME + "jahiaDisplayMessage", dspMsg);
415                     JahiaAdministration.doRedirect (request,
416                             response,
417                             session,
418                             JSP_PATH + "new_component_detail.jsp");
419                 }
420             } else if (subAction.equals ("delete")) {
421
422                 try {
423                     if (appDepServ.deletePackage (site, aPackage.getFilePath ())) {
424                         displayNewComponentList (request, response, session);
425                     } else {
426                         request.setAttribute ("aPackage", aPackage);
427                         String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.deletingPackageError.label",
428                                 jParams, jParams.getLocale ());
429                         session.setAttribute (CLASS_NAME + "jahiaDisplayMessage", dspMsg);
430                         JahiaAdministration.doRedirect (request,
431                                 response,
432                                 session,
433                                 JSP_PATH + "new_component_detail.jsp");
434                     }
435                 } catch (IOException JavaDoc ioe) {
436                     String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.deletingPackageError.label",
437                             jParams, jParams.getLocale ());
438                     session.setAttribute (CLASS_NAME + "jahiaDisplayMessage", dspMsg);
439                     JahiaAdministration.doRedirect (request,
440                             response,
441                             session,
442                             JSP_PATH + "new_component_detail.jsp");
443                 }
444             }
445
446         } catch (JahiaException je) {
447             String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
448                     jParams, jParams.getLocale ());
449             request.setAttribute ("jahiaDisplayMessage", dspMsg);
450             JahiaAdministration.doRedirect (request,
451                     response,
452                     session,
453                     JSP_PATH + "menu.jsp");
454         }
455
456     }
457
458
459     //-------------------------------------------------------------------------
460
/**
461      * Display confirmation form for visibility change.
462      *
463      * @param request Servlet request.
464      * @param response Servlet response.
465      * @param session HttpSession object.
466      */

467     private void confirmComponentVisibilityChange (HttpServletRequest JavaDoc request,
468                                                    HttpServletResponse JavaDoc response,
469                                                    HttpSession JavaDoc session)
470             throws IOException JavaDoc, ServletException JavaDoc {
471
472         JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
473         ParamBean jParams = null;
474         if (jData != null) {
475             jParams = jData.params ();
476         }
477         try {
478
479             JahiaApplicationsManagerService appManServ = sReg.getJahiaApplicationsManagerService ();
480
481             if (appManServ == null) {
482                 throw new JahiaException ("Unavailable Services",
483                         "Unavailable Services",
484                         JahiaException.SERVICE_ERROR,
485                         JahiaException.ERROR_SEVERITY);
486             }
487
488 // get form values...
489
String JavaDoc[] ids = request.getParameterValues ("visible_status");
490
491             Vector JavaDoc webApps = appManServ.getApplications (site.getID ());
492             if (webApps == null) {
493                 webApps = new Vector JavaDoc ();
494             }
495             Enumeration JavaDoc enumeration = webApps.elements ();
496
497             if (enumeration != null) {
498                 ApplicationBean app = null;
499                 Vector JavaDoc apps = new Vector JavaDoc (); // vector of apps to change the visibility
500

501                 while (enumeration.hasMoreElements ()) {
502                     app = (ApplicationBean)enumeration.nextElement ();
503                     if ((app.getJahiaID () == site.getID ())
504                             && (app.getVisibleStatus () == 1)
505                             && !(JahiaTools.inValues (String.valueOf (app.getID ()), ids))) {
506                         apps.add (app);
507                     } else if ((app.getJahiaID () == site.getID ())
508                             && (app.getVisibleStatus () == 0)
509                             && (JahiaTools.inValues (String.valueOf (app.getID ()), ids))) {
510                         apps.add (app);
511                     }
512                 }
513
514                 if (apps.size () > 0) {
515                     request.setAttribute ("appsList", apps.elements ());
516                     JahiaAdministration.doRedirect (request,
517                             response,
518                             session,
519                             JSP_PATH + "comps_confirmvisibilitychange.jsp");
520                 } else {
521                     request.setAttribute ("appsList", webApps.elements ());
522                     JahiaAdministration.doRedirect (request,
523                             response,
524                             session,
525                             JSP_PATH + "manage_components.jsp");
526                 }
527             } else {
528                 request.setAttribute ("appsList", enumeration);
529                 JahiaAdministration.doRedirect (request,
530                         response,
531                         session,
532                         JSP_PATH + "manage_components.jsp");
533             }
534
535         } catch (JahiaException je) {
536             String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
537                     jParams, jParams.getLocale ());
538             request.setAttribute ("jahiaDisplayMessage", dspMsg);
539             JahiaAdministration.doRedirect (request,
540                     response,
541                     session,
542                     JSP_PATH + "menu.jsp");
543         }
544
545     } // end displayComponentList
546

547
548     //-------------------------------------------------------------------------
549
/**
550      * Save components visibility.
551      *
552      * @param request Servlet request.
553      * @param response Servlet response.
554      * @param session HttpSession object.
555      */

556     private void saveComponentVisibility (HttpServletRequest JavaDoc request,
557                                           HttpServletResponse JavaDoc response,
558                                           HttpSession JavaDoc session)
559             throws IOException JavaDoc, ServletException JavaDoc {
560
561         JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
562         ParamBean jParams = null;
563         if (jData != null) {
564             jParams = jData.params ();
565         }
566         try {
567
568             JahiaApplicationsManagerService appManServ = sReg.getJahiaApplicationsManagerService ();
569
570             if (appManServ == null) {
571                 throw new JahiaException ("Unavailable Services",
572                         "Unavailable Services",
573                         JahiaException.SERVICE_ERROR,
574                         JahiaException.ERROR_SEVERITY);
575             }
576
577 // get form values...
578
String JavaDoc[] ids = request.getParameterValues ("visible_status");
579
580 // save change
581
int id = 0;
582             int visStatus = 0;
583             ApplicationBean app = null;
584             for (int i = 0; i < ids.length; i++) {
585                 id = Integer.parseInt (ids[i]);
586                 app = appManServ.getApplication (id);
587                 if (app != null) {
588                     visStatus = app.getVisibleStatus ();
589                     if (visStatus == 0) {
590                         app.setVisible (1);
591                     } else {
592                         app.setVisible (0);
593                     }
594
595                     appManServ.saveDefinition (app);
596                 }
597             }
598
599             Vector JavaDoc webApps = appManServ.getApplications (site.getID ());
600             if (webApps == null) {
601                 webApps = new Vector JavaDoc ();
602             }
603             Enumeration JavaDoc enumeration = webApps.elements ();
604             if (enumeration != null) {
605                 request.setAttribute ("appsList", enumeration);
606             }
607
608             JahiaAdministration.doRedirect (request,
609                     response,
610                     session,
611                     JSP_PATH + "manage_components.jsp");
612
613         } catch (JahiaException je) {
614             String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
615                     jParams, jParams.getLocale ());
616             request.setAttribute ("jahiaDisplayMessage", dspMsg);
617             JahiaAdministration.doRedirect (request,
618                     response,
619                     session,
620                     JSP_PATH + "menu.jsp");
621         }
622
623     }
624
625
626     //-------------------------------------------------------------------------
627
/**
628      * Display the edit form for a single component.
629      *
630      * @param request Servlet request.
631      * @param response Servlet response.
632      * @param session HttpSession object.
633      */

634     private void editComponent (HttpServletRequest JavaDoc request,
635                                 HttpServletResponse JavaDoc response,
636                                 HttpSession JavaDoc session)
637             throws IOException JavaDoc, ServletException JavaDoc {
638
639         JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
640         ParamBean jParams = null;
641         if (jData != null) {
642             jParams = jData.params ();
643         }
644         try {
645
646             JahiaSitesService sitesServ = sReg.getJahiaSitesService ();
647             JahiaApplicationsManagerService appManServ = sReg.getJahiaApplicationsManagerService ();
648             AppsShareService appShareServ = sReg.getAppsShareService ();
649             JahiaWebAppsDeployerService appDepServ = sReg.getJahiaWebAppsDeployerService ();
650             JahiaApplicationsManagerService appPersServ =
651                     sReg.getJahiaApplicationsManagerService ();
652
653             if (appManServ == null
654                     || sitesServ == null
655                     || appShareServ == null
656                     || appDepServ == null
657                     || appPersServ == null) {
658                 throw new JahiaException ("Unavailable Services",
659                         "Unavailable Services",
660                         JahiaException.SERVICE_ERROR,
661                         JahiaException.ERROR_SEVERITY);
662             }
663
664 // get paramater
665
String JavaDoc strVal = request.getParameter ("appid");
666             if (strVal == null) {
667                 String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.errMsg.applicaionNotFound.label",
668                         jParams, jParams.getLocale ());
669                 request.setAttribute ("errMsg", dspMsg);
670                 displayComponentList (request, response, session);
671                 return;
672             }
673             int id = Integer.parseInt (strVal);
674             ApplicationBean app = appManServ.getApplication (id);
675
676             if (app == null) {
677                 String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.errMsg.applicaionNotFound.label",
678                         jParams, jParams.getLocale ());
679                 request.setAttribute ("errMsg", dspMsg);
680                 displayComponentList (request, response, session);
681                 return;
682             }
683
684             String JavaDoc subAction = request.getParameter ("subaction");
685             if (subAction == null || (subAction.length () <= 0)) {
686
687                 // get the list of authorized sites for this application
688
Enumeration JavaDoc authSitesID = null;
689
690                 authSitesID = appShareServ.getSites (app);
691                 Vector JavaDoc authSites = new Vector JavaDoc ();
692                 Integer JavaDoc siteID = null;
693                 while (authSitesID.hasMoreElements ()) {
694                     siteID = (Integer JavaDoc)authSitesID.nextElement ();
695                     JahiaSite aSite = sitesServ.getSite (siteID.intValue ());
696                     authSites.add (aSite);
697                 }
698
699                 request.setAttribute ("authSites", authSites.elements ());
700                 request.setAttribute ("nbShare", new Integer JavaDoc (authSites.size ()));
701
702                 request.setAttribute ("appItem", app);
703                 JahiaAdministration.doRedirect (request,
704                         response,
705                         session,
706                         JSP_PATH + "component_edit.jsp");
707             } else if (subAction.equals ("delete")) {
708                 String JavaDoc undeploy = request.getParameter ("undeploy");
709
710 // undeploy only apps not in the same context as Jahia !!!!
711
if (undeploy != null
712                         && (!app.getContext ().equalsIgnoreCase (request.getContextPath ()))) {
713                     appDepServ.undeploy (app);
714                 }
715
716 // delete group associated with this application
717
appManServ.deleteApplicationGroups (app);
718
719                 // delete the app definition
720
appPersServ.removeApplication (app.getID ());
721
722                 ServicesRegistry.getInstance().getJahiaApplicationContextService().removeContextFromCache(app.getContext());
723
724                 displayComponentList (request, response, session);
725
726             } else if (subAction.equals ("confirmdelete")) {
727                 request.setAttribute ("currAction", "confirmdelete");
728                 request.setAttribute ("appItem", app);
729                 JahiaAdministration.doRedirect (request,
730                         response,
731                         session,
732                         JSP_PATH + "component_edit.jsp");
733             } else if (subAction.equals ("save")) {
734
735                 String JavaDoc appName = request.getParameter ("appName");
736
737                 String JavaDoc visible_status = request.getParameter ("visible_status");
738                 if (appName != null && (appName.trim ().length () > 0)) {
739                     app.setName (appName);
740                 }
741                 if (visible_status != null) {
742                     app.setVisible (1);
743                 } else {
744                     app.setVisible (0);
745                 }
746
747                 String JavaDoc appDescr = request.getParameter ("appDescr");
748                 app.setdesc (appDescr);
749
750                 if (appManServ.saveDefinition (app)) {
751                     String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.applicationUpdated.label",
752                             jParams, jParams.getLocale ());
753                     session.setAttribute (CLASS_NAME + "jahiaDisplayMessage", dspMsg);
754                 } else {
755                     String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.applicationNotUpdated.label",
756                             jParams, jParams.getLocale ());
757                     session.setAttribute (CLASS_NAME + "jahiaDisplayMessage", dspMsg);
758                 }
759
760                 app = appManServ.getApplication (id);
761                 request.setAttribute ("appItem", app);
762                 JahiaAdministration.doRedirect (request,
763                         response,
764                         session,
765                         JSP_PATH + "component_edit.jsp");
766             }
767
768         } catch (JahiaException je) {
769             String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
770                     jParams, jParams.getLocale ());
771             request.setAttribute ("jahiaDisplayMessage", dspMsg);
772             JahiaAdministration.doRedirect (request,
773                     response,
774                     session,
775                     JSP_PATH + "menu.jsp");
776         }
777
778     }
779
780
781     //-------------------------------------------------------------------------
782
/**
783      * Handle Edit Components options
784      *
785      * @param request Servlet request.
786      * @param response Servlet response.
787      * @param session HttpSession object.
788      */

789     private void editComponentOption (HttpServletRequest JavaDoc request,
790                                       HttpServletResponse JavaDoc response,
791                                       HttpSession JavaDoc session)
792             throws IOException JavaDoc, ServletException JavaDoc {
793
794         JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
795         ParamBean jParams = null;
796         if (jData != null) {
797             jParams = jData.params ();
798         }
799         try {
800
801             JahiaSitesService sitesServ = sReg.getJahiaSitesService ();
802
803             if (sitesServ == null) {
804                 throw new JahiaException ("Unavailable Services",
805                         "Unavailable Services",
806                         JahiaException.SERVICE_ERROR,
807                         JahiaException.ERROR_SEVERITY);
808             }
809
810             int autoDeploy = 0;
811
812             if (site.getWebAppsAutoDeployMode ()) {
813                 autoDeploy = 1;
814             }
815
816             request.setAttribute ("autoDeploy", new Integer JavaDoc (autoDeploy));
817
818             // get paramater
819
String JavaDoc subAction = request.getParameter ("subaction");
820             if (subAction != null && subAction.equals ("save")) {
821
822                 String JavaDoc strVal = request.getParameter ("autoDeploy");
823                 int intVal = 0;
824
825                 if (strVal != null) {
826                     intVal = 1;
827                 }
828
829                 if (intVal != autoDeploy) {
830
831                     try {
832                         site.setWebAppsAutoDeployMode (intVal == 1);
833                         sitesServ.updateSite (site);
834                         session.setAttribute (ParamBean.SESSION_SITE, site);
835                         String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.changeUpdated.label",
836                                 jParams, jParams.getLocale ());
837                         session.setAttribute (CLASS_NAME + "jahiaDisplayMessage", dspMsg);
838
839                     } catch (JahiaException je) {
840                         String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.changeNotUpdated.label",
841                                 jParams, jParams.getLocale ());
842                         session.setAttribute (CLASS_NAME + "jahiaDisplayMessage", dspMsg);
843                     }
844
845                     request.setAttribute ("autoDeploy", new Integer JavaDoc (intVal));
846                 }
847             }
848
849             JahiaAdministration.doRedirect (request,
850                     response,
851                     session,
852                     JSP_PATH + "component_option.jsp");
853         } catch (JahiaException je) {
854             String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
855                     jParams, jParams.getLocale ());
856             request.setAttribute ("jahiaDisplayMessage", dspMsg);
857             JahiaAdministration.doRedirect (request,
858                     response,
859                     session,
860                     JSP_PATH + "menu.jsp");
861         }
862
863
864     }
865
866
867     //-------------------------------------------------------------------------
868
/**
869      * Handle all the process of manually add a new component.
870      *
871      * @param request Servlet request.
872      * @param response Servlet response.
873      * @param session HttpSession object.
874      */

875     private void addComponent (HttpServletRequest JavaDoc request,
876                                HttpServletResponse JavaDoc response,
877                                HttpSession JavaDoc session)
878
879             throws IOException JavaDoc, ServletException JavaDoc {
880
881         JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
882         ParamBean jParams = null;
883         if (jData != null) {
884             jParams = jData.params ();
885         }
886         try {
887
888             JahiaApplicationsManagerService appManServ = sReg.getJahiaApplicationsManagerService ();
889             JahiaWebAppsDeployerService appDepServ = sReg.getJahiaWebAppsDeployerService ();
890
891             if (appManServ == null
892                     || appDepServ == null) {
893                 throw new JahiaException ("Unavailable Services",
894                         "Unavailable Services",
895                         JahiaException.SERVICE_ERROR,
896                         JahiaException.ERROR_SEVERITY);
897             }
898
899             request.setAttribute ("warningMsg", "");
900
901             String JavaDoc subAction = request.getParameter ("subaction");
902             String JavaDoc appPath = request.getParameter ("appPath");
903             String JavaDoc appName = request.getParameter ("appName");
904             String JavaDoc appDescr = request.getParameter ("appDescr");
905
906             if (subAction == null || (subAction.length () <= 0)) {
907                 request.setAttribute ("appPath", "");
908             } else if (subAction.equals ("scanDir")) {
909                 appPath = request.getParameter ("appPath");
910                 JahiaWebAppsPackage pack = appDepServ.loadWebAppInfo (appPath);
911                 if (pack != null) {
912                     request.setAttribute ("appPath", appPath);
913
914 // check if this application has been already registered in Jahia
915
ApplicationBean app = appManServ.getApplication ("/" + pack.getContextRoot ());
916                     if (app != null) {
917                         String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.warningMsg.componentAlreadyRegistered.label",
918                                 jParams, jParams.getLocale ());
919                         request.setAttribute ("warningMsg", dspMsg);
920                         request.setAttribute ("appName", "");
921                         request.setAttribute ("appDescr", "");
922                     } else {
923                         if (appName == null) {
924                             appName = pack.getContextRoot ();
925                         }
926                         if (appDescr == null) {
927                             appDescr = "";
928                         }
929                         request.setAttribute ("appName", appName);
930                         request.setAttribute ("appDescr", appDescr);
931                         request.setAttribute ("aPackage", pack);
932                     }
933                 } else {
934                     request.setAttribute ("appPath", appPath);
935                     String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.warningMsg.noComponentInfoFound.label",
936                             jParams, jParams.getLocale ());
937                     request.setAttribute ("warningMsg", dspMsg);
938                 }
939
940             } else if (subAction.equals ("deploy")) {
941                 request.setAttribute ("appPath", appPath);
942                 request.setAttribute ("appName", appName);
943                 request.setAttribute ("appDescr", appDescr);
944
945                 JahiaWebAppsPackage pack = appDepServ.loadWebAppInfo (appPath);
946
947                 if (pack != null) {
948                     if (!pack.isDirectory ()) {
949                         if (appDepServ.deploy (site, pack.getContextRoot (), appPath)) {
950 // update with value from form
951
ApplicationBean app = appManServ.getApplication ("/" + pack.getContextRoot ());
952                             if (app != null) {
953                                 if (appName != null && appName.trim ().length () > 0) {
954                                     app.setName (appName);
955                                 }
956                                 app.setdesc (appDescr);
957                                 appManServ.saveDefinition (app);
958                             }
959                             String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.warningMsg.componentRegistered.label",
960                                     jParams, jParams.getLocale ());
961                             request.setAttribute ("warningMsg", dspMsg);
962                         } else {
963                             String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.warningMsg.componentNotRegistered.label",
964                                     jParams, jParams.getLocale ());
965                             request.setAttribute ("warningMsg", dspMsg);
966                             request.setAttribute ("aPackage", pack);
967                         }
968                     } else {
969                         appDepServ.registerWebApps (site,
970                                 pack.getContextRoot (),
971                                 appPath,
972                                 pack.getWebApps ());
973
974 // update with value from form
975
ApplicationBean app = appManServ.getApplication ("/" + pack.getContextRoot ());
976                         if (app != null) {
977                             if (appName != null && appName.trim ().length () > 0) {
978                                 app.setName (appName);
979                             }
980                             app.setdesc (appDescr);
981                             appManServ.saveDefinition (app);
982                         }
983
984                         String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.warningMsg.componentRegistered.label",
985                                 jParams, jParams.getLocale ());
986                         request.setAttribute ("warningMsg", dspMsg);
987                     }
988
989                 } else {
990                     String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.warningMsg.noComponentInfoFound.label",
991                             jParams, jParams.getLocale ());
992                     request.setAttribute ("warningMsg", dspMsg);
993                 }
994             }
995             JahiaAdministration.doRedirect (request,
996                     response,
997                     session,
998                     JSP_PATH + "component_add.jsp");
999         } catch (JahiaException je) {
1000            String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
1001                    jParams, jParams.getLocale ());
1002            request.setAttribute ("jahiaDisplayMessage", dspMsg);
1003            JahiaAdministration.doRedirect (request,
1004                    response,
1005                    session,
1006                    JSP_PATH + "menu.jsp");
1007        }
1008
1009
1010    } // end addComponent
1011

1012
1013    //-------------------------------------------------------------------------
1014
/**
1015     * Component sharing between sites.
1016     *
1017     * @param request Servlet request.
1018     * @param response Servlet response.
1019     * @param session HttpSession object.
1020     */

1021    private void shareComponent (HttpServletRequest JavaDoc request,
1022                                 HttpServletResponse JavaDoc response,
1023                                 HttpSession JavaDoc session)
1024            throws IOException JavaDoc, ServletException JavaDoc {
1025
1026        JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
1027        ParamBean jParams = null;
1028        if (jData != null) {
1029            jParams = jData.params ();
1030        }
1031        try {
1032            JahiaApplicationsManagerService appManServ = sReg.getJahiaApplicationsManagerService ();
1033            JahiaSitesService sitesServ = sReg.getJahiaSitesService ();
1034            AppsShareService appShareServ = sReg.getAppsShareService ();
1035            JahiaApplicationsManagerService appPersServ =
1036                    sReg.getJahiaApplicationsManagerService ();
1037            JahiaGroupManagerService grpManServ = sReg.getJahiaGroupManagerService ();
1038
1039            if (appManServ == null
1040                    || sitesServ == null
1041                    || appShareServ == null
1042                    || appPersServ == null
1043                    || grpManServ == null) {
1044                throw new JahiaException ("Unavailable Services",
1045                        "Unavailable Services",
1046                        JahiaException.SERVICE_ERROR,
1047                        JahiaException.ERROR_SEVERITY);
1048            }
1049
1050
1051            // get the list of all site
1052
Vector JavaDoc apps = appPersServ.getApplications ();
1053            Vector JavaDoc ownApps = new Vector JavaDoc (); // the site's apps
1054
if (apps == null) {
1055                apps = new Vector JavaDoc ();
1056            }
1057            int size = apps.size ();
1058            ApplicationBean appItem = null;
1059            for (int i = 0; i < size; i++) {
1060                appItem = (ApplicationBean)apps.get (i);
1061                if (appItem.getJahiaID () == site.getID ()) {
1062                    ownApps.add (appItem);
1063                }
1064            }
1065
1066            request.setAttribute ("appsList", ownApps.elements ());
1067
1068            Vector JavaDoc grantedSites = new Vector JavaDoc ();
1069
1070// get sites where the user has an admin access...
1071
try {
1072                grantedSites = grpManServ.getAdminGrantedSites (user);
1073            } catch (Exception JavaDoc e) {
1074                grantedSites.add (site);
1075            }
1076
1077            request.setAttribute ("sitesList", grantedSites);
1078
1079            // get the current application
1080
int appID = -1;
1081            String JavaDoc appIDStr = "";
1082            ApplicationBean app = null;
1083            if (request.getParameter ("apps") == null) {
1084
1085                if (ownApps.size () > 0) {
1086
1087                    app = (ApplicationBean)ownApps.get (0); // get the first app
1088
appID = app.getID ();
1089                }
1090            } else {
1091                appIDStr = request.getParameter ("apps");
1092                appID = Integer.parseInt (appIDStr);
1093                app = appManServ.getApplication (appID);
1094            }
1095
1096            String JavaDoc subAction = null;
1097            if (request.getParameter ("subaction") != null) {
1098                subAction = request.getParameter ("subaction");
1099            }
1100
1101            if (subAction != null && subAction.equals ("save")) {
1102                // delete all share for this app
1103
appShareServ.removeShares (app);
1104                // add new ones;
1105
String JavaDoc[] vals = request.getParameterValues ("authSites");
1106                if (vals != null) {
1107                    JahiaSite authSite = null;
1108                    for (int i = 0; i < vals.length; i++) {
1109                        authSite = sitesServ.getSite (Integer.parseInt (vals[i]));
1110                        appShareServ.addShare (authSite, app);
1111                    }
1112                }
1113
1114                appPersServ.saveDefinition (app);
1115
1116            }
1117
1118
1119            // get the list of authorized sites for this application
1120
Enumeration JavaDoc authSitesID = null;
1121
1122            authSitesID = appShareServ.getSites (app);
1123            Vector JavaDoc authSites = new Vector JavaDoc ();
1124            Integer JavaDoc siteID = null;
1125            while (authSitesID.hasMoreElements ()) {
1126                siteID = (Integer JavaDoc)authSitesID.nextElement ();
1127                JahiaSite aSite = sitesServ.getSite (siteID.intValue ());
1128                authSites.add (aSite);
1129            }
1130
1131            request.setAttribute ("app", app);
1132            request.setAttribute ("appID", new Integer JavaDoc (appID));
1133            request.setAttribute ("authSites", authSites.elements ());
1134
1135            JahiaAdministration.doRedirect (request,
1136                    response,
1137                    session,
1138                    JSP_PATH + "component_share.jsp");
1139
1140        } catch (JahiaException je) {
1141            String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
1142                    jParams, jParams.getLocale ());
1143            request.setAttribute ("jahiaDisplayMessage", dspMsg);
1144            JahiaAdministration.doRedirect (request,
1145                    response,
1146                    session,
1147                    JSP_PATH + "menu.jsp");
1148        }
1149
1150    }
1151
1152
1153    //-------------------------------------------------------------------------
1154
/**
1155     * Search Jahia Encrypted Components and decrypt them
1156     *
1157     * @param request Servlet request.
1158     * @param response Servlet response.
1159     * @param session HttpSession object.
1160     */

1161    private void decryptJec (HttpServletRequest JavaDoc request,
1162                             HttpServletResponse JavaDoc response,
1163                             HttpSession JavaDoc session)
1164            throws IOException JavaDoc, ServletException JavaDoc {
1165
1166
1167        JahiaData jData = (JahiaData)request.getAttribute ("org.jahia.data.JahiaData");
1168        ParamBean jParams = null;
1169        if (jData != null) {
1170            jParams = jData.params ();
1171        }
1172        try {
1173            logger.debug ("decryptJec started");
1174
1175            JahiaWebAppsDeployerService appDepServ = sReg.getJahiaWebAppsDeployerService ();
1176
1177            if (appDepServ == null) {
1178                throw new JahiaException ("Unavailable Services",
1179                        "Unavailable Services",
1180                        JahiaException.SERVICE_ERROR,
1181                        JahiaException.ERROR_SEVERITY);
1182            }
1183
1184            // get the new component disk path for te current site
1185
String JavaDoc path = JahiaWebAppsDeployerService.getNewWebAppsPath ()
1186                    + File.separator
1187                    + site.getSiteKey ();
1188
1189
1190            File JavaDoc folder = new File JavaDoc (path);
1191            File JavaDoc[] files = new File JavaDoc[0];
1192
1193            if (folder.isDirectory ()) {
1194                files = folder.listFiles ();
1195            }
1196
1197            int size = files.length;
1198            Hashtable JavaDoc cryptedComp = new Hashtable JavaDoc ();
1199            File JavaDoc f = null;
1200            JecFile jec = null;
1201
1202            // get license info
1203
int jecLicenseType = 0;
1204            int jecLicenseTypeRelComp = 0;
1205
1206
1207            // decrypt Jahia Encrypted Components
1208
for (int i = 0; i < size; i++) {
1209                f = files[i];
1210                if (f.isFile () && (f.getName ().toLowerCase ()).endsWith (".jec")) {
1211
1212                    int status = 0;
1213                    try {
1214
1215                        logger.debug ("Found file " + f.getAbsolutePath ());
1216
1217                        jec = new JecFile (f.getAbsolutePath ());
1218                        jecLicenseType = jec.getLicenseType ();
1219                        jecLicenseTypeRelComp = jec.getLicenseTypeRelComp ();
1220                        /*
1221                        if (mLicenseKey.compareLicense (jecLicenseType,
1222                                jecLicenseTypeRelComp)) {
1223                        */

1224                            jec.extractFiles ();
1225                            status = JefFileConstants.UNLOCKED;
1226                            f.delete ();
1227                        /*
1228                        } else {
1229                            status = JefFileConstants.LOCKED;
1230                        }
1231                        */

1232                        jec = null;
1233
1234                    } catch (JefFileKeyNotFoundException knf) {
1235                        status = JefFileConstants.INVALID_JEF_FILE;
1236                        logger.warn (knf);
1237                        File JavaDoc tmpFile = new File JavaDoc (f.getAbsolutePath () + "_error");
1238                        f.renameTo (tmpFile);
1239
1240                    } catch (JefFileInvalidKeyValueException ikv) {
1241                        status = JefFileConstants.INVALID_JEF_FILE;
1242                        logger.warn (ikv);
1243                        File JavaDoc tmpFile = new File JavaDoc (f.getAbsolutePath () + "_error");
1244                        f.renameTo (tmpFile);
1245
1246                    } catch (InvalidJefFileException ijf) {
1247                        status = JefFileConstants.INVALID_JEF_FILE;
1248                        logger.warn (ijf);
1249                        File JavaDoc tmpFile = new File JavaDoc (f.getAbsolutePath () + "_error");
1250                        f.renameTo (tmpFile);
1251
1252                    } catch (IOException JavaDoc ioe) {
1253                        status = JefFileConstants.IO_ERROR;
1254                        logger.warn (ioe);
1255
1256                    } catch (JahiaException je) {
1257                        status = je.getErrorCode ();
1258                        logger.warn (je);
1259
1260                    } catch (Throwable JavaDoc t) {
1261                        status = JefFileConstants.UNKNOWN_ERROR;
1262                        logger.warn (t);
1263                    }
1264
1265                    cryptedComp.put (f.getName (), new Integer JavaDoc (status));
1266
1267                    logger.debug ("decryptJec Status " + status);
1268                }
1269            }
1270
1271            request.setAttribute ("cryptedComp", cryptedComp);
1272            JahiaAdministration.doRedirect (request,
1273                    response,
1274                    session,
1275                    JSP_PATH + "component_decryptjec.jsp");
1276
1277        } catch (JahiaException je) {
1278            String JavaDoc dspMsg = JahiaResourceBundle.getAdminResource ("org.jahia.admin.JahiaDisplayMessage.requestProcessingError.label",
1279                    jParams, jParams.getLocale ());
1280            request.setAttribute ("jahiaDisplayMessage", dspMsg);
1281            JahiaAdministration.doRedirect (request,
1282                    response,
1283                    session,
1284                    JSP_PATH + "menu.jsp");
1285        }
1286
1287    }
1288
1289
1290} // end ManageComponents
1291
Popular Tags