Index: lams_learning/src/java/org/lamsfoundation/lams/learning/export/ExportPortfolioConstants.java =================================================================== diff -u -r24da21a1c6c27b52079395a01057c25f1bda395b -rfc3d08d8dedf10a132cd00ff47b3798cf70526a7 --- lams_learning/src/java/org/lamsfoundation/lams/learning/export/ExportPortfolioConstants.java (.../ExportPortfolioConstants.java) (revision 24da21a1c6c27b52079395a01057c25f1bda395b) +++ lams_learning/src/java/org/lamsfoundation/lams/learning/export/ExportPortfolioConstants.java (.../ExportPortfolioConstants.java) (revision fc3d08d8dedf10a132cd00ff47b3798cf70526a7) @@ -1,25 +1,54 @@ +/*************************************************************************** +* Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +* ============================================================= +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program 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 General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +* USA +* +* http://www.gnu.org/licenses/gpl.txt +* ***********************************************************************/ + /* * Created on Oct 11, 2005 * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates */ package org.lamsfoundation.lams.learning.export; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; + /** * @author mtruong * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates */ public class ExportPortfolioConstants { private ExportPortfolioConstants() {} + public static final String DIR_SUFFIX_EXPORT = "export"; //will appear as the name of the tmp directory created. For eg. lamstmp_1129615396387_export + public static final String DIR_SUFFIX_ZIP = "exportZipFile"; public static final String MAIN_EXPORT_FILENAME = "export_main.html"; - public static final String EXPORT_TMP_DIR = "/tempDirForExportFiles"; - public static final String HOST = "http://localhost:8080"; + public static final String ZIP_FILENAME = "export.zip"; + public static final String HOST = getServerURL(); public static final String SUBDIRECTORY_BASENAME = "Activity"; //subdirectory for each activity is ActivityXX where XX is the activity Id + public static final String PARAM_FILE_LOCATION = "fileLocation"; + public static final String TEMP_DIRECTORY = System.getProperty("java.io.tmpdir"); + private static String getServerURL() + { + return Configuration.get(ConfigurationKeys.SERVER_URL); + } }