View Javadoc
1   /*
2    * Copyright (c) 2002-2014, Mairie de Paris
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */
34  package fr.paris.lutece.portal.service.plugin;
35  
36  import fr.paris.lutece.portal.business.portlet.PortletType;
37  import fr.paris.lutece.portal.business.right.Right;
38  import fr.paris.lutece.portal.service.content.ContentServiceEntry;
39  import fr.paris.lutece.portal.service.daemon.DaemonEntry;
40  import fr.paris.lutece.portal.service.dashboard.DashboardComponentEntry;
41  import fr.paris.lutece.portal.service.filter.FilterEntry;
42  import fr.paris.lutece.portal.service.includes.PageIncludeEntry;
43  import fr.paris.lutece.portal.service.init.LuteceInitException;
44  import fr.paris.lutece.portal.service.insert.InsertService;
45  import fr.paris.lutece.portal.service.rbac.RBACResourceTypeEntry;
46  import fr.paris.lutece.portal.service.search.SearchIndexerEntry;
47  import fr.paris.lutece.portal.service.servlet.ServletEntry;
48  import fr.paris.lutece.portal.service.sessionlistener.HttpSessionListenerEntry;
49  import fr.paris.lutece.portal.service.util.AppPropertiesService;
50  import fr.paris.lutece.portal.web.xpages.XPageApplicationEntry;
51  
52  import org.apache.commons.digester.Digester;
53  import org.apache.commons.digester.Substitutor;
54  import org.apache.commons.digester.substitution.MultiVariableExpander;
55  import org.apache.commons.digester.substitution.VariableSubstitutor;
56  import org.apache.commons.digester.xmlrules.DigesterLoader;
57  
58  import org.xml.sax.SAXException;
59  
60  import java.io.FileInputStream;
61  import java.io.FileNotFoundException;
62  import java.io.IOException;
63  import java.io.InputStream;
64  
65  import java.net.URL;
66  
67  import java.util.ArrayList;
68  import java.util.Collections;
69  import java.util.HashMap;
70  import java.util.List;
71  import java.util.Map;
72  
73  import javax.validation.constraints.NotNull;
74  
75  
76  /**
77   * This class is the plugin file element
78   */
79  public class PluginFile
80  {
81      private static final String FILE_RULES = "/fr/paris/lutece/portal/service/plugin/plugin-digester-rules.xml";
82  
83      // Variables
84      private String _strName;
85      private String _strVersion;
86      private String _strDescription;
87      private String _strProvider;
88      private String _strProviderUrl;
89      private String _strCopyright;
90      private String _strPluginClass;
91      private String _strIconUrl;
92      private String _strDocumentationUrl;
93      private String _strMinCoreVersion;
94      private String _strMaxCoreVersion;
95      private boolean _bIsInstalled;
96      private boolean _bDbPoolRequired;
97      private Map<Integer, List<String>> _listCssStyleSheets = new HashMap<Integer, List<String>>(  );
98      private Map<Integer, List<String>> _listJavascriptFiles = new HashMap<Integer, List<String>>(  );
99      private List<String> _listAdminCssStyleSheets = new ArrayList<String>(  );
100     private List<String> _listAdminJavascriptFiles = new ArrayList<String>(  );
101     private List<String> _listFreemarkerMacrosFiles = new ArrayList<String>(  );
102     private List<Right> _listRights = new ArrayList<Right>(  );
103     private List<PortletType> _listPortletTypes = new ArrayList<PortletType>(  );
104     private List<DaemonEntry> _listDaemons = new ArrayList<DaemonEntry>(  );
105     private List<XPageApplicationEntry> _listApplications = new ArrayList<XPageApplicationEntry>(  );
106     private List<FilterEntry> _listFilters = new ArrayList<FilterEntry>(  );
107     private List<ServletEntry> _listServlets = new ArrayList<ServletEntry>(  );
108     private List<HttpSessionListenerEntry> _listListeners = new ArrayList<HttpSessionListenerEntry>(  );
109     private List<ContentServiceEntry> _listContentServices = new ArrayList<ContentServiceEntry>(  );
110     private List<SearchIndexerEntry> _listSearchIndexers = new ArrayList<SearchIndexerEntry>(  );
111     private List<InsertService> _listInsertServices = new ArrayList<InsertService>(  );
112     private List<RBACResourceTypeEntry> _listRBACResourceTypes = new ArrayList<RBACResourceTypeEntry>(  );
113     private List<PageIncludeEntry> _listPageIncludes = new ArrayList<PageIncludeEntry>(  );
114     private List<DashboardComponentEntry> _listDashboardComponents = new ArrayList<DashboardComponentEntry>(  );
115     private List<DashboardComponentEntry> _listAdminDashboardComponents = new ArrayList<DashboardComponentEntry>(  );
116     private Map<String, String> _mapParams = new HashMap<String, String>(  );
117     private String _strSearchIndexerClass;
118     private String _strCssStylesheetsScope;
119     private String _strJavascriptFilesScope;
120 
121     /**
122      * Load plugin data from the XML file using Jakarta Commons Digester
123      * @param strFilename The XML plugin filename
124      * @throws fr.paris.lutece.portal.service.init.LuteceInitException If a problem occured during the loading
125      */
126     public void load( String strFilename ) throws LuteceInitException
127     {
128         // Configure Digester from XML ruleset
129         URL rules = getClass(  ).getResource( FILE_RULES );
130         Digester digester = DigesterLoader.createDigester( rules );
131 
132         // Allow variables in plugin files
133         MultiVariableExpander expander = new MultiVariableExpander(  );
134         expander.addSource( "$", AppPropertiesService.getPropertiesAsMap(  ) );
135 
136         Substitutor substitutor = new VariableSubstitutor( expander );
137         digester.setSubstitutor( substitutor );
138 
139         // Push empty List onto Digester's Stack
140         digester.push( this );
141         digester.setValidating( false );
142 
143         try
144         {
145             InputStream input = new FileInputStream( strFilename );
146             digester.parse( input );
147         }
148         catch ( FileNotFoundException e )
149         {
150             throw new LuteceInitException( "Error loading plugin file : " + strFilename, e );
151         }
152         catch ( SAXException e )
153         {
154             throw new LuteceInitException( "Error loading plugin file : " + strFilename, e );
155         }
156         catch ( IllegalArgumentException e )
157         {
158             throw new LuteceInitException( "Error loading plugin file : " + strFilename, e );
159         }
160         catch ( IOException e )
161         {
162             throw new LuteceInitException( "Error loading plugin file : " + strFilename, e );
163         }
164     }
165 
166     /**
167      * Returns the name of the plugin
168      *
169      * @return the plugin name as a String
170      */
171     public String getName(  )
172     {
173         return _strName;
174     }
175 
176     /**
177      * Sets the name of the plugin to the specified string.
178      *
179      * @param strName The name of the plugin
180      */
181     public void setName( String strName )
182     {
183         _strName = strName;
184     }
185 
186     /**
187      * Returns the version of the plugin
188      *
189      * @return the plugin version as a String
190      */
191     public String getVersion(  )
192     {
193         return _strVersion;
194     }
195 
196     /**
197      * Sets the version of the plugin to the specified string.
198      *
199      * @param strVersion The version of the plugin
200      */
201     public void setVersion( String strVersion )
202     {
203         _strVersion = strVersion;
204     }
205 
206     /**
207      * Returns the description of the plugin
208      *
209      * @return the plugin description as a String
210      */
211     public String getDescription(  )
212     {
213         return _strDescription;
214     }
215 
216     /**
217      * Sets the description of the plugin to the specified string.
218      *
219      * @param strDescription The description
220      */
221     public void setDescription( String strDescription )
222     {
223         _strDescription = strDescription;
224     }
225 
226     /**
227      * Returns the Provider of the plugin
228      *
229      * @return the plugin Provider as a String
230      */
231     public String getProvider(  )
232     {
233         return _strProvider;
234     }
235 
236     /**
237      * Sets the provider of the plugin to the specified string.
238      *
239      * @param strProvider The provider
240      */
241     public void setProvider( String strProvider )
242     {
243         _strProvider = strProvider;
244     }
245 
246     /**
247      * Returns the Provider's URL of the plugin
248      *
249      * @return the plugin Provider's URL as a String
250      */
251     public String getProviderUrl(  )
252     {
253         return _strProviderUrl;
254     }
255 
256     /**
257      * Sets the provider url to the specified string.
258      *
259      * @param strProviderUrl The url of the provider
260      */
261     public void setProviderUrl( String strProviderUrl )
262     {
263         _strProviderUrl = strProviderUrl;
264     }
265 
266     /**
267      * Returns the Icon's URL of the plugin
268      *
269      * @return the plugin Icon's URL as a String
270      */
271     public String getIconUrl(  )
272     {
273         return _strIconUrl;
274     }
275 
276     /**
277      * Sets the url of the icon of the plugin to the specified string.
278      *
279      * @param strIconUrl The url of the icon
280      */
281     public void setIconUrl( String strIconUrl )
282     {
283         _strIconUrl = strIconUrl;
284     }
285 
286     /**
287      * Returns the Documentation's URL of the plugin
288      *
289      * @return the plugin Documentation's URL as a String
290      */
291     public String getDocumentationUrl(  )
292     {
293         return _strDocumentationUrl;
294     }
295 
296     /**
297      * Sets the url of the Documentation of the plugin to the specified string.
298      *
299      * @param strDocumentationUrl the url of the documentation
300      */
301     public void setDocumentationUrl( String strDocumentationUrl )
302     {
303         _strDocumentationUrl = strDocumentationUrl;
304     }
305 
306     /**
307      * Returns the Copyright of the plugin
308      *
309      * @return the plugin Copyright as a String
310      */
311     public String getCopyright(  )
312     {
313         return _strCopyright;
314     }
315 
316     /**
317      * Sets the copyright of the plugin to the specified string.
318      *
319      * @param strCopyright The copyright
320      */
321     public void setCopyright( String strCopyright )
322     {
323         _strCopyright = strCopyright;
324     }
325 
326     /**
327      * Returns the main Class of the plugin
328      *
329      * @return the Class as a String
330      */
331     public String getPluginClass(  )
332     {
333         return _strPluginClass;
334     }
335 
336     /**
337      * Sets the class name of the plugin to the specified string.
338      *
339      * @param strPluginClass The name of the class
340      */
341     public void setPluginClass( String strPluginClass )
342     {
343         _strPluginClass = strPluginClass;
344     }
345 
346     /**
347      * Returns the installation status of the plugin
348      *
349      * @return the installation status as an int
350      */
351     public boolean isInstalled(  )
352     {
353         return _bIsInstalled;
354     }
355 
356     /**
357      * Sets the boolean wich shows if the plugin is installed
358      *
359      * @param bIsInstalled The installed boolean
360      */
361     public void setIsInstalled( boolean bIsInstalled )
362     {
363         _bIsInstalled = bIsInstalled;
364     }
365 
366     /**
367      * Returns the min core version compatibility for the plugin
368      *
369      * @return the min core version as a String
370      */
371     public String getMinCoreVersion(  )
372     {
373         return _strMinCoreVersion;
374     }
375 
376     /**
377      * Sets the the min core version compatibility for the plugin
378      *
379      * @param strMinCoreVersion The min core version
380      */
381     public void setMinCoreVersion( String strMinCoreVersion )
382     {
383         _strMinCoreVersion = strMinCoreVersion;
384     }
385 
386     /**
387      * Returns the max core version compatibility for the plugin
388      *
389      * @return the max core version as a String
390      */
391     public String getMaxCoreVersion(  )
392     {
393         return _strMaxCoreVersion;
394     }
395 
396     /**
397      * Sets the the max core version compatibility for the plugin
398      *
399      * @param strMaxCoreVersion The max core version
400      */
401     public void setMaxCoreVersion( String strMaxCoreVersion )
402     {
403         _strMaxCoreVersion = strMaxCoreVersion;
404     }
405 
406     /**
407      * convert a mode as a string into an integer
408      * @param mode the mode to convert
409      * @return the mode as an {@link java.lang.Integer} or <code>null</code> if mode is <code>null</code>
410      */
411     private Integer getMode( String mode )
412     {
413         Integer nMode = null;
414 
415         if ( mode != null )
416         {
417             nMode = Integer.valueOf( mode );
418         }
419 
420         return nMode;
421     }
422 
423     /**
424      * Add an CSS stylesheet to the plugin definition with no mode associated
425      * @param strStyleSheet The StyleSheet path
426      */
427     public void addCssStyleSheet( String strStyleSheet )
428     {
429         addCssStyleSheet( strStyleSheet, null );
430     }
431 
432     /**
433      * Add an CSS stylesheet to the plugin definition
434      * @param strStyleSheet The StyleSheet path
435      * @param mode mode associated with the stylesheet. Can be <code>null</code>, must be an integer
436      */
437     public void addCssStyleSheet( String strStyleSheet, String mode )
438     {
439         Integer nMode = getMode( mode );
440         List<String> cssStyleSheets = _listCssStyleSheets.get( nMode );
441 
442         if ( cssStyleSheets == null )
443         {
444             cssStyleSheets = new ArrayList<String>(  );
445             _listCssStyleSheets.put( nMode, cssStyleSheets );
446         }
447 
448         cssStyleSheets.add( strStyleSheet );
449     }
450 
451     /**
452      * Add an CSS stylesheet to the plugin
453      * @param strStyleSheet The StyleSheet path
454      * @since 5.1
455      */
456     public void addAdminCssStyleSheet( String strStyleSheet )
457     {
458         _listAdminCssStyleSheets.add( strStyleSheet );
459     }
460 
461     /**
462      * Add an Javascript File to the plugin
463      * @param strJavascriptFile The Javascript File path
464      * @since 5.1
465      */
466     public void addAdminJavascriptFile( String strJavascriptFile )
467     {
468         _listAdminJavascriptFiles.add( strJavascriptFile );
469     }
470 
471     /**
472      * Returns all CSS Style Sheets of the plugin not associated with a mode
473      * @return The list of CSS Style Sheets not associated with a mode
474      */
475     @NotNull
476     public List<String> getCssStyleSheets(  )
477     {
478         List<String> res = _listCssStyleSheets.get( null );
479 
480         if ( res == null )
481         {
482             return Collections.emptyList(  );
483         }
484 
485         return res;
486     }
487 
488     /**
489      * Return all CSS Style Sheets of the plugin for all modes
490      * @return the list of CSS style Sheets for all modes
491      * @since 5.1.0
492      */
493     @NotNull
494     public Map<Integer, List<String>> getCssStyleSheetsForAllModes(  )
495     {
496         return _listCssStyleSheets;
497     }
498 
499     /**
500      * Add an Javascript File to the plugin definition with no mode associated
501      * @param strJavascriptFile The Javascript File path
502      */
503     public void addJavascriptFile( String strJavascriptFile )
504     {
505         addJavascriptFile( strJavascriptFile, null );
506     }
507 
508     /**
509      * Add an Javascript File to the plugin definition
510      * @param strJavascriptFile The Javascript File path
511      * @param mode mode associated with the Javascript file. Can be <code>null</code>, must be an integer
512      */
513     public void addJavascriptFile( String strJavascriptFile, String mode )
514     {
515         Integer nMode = getMode( mode );
516         List<String> javascriptFiles = _listJavascriptFiles.get( nMode );
517 
518         if ( javascriptFiles == null )
519         {
520             javascriptFiles = new ArrayList<String>(  );
521             _listJavascriptFiles.put( nMode, javascriptFiles );
522         }
523 
524         javascriptFiles.add( strJavascriptFile );
525     }
526 
527     /**
528      * Returns all Javascript File of the plugin not associated with a mode
529      * @return The list of Javascript File not associated with a mode
530      */
531     @NotNull
532     public List<String> getJavascriptFiles(  )
533     {
534         List<String> res = _listJavascriptFiles.get( null );
535 
536         if ( res == null )
537         {
538             return Collections.emptyList(  );
539         }
540 
541         return res;
542     }
543 
544     /**
545      * Return all CSS Style Sheets of the plugin for all modes
546      * @return the list of CSS style Sheets for all modes
547      * @since 5.1.0
548      */
549     @NotNull
550     public Map<Integer, List<String>> getJavascriptFilesForAllModes(  )
551     {
552         return _listJavascriptFiles;
553     }
554 
555     /**
556      * Adds the file to freemarker autoinclude configuration
557      * @param strFileName the file
558      */
559     public void addFreemarkerMacrosFile( String strFileName )
560     {
561         _listFreemarkerMacrosFiles.add( strFileName );
562     }
563 
564     /**
565      * Gets the freemarker macros files.
566      *
567      * @return the freemarker macros files
568      */
569     public List<String> getFreemarkerMacrosFiles(  )
570     {
571         return _listFreemarkerMacrosFiles;
572     }
573 
574     /**
575      * Add an AdminFeature Right to the plugin definition
576      * @param right The Right to Add
577      */
578     public void addRight( Right right )
579     {
580         _listRights.add( right );
581     }
582 
583     /**
584      * Returns right list of the plugin
585      *
586      * @return the list of rights
587      */
588     public List<Right> getRights(  )
589     {
590         // Initialize plugin name attribute of all rights (not made by digester)
591         for ( Right right : _listRights )
592         {
593             right.setPluginName( _strName );
594         }
595 
596         return _listRights;
597     }
598 
599     /**
600      * Add an Application to the plugin definition
601      * @param application The application to Add
602      */
603     public void addXPageApplication( XPageApplicationEntry application )
604     {
605         _listApplications.add( application );
606     }
607 
608     /**
609      * Returns application list of the plugin
610      *
611      * @return the list of applications
612      */
613     public List<XPageApplicationEntry> getXPageApplications(  )
614     {
615         return _listApplications;
616     }
617 
618     /**
619      * Add a filter to the plugin definition
620      * @param entry The filter entry
621      */
622     public void addFilter( FilterEntry entry )
623     {
624         _listFilters.add( entry );
625     }
626 
627     /**
628      * Returns filter list of the plugin
629      *
630      * @return the list of filters
631      */
632     public List<FilterEntry> getFilters(  )
633     {
634         return _listFilters;
635     }
636 
637     /**
638      * Add a servlet to the plugin definition
639      * @param entry The servlet entry
640      */
641     public void addServlet( ServletEntry entry )
642     {
643         _listServlets.add( entry );
644     }
645 
646     /**
647      * Returns servlet list of the plugin
648      *
649      * @return the list of servlets
650      */
651     public List<ServletEntry> getServlets(  )
652     {
653         return _listServlets;
654     }
655 
656     /**
657      * Add a listener to the plugin definition
658      * @param entry The listener entry
659      */
660     public void addListener( HttpSessionListenerEntry entry )
661     {
662         _listListeners.add( entry );
663     }
664 
665     /**
666      * Returns listener list of the plugin
667      * @return the list of listeners
668      */
669     public List<HttpSessionListenerEntry> getListeners(  )
670     {
671         return _listListeners;
672     }
673 
674     /**
675      * Add a portlet type to the plugin definition
676      * @param portletType a portlet type to the plugin definition
677      */
678     public void addPortletType( PortletType portletType )
679     {
680         _listPortletTypes.add( portletType );
681     }
682 
683     /**
684      * Returns the portlet types list of the plugin
685      * @return the portlet types list
686      */
687     public List<PortletType> getPortletTypes(  )
688     {
689         // Initialize plugin name attribute of all rights (not made by digester)
690         for ( PortletType portletType : _listPortletTypes )
691         {
692             portletType.setPluginName( _strName );
693         }
694 
695         return _listPortletTypes;
696     }
697 
698     /**
699      * Add an Content Service to the plugin definition
700      * @param entry The entry
701      */
702     public void addContentService( ContentServiceEntry entry )
703     {
704         _listContentServices.add( entry );
705     }
706 
707     /**
708      * Returns all Content Services of the plugin
709      * @return The list of Content Services
710      */
711     public List<ContentServiceEntry> getContentServices(  )
712     {
713         return _listContentServices;
714     }
715 
716     /**
717      * Add an Insert Service to the plugin definition
718      * @param is The Insert Service
719      */
720     public void addInsertService( InsertService is )
721     {
722         _listInsertServices.add( is );
723     }
724 
725     /**
726      * Returns all Insert Services of the plugin
727      * @return The list of Insert Services
728      */
729     public List<InsertService> getInsertServices(  )
730     {
731         return _listInsertServices;
732     }
733 
734     /**
735      * Add a SearchIndexer to the plugin definition
736      * @param entry The Search Indexer Entry
737      */
738     public void addSearchIndexer( SearchIndexerEntry entry )
739     {
740         _listSearchIndexers.add( entry );
741     }
742 
743     /**
744      * Returns all Search Indexer of the plugin
745      * @return The list of Search Indexers
746      */
747     public List<SearchIndexerEntry> getSearchIndexers(  )
748     {
749         return _listSearchIndexers;
750     }
751 
752     /**
753      * Add an Page Include to the plugin definition
754      * @param entry The Page Include Entry
755      */
756     public void addPageInclude( PageIncludeEntry entry )
757     {
758         _listPageIncludes.add( entry );
759     }
760 
761     /**
762      * Returns all Page Include Services of the plugin
763      * @return The list of Page Include Services
764      */
765     public List<PageIncludeEntry> getPageIncludes(  )
766     {
767         return _listPageIncludes;
768     }
769 
770     /**
771      * Add an Dashboard Component to the plugin definition
772      * @param entry The Dashboard Component Entry
773      */
774     public void addDashboardComponent( DashboardComponentEntry entry )
775     {
776         _listDashboardComponents.add( entry );
777     }
778 
779     /**
780      * Returns all Dashboard Component Services of the plugin
781      * @return The list of Dashboard Component Services
782      */
783     public List<DashboardComponentEntry> getDashboardComponents(  )
784     {
785         return _listDashboardComponents;
786     }
787 
788     /**
789      * Add a {@link DashboardComponentEntry} to the plugin definition
790      * @param dashboardComponent the admin dashboard component
791      */
792     public void addAdminDashboardComponent( DashboardComponentEntry dashboardComponent )
793     {
794         _listAdminDashboardComponents.add( dashboardComponent );
795     }
796 
797     /**
798      * Returns all admin dashbaord compopents of the plugin
799      * @return the list of admin dashbaord components
800      */
801     public List<DashboardComponentEntry> getAdminDashboardComponents(  )
802     {
803         return _listAdminDashboardComponents;
804     }
805 
806     /**
807      * Add an RBAC Resource Type to the plugin definition
808      * @param entry The RBACResourceType
809      */
810     public void addRBACResourceType( RBACResourceTypeEntry entry )
811     {
812         _listRBACResourceTypes.add( entry );
813     }
814 
815     /**
816      * Returns all RBAC Resource Types of the plugin
817      * @return The list of RBACResourceType
818      */
819     public List<RBACResourceTypeEntry> getRBACResourceTypes(  )
820     {
821         return _listRBACResourceTypes;
822     }
823 
824     /**
825      * Add a Daemon to the plugin definition
826      * @param daemonEntry  The daemon entry to add
827      */
828     public void addDaemon( DaemonEntry daemonEntry )
829     {
830         _listDaemons.add( daemonEntry );
831     }
832 
833     /**
834      * Returns all Daemons of the plugin
835      * @return The list of Daemons
836      */
837     public List<DaemonEntry> getDaemons(  )
838     {
839         return _listDaemons;
840     }
841 
842     /**
843      * Returns if the plugin needs a database connection pool
844      *
845      * @return <b>true</b> if the plugin needs a database connection pool, otherwise <b>false</b>
846      */
847     public boolean isDbPoolRequired(  )
848     {
849         return _bDbPoolRequired;
850     }
851 
852     /**
853      * Sets the boolean which shows if a pool is required for the plugin
854      *
855      * @param bDbPoolRequired The required boolean
856      */
857     public void setIsDbPoolRequired( boolean bDbPoolRequired )
858     {
859         _bDbPoolRequired = bDbPoolRequired;
860     }
861 
862     /**
863      * Gets plugin parameters defined in the XML file
864      * @return The hashtable of the parameters
865      */
866     public Map<String, String> getParams(  )
867     {
868         return _mapParams;
869     }
870 
871     /**
872      * Add a parameter to the plugin definition
873      * @param strName The parameter name
874      * @param strValue The parameter value
875      */
876     public void addParameter( String strName, String strValue )
877     {
878         _mapParams.put( strName, strValue );
879     }
880 
881     /**
882      * Returns the SearchIndexer Class of the plugin
883      *
884      * @return the Class as a String
885      * @since 2.0.0
886      */
887     public String getSearchIndexerClass(  )
888     {
889         return _strSearchIndexerClass;
890     }
891 
892     /**
893      * Sets the class service of plugin
894      * @since 2.0.0
895      * @param strSearchIndexerClass The Class name
896      */
897     public void setSearchIndexerClass( String strSearchIndexerClass )
898     {
899         _strSearchIndexerClass = strSearchIndexerClass;
900     }
901 
902     /**
903      * Returns the Css Stylesheet Scope
904      *
905      * @return the scope
906      * @since 3.0.0
907      */
908     public String getCssStylesheetsScope(  )
909     {
910         return _strCssStylesheetsScope;
911     }
912 
913     /**
914      * Sets the css stylesheets scope
915      * @since 3.0.0
916      * @param strCssStylesheetScope The scope
917      */
918     public void setCssStylesheetsScope( String strCssStylesheetScope )
919     {
920         _strCssStylesheetsScope = strCssStylesheetScope;
921     }
922 
923     /**
924      * Returns the javascripts Scope
925      *
926      * @return the scope
927      * @since 3.0.0
928      */
929     public String getJavascriptFilesScope(  )
930     {
931         return _strJavascriptFilesScope;
932     }
933 
934     /**
935      * Sets the javascripts scope
936      * @since 3.0.0
937      * @param strJavascriptFilescope The scope
938      */
939     public void setJavascriptFilesScope( String strJavascriptFilescope )
940     {
941         _strJavascriptFilesScope = strJavascriptFilescope;
942     }
943 
944     /**
945      * Get the list of CSS stylesheets for the admin
946      * @return list of CSS stylesheets for the admin
947      * @since 5.1
948      */
949     public List<String> getAdminCssStyleSheets(  )
950     {
951         return _listAdminCssStyleSheets;
952     }
953 
954     /**
955      * Get the list of Javascript Files for the admin
956      * @return  the list of Javascript Files for the admin
957      * @since 5.1
958      */
959     public List<String> getAdminJavascriptFiles(  )
960     {
961         return _listAdminJavascriptFiles;
962     }
963 }