001: /*
002: * File : $Source: /usr/local/cvs/opencms/src-modules/org/opencms/workplace/tools/accounts/CmsGroupsList.java,v $
003: * Date : $Date: 2008-02-27 12:05:26 $
004: * Version: $Revision: 1.17 $
005: *
006: * This library is part of OpenCms -
007: * the Open Source Content Management System
008: *
009: * Copyright (c) 2002 - 2008 Alkacon Software GmbH (http://www.alkacon.com)
010: *
011: * This library is free software; you can redistribute it and/or
012: * modify it under the terms of the GNU Lesser General Public
013: * License as published by the Free Software Foundation; either
014: * version 2.1 of the License, or (at your option) any later version.
015: *
016: * This library is distributed in the hope that it will be useful,
017: * but WITHOUT ANY WARRANTY; without even the implied warranty of
018: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019: * Lesser General Public License for more details.
020: *
021: * For further information about Alkacon Software GmbH, please see the
022: * company website: http://www.alkacon.com
023: *
024: * For further information about OpenCms, please see the
025: * project website: http://www.opencms.org
026: *
027: * You should have received a copy of the GNU Lesser General Public
028: * License along with this library; if not, write to the Free Software
029: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
030: */
031:
032: package org.opencms.workplace.tools.accounts;
033:
034: import org.opencms.jsp.CmsJspActionElement;
035: import org.opencms.main.CmsException;
036: import org.opencms.main.OpenCms;
037: import org.opencms.security.CmsPrincipal;
038: import org.opencms.workplace.list.CmsListColumnDefinition;
039: import org.opencms.workplace.list.CmsListDirectAction;
040:
041: import java.util.List;
042:
043: import javax.servlet.http.HttpServletRequest;
044: import javax.servlet.http.HttpServletResponse;
045: import javax.servlet.jsp.PageContext;
046:
047: /**
048: * Main group management view.<p>
049: *
050: * @author Michael Moossen
051: *
052: * @version $Revision: 1.17 $
053: *
054: * @since 6.0.0
055: */
056: public class CmsGroupsList extends A_CmsGroupsList {
057:
058: /** list id constant. */
059: public static final String LIST_ID = "lg";
060:
061: /**
062: * Public constructor.<p>
063: *
064: * @param jsp an initialized JSP action element
065: */
066: public CmsGroupsList(CmsJspActionElement jsp) {
067:
068: super (jsp, LIST_ID, Messages.get().container(
069: Messages.GUI_GROUPS_LIST_NAME_0));
070: }
071:
072: /**
073: * Public constructor with JSP variables.<p>
074: *
075: * @param context the JSP page context
076: * @param req the JSP request
077: * @param res the JSP response
078: */
079: public CmsGroupsList(PageContext context, HttpServletRequest req,
080: HttpServletResponse res) {
081:
082: this (new CmsJspActionElement(context, req, res));
083: }
084:
085: /**
086: * @see org.opencms.workplace.tools.accounts.A_CmsGroupsList#getGroups()
087: */
088: protected List getGroups() throws CmsException {
089:
090: return CmsPrincipal.filterCore(OpenCms.getOrgUnitManager()
091: .getGroups(getCms(), getParamOufqn(), false));
092: }
093:
094: /**
095: * @see org.opencms.workplace.tools.accounts.A_CmsGroupsList#setDeleteAction(org.opencms.workplace.list.CmsListColumnDefinition)
096: */
097: protected void setDeleteAction(CmsListColumnDefinition deleteCol) {
098:
099: CmsListDirectAction deleteAction = new CmsListDirectAction(
100: LIST_ACTION_DELETE);
101: deleteAction.setName(Messages.get().container(
102: Messages.GUI_GROUPS_LIST_ACTION_DELETE_NAME_0));
103: deleteAction.setHelpText(Messages.get().container(
104: Messages.GUI_GROUPS_LIST_ACTION_DELETE_HELP_0));
105: deleteAction.setIconPath(ICON_DELETE);
106: deleteCol.addDirectAction(deleteAction);
107: }
108:
109: /**
110: * @see org.opencms.workplace.tools.accounts.A_CmsGroupsList#setEditAction(org.opencms.workplace.list.CmsListColumnDefinition)
111: */
112: protected void setEditAction(CmsListColumnDefinition editCol) {
113:
114: CmsListDirectAction editAction = new CmsListDirectAction(
115: LIST_ACTION_EDIT);
116: editAction.setName(Messages.get().container(
117: Messages.GUI_GROUPS_LIST_ACTION_EDIT_NAME_0));
118: editAction.setHelpText(Messages.get().container(
119: Messages.GUI_GROUPS_LIST_ACTION_EDIT_HELP_0));
120: editAction.setIconPath(A_CmsUsersList.PATH_BUTTONS
121: + "group.png");
122: editCol.addDirectAction(editAction);
123: }
124: }
|