001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software GmbH & Co. KG, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.workplace.tools.modules;
029
030import org.opencms.file.types.I_CmsResourceType;
031import org.opencms.i18n.CmsMessages;
032import org.opencms.jsp.CmsJspActionElement;
033import org.opencms.main.OpenCms;
034import org.opencms.module.CmsModule;
035import org.opencms.module.CmsModuleDependency;
036import org.opencms.workplace.explorer.CmsExplorerTypeSettings;
037import org.opencms.workplace.list.A_CmsListDialog;
038import org.opencms.workplace.list.CmsListColumnAlignEnum;
039import org.opencms.workplace.list.CmsListColumnDefinition;
040import org.opencms.workplace.list.CmsListDefaultAction;
041import org.opencms.workplace.list.CmsListDirectAction;
042import org.opencms.workplace.list.CmsListItem;
043import org.opencms.workplace.list.CmsListItemDetails;
044import org.opencms.workplace.list.CmsListItemDetailsFormatter;
045import org.opencms.workplace.list.CmsListMetadata;
046import org.opencms.workplace.list.CmsListMultiAction;
047import org.opencms.workplace.list.CmsListOrderEnum;
048import org.opencms.workplace.list.CmsListSearchAction;
049import org.opencms.workplace.tools.CmsToolDialog;
050
051import java.io.IOException;
052import java.util.ArrayList;
053import java.util.HashMap;
054import java.util.Iterator;
055import java.util.List;
056import java.util.Map;
057import java.util.Set;
058
059import javax.servlet.ServletException;
060import javax.servlet.http.HttpServletRequest;
061import javax.servlet.http.HttpServletResponse;
062import javax.servlet.jsp.PageContext;
063
064/**
065 * Main module management view.<p>
066 *
067 * @since 6.0.0
068 */
069public class CmsModulesList extends A_CmsListDialog {
070
071    /** List action delete. */
072    public static final String LIST_ACTION_DELETE = "ad";
073
074    /** list action id constant. */
075    public static final String LIST_ACTION_EDIT = "ae";
076
077    /** List action export. */
078    public static final String LIST_ACTION_EXPORT = "ax";
079
080    /** list action id constant. */
081    public static final String LIST_ACTION_OVERVIEW = "ao";
082
083    /** List column delete. */
084    public static final String LIST_COLUMN_DELETE = "cd";
085
086    /** List column export. */
087    public static final String LIST_COLUMN_EDIT = "ce";
088
089    /** List column export. */
090    public static final String LIST_COLUMN_EXPORT = "cx";
091
092    /** list column id constant. */
093    public static final String LIST_COLUMN_GROUP = "cg";
094
095    /** list column id constant. */
096    public static final String LIST_COLUMN_NAME = "cn";
097
098    /** list column id constant. */
099    public static final String LIST_COLUMN_NICENAME = "cc";
100
101    /** list column id constant. */
102    public static final String LIST_COLUMN_VERSION = "cv";
103
104    /** List detail author info. */
105    public static final String LIST_DETAIL_AUTHORINFO = "da";
106
107    /** List detail dependencies info. */
108    public static final String LIST_DETAIL_DEPENDENCIES = "dd";
109
110    /** List detail  resources info. */
111    public static final String LIST_DETAIL_EXCLUDERESOURCES = "excluderesourcestinfo";
112
113    /** List detail  resources info. */
114    public static final String LIST_DETAIL_RESOURCES = "resourcestinfo";
115
116    /** List detail restypes info. */
117    public static final String LIST_DETAIL_RESTYPES = "restypesinfo";
118
119    /** list id constant. */
120    public static final String LIST_ID = "modules";
121
122    /** List action multi delete. */
123    public static final String LIST_MACTION_DELETE = "md";
124
125    /** Module parameter. */
126    public static final String PARAM_MODULE = "module";
127
128    /** Path to the list buttons. */
129    public static final String PATH_BUTTONS = "tools/modules/buttons/";
130
131    /** Path to the module reports. */
132    public static final String PATH_REPORTS = "/system/workplace/admin/modules/reports/";
133
134    /**
135     * Public constructor.<p>
136     *
137     * @param jsp an initialized JSP action element
138     */
139    public CmsModulesList(CmsJspActionElement jsp) {
140
141        super(
142            jsp,
143            LIST_ID,
144            Messages.get().container(Messages.GUI_MODULES_LIST_NAME_0),
145            LIST_COLUMN_NAME,
146            CmsListOrderEnum.ORDER_ASCENDING,
147            null);
148    }
149
150    /**
151     * Public constructor with JSP variables.<p>
152     *
153     * @param context the JSP page context
154     * @param req the JSP request
155     * @param res the JSP response
156     */
157    public CmsModulesList(PageContext context, HttpServletRequest req, HttpServletResponse res) {
158
159        this(new CmsJspActionElement(context, req, res));
160    }
161
162    /**
163     * @see org.opencms.workplace.list.A_CmsListDialog#executeListMultiActions()
164     */
165    @Override
166    public void executeListMultiActions() throws IOException, ServletException {
167
168        if (getParamListAction().equals(LIST_MACTION_DELETE)) {
169            String moduleList = "";
170            // execute the delete multiaction
171            Iterator itItems = getSelectedItems().iterator();
172            StringBuffer modules = new StringBuffer(32);
173            while (itItems.hasNext()) {
174                CmsListItem listItem = (CmsListItem)itItems.next();
175                modules.append(listItem.getId());
176                modules.append(",");
177            }
178            moduleList = new String(modules);
179            moduleList = moduleList.substring(0, moduleList.length() - 1);
180            Map params = new HashMap();
181            params.put(PARAM_MODULE, moduleList);
182            params.put(PARAM_ACTION, DIALOG_INITIAL);
183            params.put(PARAM_STYLE, CmsToolDialog.STYLE_NEW);
184            getToolManager().jspForwardPage(this, PATH_REPORTS + "delete.jsp", params);
185        }
186        listSave();
187    }
188
189    /**
190     * @see org.opencms.workplace.list.A_CmsListDialog#executeListSingleActions()
191     */
192    @Override
193    public void executeListSingleActions() throws IOException, ServletException {
194
195        String module = getSelectedItem().getId();
196        Map params = new HashMap();
197        params.put(PARAM_MODULE, module);
198        if (getParamListAction().equals(LIST_ACTION_EDIT)) {
199            // forward to the edit module screen
200            params.put(PARAM_ACTION, DIALOG_INITIAL);
201            getToolManager().jspForwardTool(this, "/modules/edit/edit", params);
202        } else if (getParamListAction().equals(LIST_ACTION_OVERVIEW)) {
203            // edit a module from the list
204            // go to the module overview screen
205            params.put(PARAM_ACTION, DIALOG_INITIAL);
206            getToolManager().jspForwardTool(this, "/modules/edit", params);
207        } else if (getParamListAction().equals(LIST_ACTION_DELETE)) {
208            // forward to the delete module screen
209            params.put(PARAM_ACTION, DIALOG_INITIAL);
210            params.put(PARAM_STYLE, CmsToolDialog.STYLE_NEW);
211            getToolManager().jspForwardPage(this, PATH_REPORTS + "delete.jsp", params);
212        } else if (getParamListAction().equals(LIST_ACTION_EXPORT)) {
213            // forward to the delete module screen
214            params.put(PARAM_ACTION, DIALOG_INITIAL);
215            params.put(PARAM_STYLE, CmsToolDialog.STYLE_NEW);
216            getToolManager().jspForwardPage(this, "/system/workplace/admin/modules/reports/export.jsp", params);
217        }
218        listSave();
219    }
220
221    /**
222     * @see org.opencms.workplace.list.A_CmsListDialog#fillDetails(java.lang.String)
223     */
224    @Override
225    protected void fillDetails(String detailId) {
226
227        // get content
228        List moduleNames = getList().getAllContent();
229        Iterator i = moduleNames.iterator();
230        CmsMessages messages = Messages.get().getBundle(getLocale());
231        while (i.hasNext()) {
232            CmsListItem item = (CmsListItem)i.next();
233            String moduleName = item.getId();
234            CmsModule module = OpenCms.getModuleManager().getModule(moduleName);
235            StringBuffer html = new StringBuffer(32);
236            if (detailId.equals(LIST_DETAIL_AUTHORINFO)) {
237                // author
238                html.append(module.getAuthorName());
239                html.append("&nbsp;(");
240                html.append(module.getAuthorEmail());
241                html.append(")");
242            } else if (detailId.equals(LIST_DETAIL_RESOURCES)) {
243                //resources
244                Iterator j = module.getResources().iterator();
245                while (j.hasNext()) {
246                    String resource = (String)j.next();
247                    html.append(resource);
248                    html.append("<br>");
249                }
250            } else if (detailId.equals(LIST_DETAIL_EXCLUDERESOURCES)) {
251                //exclude resources
252                Iterator j = module.getExcludeResources().iterator();
253                while (j.hasNext()) {
254                    String resource = (String)j.next();
255                    html.append(resource);
256                    html.append("<br>");
257                }
258            } else if (detailId.equals(LIST_DETAIL_DEPENDENCIES)) {
259                // dependencies
260                Iterator k = module.getDependencies().iterator();
261                while (k.hasNext()) {
262                    CmsModuleDependency dep = (CmsModuleDependency)k.next();
263                    html.append(dep.getName());
264                    html.append("&nbsp;Version:");
265                    html.append(dep.getVersion());
266                    html.append("<br>");
267                }
268            } else if (detailId.equals(LIST_DETAIL_RESTYPES)) {
269                // resourcetypes
270                StringBuffer restypes = new StringBuffer(32);
271                Iterator l = module.getResourceTypes().iterator();
272                boolean addRestypes = false;
273                while (l.hasNext()) {
274                    addRestypes = true;
275                    I_CmsResourceType resourceType = (I_CmsResourceType)l.next();
276                    restypes.append(messages.key(Messages.GUI_MODULES_LABEL_RESTYPES_DETAIL_0));
277                    restypes.append(":&nbsp;");
278                    restypes.append(resourceType.getTypeName());
279                    restypes.append("&nbsp;ID:");
280                    restypes.append(resourceType.getTypeId());
281                    restypes.append("<br>");
282                }
283                StringBuffer explorersettings = new StringBuffer(32);
284                Iterator m = module.getExplorerTypes().iterator();
285                boolean addExplorersettings = false;
286                while (m.hasNext()) {
287                    addExplorersettings = true;
288                    CmsExplorerTypeSettings settings = (CmsExplorerTypeSettings)m.next();
289                    explorersettings.append(messages.key(Messages.GUI_MODULES_LABEL_EXPLORERSETTINGSS_DETAIL_0));
290                    explorersettings.append(":&nbsp;");
291                    explorersettings.append(settings.getName());
292                    explorersettings.append("&nbsp;(");
293                    explorersettings.append(settings.getReference());
294                    explorersettings.append(")<br>");
295                }
296
297                if (addRestypes) {
298                    html.append(restypes);
299                }
300                if (addExplorersettings) {
301                    html.append(explorersettings);
302                }
303            } else {
304                continue;
305            }
306            item.set(detailId, html.toString());
307        }
308    }
309
310    /**
311     * @see org.opencms.workplace.list.A_CmsListDialog#getListItems()
312     */
313    @Override
314    protected List getListItems() {
315
316        List ret = new ArrayList();
317        // get content
318        Set moduleNames = OpenCms.getModuleManager().getModuleNames();
319        Iterator i = moduleNames.iterator();
320        while (i.hasNext()) {
321            String moduleName = (String)i.next();
322            CmsModule module = OpenCms.getModuleManager().getModule(moduleName);
323            CmsListItem item = getList().newItem(module.getName());
324            // name
325            item.set(LIST_COLUMN_NAME, moduleName);
326            // nicename
327            item.set(LIST_COLUMN_NICENAME, module.getNiceName());
328            //version
329            item.set(LIST_COLUMN_VERSION, module.getVersion());
330            //group
331            item.set(LIST_COLUMN_GROUP, module.getGroup());
332            ret.add(item);
333        }
334        return ret;
335    }
336
337    /**
338     * @see org.opencms.workplace.CmsWorkplace#initMessages()
339     */
340    @Override
341    protected void initMessages() {
342
343        // add specific dialog resource bundle
344        addMessages(Messages.get().getBundleName());
345        // add default resource bundles
346        super.initMessages();
347    }
348
349    /**
350     * @see org.opencms.workplace.list.A_CmsListDialog#setColumns(org.opencms.workplace.list.CmsListMetadata)
351     */
352    @Override
353    protected void setColumns(CmsListMetadata metadata) {
354
355        //add column for edit action
356        CmsListColumnDefinition editCol = new CmsListColumnDefinition(LIST_COLUMN_EDIT);
357        editCol.setName(Messages.get().container(Messages.GUI_MODULES_LIST_COLS_EDIT_0));
358        editCol.setWidth("20");
359        editCol.setSorteable(false);
360        editCol.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER);
361        // add the edit action
362        CmsListDirectAction editColAction = new CmsListDirectAction(LIST_ACTION_EDIT);
363        editColAction.setName(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_EDIT_NAME_0));
364        editColAction.setHelpText(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_EDIT_HELP_0));
365        editColAction.setIconPath(PATH_BUTTONS + "modules.png");
366        editColAction.setEnabled(true);
367        editColAction.setConfirmationMessage(null);
368        editCol.addDirectAction(editColAction);
369        metadata.addColumn(editCol);
370
371        // add column for export action
372        CmsListColumnDefinition expCol = new CmsListColumnDefinition(LIST_COLUMN_EXPORT);
373        expCol.setName(Messages.get().container(Messages.GUI_MODULES_LIST_COLS_EXPORT_0));
374        expCol.setWidth("20");
375        expCol.setSorteable(false);
376        expCol.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER);
377        // direct action: export module
378        CmsListDirectAction expModule = new CmsListDirectAction(LIST_ACTION_EXPORT);
379        expModule.setName(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_EXPORT_NAME_0));
380        expModule.setConfirmationMessage(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_EXPORT_CONF_0));
381        expModule.setIconPath(PATH_BUTTONS + "export.png");
382        expModule.setEnabled(true);
383        expModule.setHelpText(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_EXPORT_HELP_0));
384        expCol.addDirectAction(expModule);
385        metadata.addColumn(expCol);
386
387        // add column for delete action
388        CmsListColumnDefinition delCol = new CmsListColumnDefinition(LIST_COLUMN_DELETE);
389        delCol.setName(Messages.get().container(Messages.GUI_MODULES_LIST_COLS_DELETE_0));
390        delCol.setWidth("20");
391        delCol.setSorteable(false);
392        delCol.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER);
393        // direct action: delete module
394        CmsListDirectAction delModule = new CmsListDirectAction(LIST_ACTION_DELETE);
395        delModule.setName(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_DELETE_NAME_0));
396        delModule.setConfirmationMessage(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_DELETE_CONF_0));
397        delModule.setIconPath(ICON_DELETE);
398        delModule.setEnabled(true);
399        delModule.setHelpText(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_DELETE_HELP_0));
400        delCol.addDirectAction(delModule);
401        metadata.addColumn(delCol);
402
403        // add column for name
404        CmsListColumnDefinition nameCol = new CmsListColumnDefinition(LIST_COLUMN_NAME);
405        nameCol.setName(Messages.get().container(Messages.GUI_MODULES_LIST_COLS_NAME_0));
406        nameCol.setWidth("30%");
407        nameCol.setAlign(CmsListColumnAlignEnum.ALIGN_LEFT);
408        // create default edit action for name column: edit module
409        CmsListDefaultAction nameColAction = new CmsListDefaultAction(LIST_ACTION_OVERVIEW);
410        nameColAction.setName(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_OVERVIEW_NAME_0));
411        nameColAction.setIconPath(null);
412        nameColAction.setHelpText(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_OVERVIEW_HELP_0));
413        nameColAction.setEnabled(true);
414        nameColAction.setConfirmationMessage(null);
415        // set action for the name column
416        nameCol.addDefaultAction(nameColAction);
417        metadata.addColumn(nameCol);
418
419        // add column for nicename
420        CmsListColumnDefinition nicenameCol = new CmsListColumnDefinition(LIST_COLUMN_NICENAME);
421        nicenameCol.setName(Messages.get().container(Messages.GUI_MODULES_LIST_COLS_NICENAME_0));
422        nicenameCol.setWidth("50%");
423        nicenameCol.setAlign(CmsListColumnAlignEnum.ALIGN_LEFT);
424        metadata.addColumn(nicenameCol);
425
426        // add column for group
427        CmsListColumnDefinition groupCol = new CmsListColumnDefinition(LIST_COLUMN_GROUP);
428        groupCol.setName(Messages.get().container(Messages.GUI_MODULES_LIST_COLS_GROUP_0));
429        groupCol.setWidth("10%");
430        groupCol.setAlign(CmsListColumnAlignEnum.ALIGN_LEFT);
431        CmsModulesListGroupFormatter groupFormatter = new CmsModulesListGroupFormatter();
432        groupCol.setFormatter(groupFormatter);
433        metadata.addColumn(groupCol);
434
435        // add column for version
436        CmsListColumnDefinition versionCol = new CmsListColumnDefinition(LIST_COLUMN_VERSION);
437        versionCol.setName(Messages.get().container(Messages.GUI_MODULES_LIST_COLS_VERSION_0));
438        versionCol.setWidth("10%");
439        versionCol.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER);
440        metadata.addColumn(versionCol);
441
442    }
443
444    /**
445     * @see org.opencms.workplace.list.A_CmsListDialog#setIndependentActions(org.opencms.workplace.list.CmsListMetadata)
446     */
447    @Override
448    protected void setIndependentActions(CmsListMetadata metadata) {
449
450        // create list item detail
451        CmsListItemDetails modulesAuthorInfoDetails = new CmsListItemDetails(LIST_DETAIL_AUTHORINFO);
452        modulesAuthorInfoDetails.setAtColumn(LIST_COLUMN_NAME);
453        modulesAuthorInfoDetails.setVisible(false);
454        modulesAuthorInfoDetails.setFormatter(
455            new CmsListItemDetailsFormatter(Messages.get().container(Messages.GUI_MODULES_LABEL_AUTHOR_0)));
456        modulesAuthorInfoDetails.setShowActionName(
457            Messages.get().container(Messages.GUI_MODULES_DETAIL_SHOW_AUTHORINFO_NAME_0));
458        modulesAuthorInfoDetails.setShowActionHelpText(
459            Messages.get().container(Messages.GUI_MODULES_DETAIL_SHOW_AUTHORINFO_HELP_0));
460        modulesAuthorInfoDetails.setHideActionName(
461            Messages.get().container(Messages.GUI_MODULES_DETAIL_HIDE_AUTHORINFO_NAME_0));
462        modulesAuthorInfoDetails.setHideActionHelpText(
463            Messages.get().container(Messages.GUI_MODULES_DETAIL_HIDE_AUTHORINFO_HELP_0));
464
465        // add author info item detail to meta data
466        metadata.addItemDetails(modulesAuthorInfoDetails);
467
468        // create list item detail
469        CmsListItemDetails resourcesDetails = new CmsListItemDetails(LIST_DETAIL_RESOURCES);
470        resourcesDetails.setAtColumn(LIST_COLUMN_NAME);
471        resourcesDetails.setVisible(false);
472        resourcesDetails.setFormatter(
473            new CmsListItemDetailsFormatter(Messages.get().container(Messages.GUI_MODULES_LABEL_RESOURCES_0)));
474        resourcesDetails.setShowActionName(Messages.get().container(Messages.GUI_MODULES_DETAIL_SHOW_RESOURCES_NAME_0));
475        resourcesDetails.setShowActionHelpText(
476            Messages.get().container(Messages.GUI_MODULES_DETAIL_SHOW_RESOURCES_HELP_0));
477        resourcesDetails.setHideActionName(Messages.get().container(Messages.GUI_MODULES_DETAIL_HIDE_RESOURCES_NAME_0));
478        resourcesDetails.setHideActionHelpText(
479            Messages.get().container(Messages.GUI_MODULES_DETAIL_HIDE_RESOURCES_HELP_0));
480
481        // add resources info item detail to meta data
482        metadata.addItemDetails(resourcesDetails);
483
484        // create list item detail
485        CmsListItemDetails dependenciesDetails = new CmsListItemDetails(LIST_DETAIL_DEPENDENCIES);
486        dependenciesDetails.setAtColumn(LIST_COLUMN_NAME);
487        dependenciesDetails.setVisible(false);
488        dependenciesDetails.setFormatter(
489            new CmsListItemDetailsFormatter(Messages.get().container(Messages.GUI_MODULES_LABEL_DEPENDENCIES_0)));
490        dependenciesDetails.setShowActionName(
491            Messages.get().container(Messages.GUI_MODULES_DETAIL_SHOW_DEPENDENCIES_NAME_0));
492        dependenciesDetails.setShowActionHelpText(
493            Messages.get().container(Messages.GUI_MODULES_DETAIL_SHOW_DEPENDENCIES_HELP_0));
494        dependenciesDetails.setHideActionName(
495            Messages.get().container(Messages.GUI_MODULES_DETAIL_HIDE_DEPENDENCIES_NAME_0));
496        dependenciesDetails.setHideActionHelpText(
497            Messages.get().container(Messages.GUI_MODULES_DETAIL_HIDE_DEPENDENCIES_HELP_0));
498
499        // add dependencies item detail to meta data
500        metadata.addItemDetails(dependenciesDetails);
501
502        // create list item detail
503        CmsListItemDetails restypesDetails = new CmsListItemDetails(LIST_DETAIL_RESTYPES);
504        restypesDetails.setAtColumn(LIST_COLUMN_NAME);
505        restypesDetails.setVisible(false);
506        restypesDetails.setFormatter(
507            new CmsListItemDetailsFormatter(Messages.get().container(Messages.GUI_MODULES_LABEL_RESTYPES_0)));
508        restypesDetails.setShowActionName(Messages.get().container(Messages.GUI_MODULES_DETAIL_SHOW_RESTYPES_NAME_0));
509        restypesDetails.setShowActionHelpText(
510            Messages.get().container(Messages.GUI_MODULES_DETAIL_SHOW_RESTYPES_HELP_0));
511        restypesDetails.setHideActionName(Messages.get().container(Messages.GUI_MODULES_DETAIL_HIDE_RESTYPES_NAME_0));
512        restypesDetails.setHideActionHelpText(
513            Messages.get().container(Messages.GUI_MODULES_DETAIL_HIDE_RESTYPES_HELP_0));
514
515        // add restypes item detail to meta data
516        metadata.addItemDetails(restypesDetails);
517
518        // makes the list searchable
519        CmsListSearchAction searchAction = new CmsListSearchAction(metadata.getColumnDefinition(LIST_COLUMN_NAME));
520        searchAction.addColumn(metadata.getColumnDefinition(LIST_COLUMN_GROUP));
521        metadata.setSearchAction(searchAction);
522
523    }
524
525    /**
526     * @see org.opencms.workplace.list.A_CmsListDialog#setMultiActions(org.opencms.workplace.list.CmsListMetadata)
527     */
528    @Override
529    protected void setMultiActions(CmsListMetadata metadata) {
530
531        // add the delete module multi action
532        CmsListMultiAction deleteModules = new CmsListMultiAction(LIST_MACTION_DELETE);
533        deleteModules.setName(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_MDELETE_NAME_0));
534        deleteModules.setConfirmationMessage(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_MDELETE_CONF_0));
535        deleteModules.setIconPath(ICON_MULTI_DELETE);
536        deleteModules.setEnabled(true);
537        deleteModules.setHelpText(Messages.get().container(Messages.GUI_MODULES_LIST_ACTION_MDELETE_HELP_0));
538        metadata.addMultiAction(deleteModules);
539    }
540
541}