01: /*
02: * %W% %G% Sun Microsystems
03: *
04: * Copyright 2000 Sun Microsystems, Inc. All rights reserved.
05: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
06: */
07:
08: package com.sun.portal.wireless.taglibs.ab;
09:
10: import javax.servlet.jsp.*;
11: import javax.servlet.jsp.tagext.*;
12:
13: import com.sun.portal.wireless.taglibs.base.*;
14:
15: /**
16: * The ABContextTag class supports tags which
17: * represent a context for Address book service.
18: *
19: *
20: * @author Mihir Sambhus
21: * @version 1.0
22: * @see ABContext
23: */
24: public class ABContextTag extends ContextTag {
25:
26: /**
27: * Find the saved context or create a new context.
28: *
29: * Typically the context is saved in the session.
30: * If not found then a new context is created and
31: * saved in the session for use later.
32: *
33: * @return the context
34: */
35: public Context findContext() throws Exception {
36: String configNameKey = ABContext.CONTEXT_TYPE + "configName";
37: String ssoAdapterKey = ABContext.CONTEXT_TYPE + "ssoAdapter";
38:
39: computeConfigName(pageContext, configNameKey, ssoAdapterKey,
40: ABContext.SSO_CONFIG_TYPE);
41:
42: return ABContext.getContext(pageContext);
43: }
44:
45: /**
46: * Remove the context this tag represents from all places
47: * it is referred from.
48: *
49: */
50: public void reset() {
51: Context.reset(pageContext, ABContext.CONTEXT_CLASS_NAME,
52: ABContext.CONTEXT_CACHE_CLASS_NAME,
53: ABContext.CONTEXT_TYPE);
54: }
55:
56: public void setProperty(String s) {
57:
58: }
59:
60: }
|