01: /**
02: * $Id: NetFileContext.java,v 1.13 2005/07/16 18:32:55 aa147324 Exp $
03: * Copyright 2002 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */
14:
15: /**
16: * This interface defines the methods to access DSAME
17: * from the NetFile application
18: *
19: * This interface defines methods to verify if for a user
20: * policy and service have been assigned individually or as
21: * a whole.
22: *
23: * It also has methods to detemine the session validity,
24: * saving preferences and loading preferences
25: *
26: * @author Suresh Yellamaraju
27: */package com.sun.portal.netfile.servlet.java1;
28:
29: import java.util.Hashtable;
30: import com.sun.portal.log.common.PortalLogger;
31: import java.util.Map;
32: import java.util.Locale;
33: import java.util.List;
34:
35: import javax.servlet.http.*;
36:
37: import com.iplanet.sso.SSOToken;
38: import com.iplanet.sso.SSOException;
39: import com.iplanet.am.sdk.AMException;
40:
41: public interface NetFileContext {
42:
43: /*
44: * The list of services currently referenced by NetFile
45: */
46: public static final String SRAP_NETFILE_SERVICE = "srapNetFileService";
47: public static final String DSAME_USER_SERVICE = "iPlanetAMUserService";
48: public static final String IPS_SSO_ADAPTER_SERVICE = "SunSSOAdapterService";
49: public static final String IPS_SSO_ADAPTER_CONFIG = "sunSSOAdapterConfigurations";
50: public static final String IS_SVC_VERSION = "1.0";
51:
52: /*
53: * Public API that should be implemented
54: * for access by NetFile classes
55: */
56: public Map[] getPreferences();
57:
58: public Map getUserPreferences() throws Exception;
59:
60: public String getMailPreferences();
61:
62: public Hashtable getMailAttributesAsCollection();
63:
64: public java.util.List getOrganizationAttributeValues(
65: String serviceName, String attributeName);
66:
67: public String getOrganizationAttribute(String szServiceName,
68: String szAttributeName, String szDefaultVal);
69:
70: public boolean savePreferences(Map prefs) throws Exception;
71:
72: public boolean isExecutable(SSOToken token);
73:
74: public boolean isSessionValid(SSOToken ssoToken);
75:
76: public boolean isPolicyAssigned(SSOToken ssoToken)
77: throws AMException, SSOException;
78:
79: public boolean isServiceAssigned(String szServiceName)
80: throws AMException, SSOException;
81:
82: public void determineHTMLCharset(HttpServletRequest req);
83:
84: public String getHTMLCharset();
85:
86: public Locale getUserLocale();
87:
88: }
|