01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.subscriptions.util;
06:
07: import java.io.*;
08: import java.util.*;
09: import com.sun.portal.providers.context.ProviderContext;
10: import com.sun.portal.providers.ProviderAdapter;
11: import com.sun.portal.desktop.context.PropertiesConfigContext;
12: import com.sun.portal.util.ResourceLoader;
13: import com.sun.portal.admin.common.util.AdminUtil;
14:
15: /**
16: * Utility class for Subscriptions and Profiler
17: *
18: * @author pm95875
19: * @created June 21, 2004
20: */
21: public class Utils {
22: private static String portalId = null;
23:
24: /* getting the portalId from the JVM singleton ResourceLoader
25: */
26: public static String getPortalId() {
27: if (portalId == null) {
28: portalId = ResourceLoader.getInstance(
29: System.getProperties()).getPortalId();
30: if (portalId == null
31: || portalId.equals(AdminUtil.UPGRADED_PORTAL)) {
32: portalId = "";
33: }
34: }
35: return portalId;
36: }
37: }
|