001: /*
002: * File : $Source: /usr/local/cvs/opencms/src-modules/org/opencms/workplace/tools/accounts/CmsEditUserDialog.java,v $
003: * Date : $Date: 2008-02-27 12:05:26 $
004: * Version: $Revision: 1.20 $
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.file.CmsUser;
035: import org.opencms.jsp.CmsJspActionElement;
036: import org.opencms.main.CmsException;
037:
038: import java.util.Map;
039:
040: import javax.servlet.http.HttpServletRequest;
041: import javax.servlet.http.HttpServletResponse;
042: import javax.servlet.jsp.PageContext;
043:
044: /**
045: * Dialog to edit new or existing system user in the administration view.<p>
046: *
047: * @author Michael Moossen
048: *
049: * @version $Revision: 1.20 $
050: *
051: * @since 6.0.0
052: */
053: public class CmsEditUserDialog extends A_CmsEditUserDialog {
054:
055: /**
056: * Public constructor with JSP action element.<p>
057: *
058: * @param jsp an initialized JSP action element
059: */
060: public CmsEditUserDialog(CmsJspActionElement jsp) {
061:
062: super (jsp);
063: }
064:
065: /**
066: * Public constructor with JSP variables.<p>
067: *
068: * @param context the JSP page context
069: * @param req the JSP request
070: * @param res the JSP response
071: */
072: public CmsEditUserDialog(PageContext context,
073: HttpServletRequest req, HttpServletResponse res) {
074:
075: this (new CmsJspActionElement(context, req, res));
076: }
077:
078: /**
079: * @see org.opencms.workplace.tools.accounts.A_CmsEditUserDialog#createUser(java.lang.String, java.lang.String, java.lang.String, java.util.Map)
080: */
081: protected CmsUser createUser(String name, String pwd, String desc,
082: Map info) throws CmsException {
083:
084: return getCms().createUser(name, pwd, desc, info);
085: }
086:
087: /**
088: * @see org.opencms.workplace.tools.accounts.A_CmsEditUserDialog#getListClass()
089: */
090: protected String getListClass() {
091:
092: return CmsUsersList.class.getName();
093: }
094:
095: /**
096: * @see org.opencms.workplace.tools.accounts.A_CmsEditUserDialog#getListRootPath()
097: */
098: protected String getListRootPath() {
099:
100: return "/accounts/orgunit/users";
101: }
102:
103: /**
104: * @see org.opencms.workplace.tools.accounts.A_CmsEditUserDialog#isEditable(org.opencms.file.CmsUser)
105: */
106: protected boolean isEditable(CmsUser user) {
107:
108: return true;
109: }
110:
111: /**
112: * @see org.opencms.workplace.tools.accounts.A_CmsEditUserDialog#writeUser(org.opencms.file.CmsUser)
113: */
114: protected void writeUser(CmsUser user) throws CmsException {
115:
116: getCms().writeUser(user);
117: }
118: }
|