001: /*
002: * File : $Source: /usr/local/cvs/opencms/src-modules/org/opencms/workplace/tools/accounts/CmsShowRoleUsersList.java,v $
003: * Date : $Date: 2008-02-27 12:05:26 $
004: * Version: $Revision: 1.4 $
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.CmsRuntimeException;
037: import org.opencms.main.OpenCms;
038: import org.opencms.security.CmsRole;
039: import org.opencms.workplace.list.CmsListMetadata;
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: * Role users list view.<p>
049: *
050: * @author Raphael Schnuck
051: *
052: * @version $Revision: 1.4 $
053: *
054: * @since 6.5.6
055: */
056: public class CmsShowRoleUsersList extends A_CmsRoleUsersList {
057:
058: /** list id constant. */
059: public static final String LIST_ID = "lsru";
060:
061: /**
062: * Public constructor.<p>
063: *
064: * @param jsp an initialized JSP action element
065: */
066: public CmsShowRoleUsersList(CmsJspActionElement jsp) {
067:
068: this (jsp, LIST_ID);
069: }
070:
071: /**
072: * Public constructor with JSP variables.<p>
073: *
074: * @param context the JSP page context
075: * @param req the JSP request
076: * @param res the JSP response
077: */
078: public CmsShowRoleUsersList(PageContext context,
079: HttpServletRequest req, HttpServletResponse res) {
080:
081: this (new CmsJspActionElement(context, req, res));
082: }
083:
084: /**
085: * Protected constructor.<p>
086: * @param jsp an initialized JSP action element
087: * @param listId the id of the specialized list
088: */
089: protected CmsShowRoleUsersList(CmsJspActionElement jsp,
090: String listId) {
091:
092: super (jsp, listId, Messages.get().container(
093: Messages.GUI_ROLEUSERS_LIST_NAME_0), true);
094: }
095:
096: /**
097: * @see org.opencms.workplace.list.A_CmsListDialog#defaultActionHtmlStart()
098: */
099: public String defaultActionHtmlStart() {
100:
101: return getList().listJs() + dialogContentStart(getParamTitle());
102: }
103:
104: /**
105: * @see org.opencms.workplace.list.A_CmsListDialog#executeListMultiActions()
106: */
107: public void executeListMultiActions() throws CmsRuntimeException {
108:
109: throwListUnsupportedActionException();
110: }
111:
112: /**
113: * @see org.opencms.workplace.list.A_CmsListDialog#executeListSingleActions()
114: */
115: public void executeListSingleActions() {
116:
117: throwListUnsupportedActionException();
118: }
119:
120: /**
121: * @see org.opencms.workplace.tools.accounts.A_CmsRoleUsersList#getUsers(boolean)
122: */
123: protected List getUsers(boolean withOtherOus) throws CmsException {
124:
125: return OpenCms.getRoleManager().getUsersOfRole(getCms(),
126: CmsRole.valueOf(getCms().readGroup(getParamRole())),
127: withOtherOus, false);
128: }
129:
130: /**
131: * @see org.opencms.workplace.list.A_CmsListDialog#setMultiActions(org.opencms.workplace.list.CmsListMetadata)
132: */
133: protected void setMultiActions(CmsListMetadata metadata) {
134:
135: // noop
136: }
137: }
|