01: /*
02: * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05:
06: package com.sun.portal.ffj.util;
07:
08: import java.io.*;
09: import java.util.Properties;
10:
11: import org.openide.TopManager;
12: import org.openide.ErrorManager;
13:
14: import com.sun.portal.ffj.filesystems.PSFileSystem;
15:
16: public class PSProperties {
17: //
18: private static final String PROPERTY_FILE_NAME = "/desktop/desktopconfig.properties";
19: private static Properties psProperties = new Properties();
20:
21: //
22: //
23: //
24: static {
25: String pathName = PSFileSystem.getRootPath();
26: pathName += PROPERTY_FILE_NAME;
27:
28: try {
29: psProperties.load(new FileInputStream(pathName));
30: } catch (IOException ioe) {
31: TopManager.getDefault().getErrorManager().notify(
32: ErrorManager.WARNING, ioe);
33: }
34: }
35:
36: //
37: //
38: //
39: public static String getJSPDeployDirectory() {
40: //
41: String retVal = psProperties.getProperty("templateBaseDir");
42: if (!retVal.endsWith(File.separator))
43: retVal += File.separator;
44:
45: String desktopType = psProperties
46: .getProperty("defaultDesktopType");
47:
48: retVal += desktopType;
49:
50: //
51: return retVal;
52: }
53:
54: //
55: //
56: //
57: }
|