📄 cmsxmlwpconfigfile.java
字号:
/*
* File : $Source: /usr/local/cvs/opencms/src/com/opencms/workplace/CmsXmlWpConfigFile.java,v $
* Date : $Date: 2002/05/02 07:15:50 $
* Version: $Revision: 1.39 $
*
* This library is part of OpenCms -
* the Open Source Content Mananagement System
*
* Copyright (C) 2001 The OpenCms Group
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* For further information about OpenCms, please see the
* OpenCms Website: http://www.opencms.org
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.opencms.workplace;
import com.opencms.file.*;
import com.opencms.core.*;
import com.opencms.template.*;
import org.w3c.dom.*;
import org.xml.sax.*;
import java.util.*;
import javax.servlet.http.*;
/**
* Definition of some paths for the workplace. Currently some are static,
* but can be switched to read from configurations like registry.
*
* @author Alexander Lucas
* @author Michael Emmerich
* @author Andreas Schouten
* @version $Revision: 1.39 $ $Date: 2002/05/02 07:15:50 $
*/
public class CmsXmlWpConfigFile {
/** The cms object to get access to OpenCms */
private CmsObject m_cms = null;
/**
* Default constructor.
*/
public CmsXmlWpConfigFile() throws CmsException {
}
/**
* Constructor for creating a new config file object.
* The parameter cms is not needed at the moment.
*
* @param cms CmsObject object for accessing system resources.
*/
public CmsXmlWpConfigFile(CmsObject cms) throws CmsException {
m_cms = cms;
}
/**
* Gets the path at which the folders with the download galleries are
* @return Path for download galleries.
* @exception CmsException if the corresponding XML tag doesn't exist in the workplace definition file.
*/
public String getDownGalleryPath() throws CmsException {
return "/download/";
}
/**
* Gets the path at which the folders with the picture galleries are
* @return Path for picture galleries.
* @exception CmsException if the corresponding XML tag doesn't exist in the workplace definition file.
*/
public String getPicGalleryPath() throws CmsException {
return "/pics/";
}
/**
* Gets the path for OpenCms language files.
* @return Path for language files.
* @exception CmsException if the corresponding XML tag doesn't exist in the workplace definition file.
*/
public String getLanguagePath() throws CmsException {
return "/system/workplace/config/language/";
}
/**
* Gets the path for OpenCms workplace action files.
* @return Path for OpenCms workplace action files.
* @exception CmsException if the corresponding XML tag doesn't exist in the workplace definition file.
*/
public String getWorkplaceActionPath() throws CmsException {
return "/system/workplace/action/";
}
/**
* Gets the path for OpenCms workplace administration files.
* @return Path for OpenCms workplace administration files.
* @exception CmsException if the corresponding XML tag doesn't exist in the workplace definition file.
*/
public String getWorkplaceAdministrationPath() throws CmsException {
return "/system/workplace/administration/";
}
/**
* Gets the path for system picture files.
* @return Path for picture files.
* @exception CmsException if the corresponding XML tag doesn't exist in the workplace definition file.
*/
public String getWpPicturePath() throws CmsException {
if(new Boolean(OpenCms.getRegistry().getSystemValue("UseWpPicturesFromVFS")).booleanValue()) {
// read the wp images from the vfs - so add the servlet url to the return value
return m_cms.getRequestContext().getRequest().getServletUrl() + "/pics/system/";
} else {
// read the wp images from the webapps context
return "/pics/system/";
}
}
public void getWorkplaceIniData(Vector names, Vector values, String tag, String element) throws CmsException {
if(tag.equals("NEWRESOURCES")) {
names.add("folder"); values.add("explorer_files_new_folder.html");
names.add("page"); values.add("explorer_files_new_page.html");
// names.add("pdfpage"); values.add("explorer_files_new_pdfpage.html");
names.add("gemadipage"); values.add("explorer_files_new_gemadipage.html");
names.add("link"); values.add("explorer_files_new_link.html");
names.add("othertype"); values.add("explorer_files_new_othertype.html");
names.add("upload"); values.add("explorer_files_new_upload.html");
} else {
names.add("binary"); values.add("binary");
names.add("plain"); values.add("plain");
names.add("image"); values.add("image");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -