001: /**
002: * $Id: WSRPSpecKeys.java,v 1.3 2004/06/28 17:16:50 jtb Exp $
003: * Copyright 2003 Sun Microsystems, Inc. All
004: * rights reserved. Use of this product is subject
005: * to license terms. Federal Acquisitions:
006: * Commercial Software -- Government Users
007: * Subject to Standard License Terms and
008: * Conditions.
009: *
010: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
011: * are trademarks or registered trademarks of Sun Microsystems,
012: * Inc. in the United States and other countries.
013: */package com.sun.portal.wsrp.common;
014:
015: import java.util.*;
016: import com.sun.portal.container.*;
017: import com.sun.portal.wsrp.common.*;
018:
019: public class WSRPSpecKeys {
020:
021: public static final String WSRP_GUEST_KEY = "wsrp:minimal";
022:
023: public static final String COMMON = "wsrp_rewrite";
024: public static final String URL_REWRITE_START = COMMON + "?";
025: public static final String URL_REWRITE_END = "/wsrp_rewrite";
026: public static final String NAMESPACE = COMMON + "_";
027:
028: public static final String NAVIGATIONAL_STATE = "wsrp-navigationalState";
029: public static final String INTERACTION_STATE = "wsrp-interactionState";
030: public static final String FRAGMENT_ID = "wsrp-fragmentID";
031: public static final String URL = "wsrp-url";
032:
033: //
034: // Key and value for wsrp-urlType
035: //
036:
037: public static final String URL_TYPE = "wsrp-urlType";
038: public static final String URL_TYPE_RENDER = "render";
039: public static final String URL_TYPE_BLOCKING_ACTION = "blockingAction";
040: public static final String URL_TYPE_RESOURCE = "resource";
041:
042: //
043: // Key and Values for wsrp-windowState
044: //
045:
046: public static final String WINDOW_STATE = "wsrp-windowState";
047: public static final String WINDOW_STATE_NORMAL = "wsrp:normal";
048: public static final String WINDOW_STATE_MAXIMIZED = "wsrp:maximized";
049: public static final String WINDOW_STATE_MINIMIZED = "wsrp:minimized";
050:
051: //
052: // Key and Values for wsrp-mode
053: //
054:
055: public static final String MODE = "wsrp-mode";
056: public static final String MODE_VIEW = "wsrp:view";
057: public static final String MODE_EDIT = "wsrp:edit";
058: public static final String MODE_HELP = "wsrp:help";
059:
060: //
061: // Key and Values for wsrp-secureURL
062: //
063:
064: public static final String SECURE_URL = "wsrp-secureURL";
065: public static final String SECURE_URL_TRUE = "true";
066: public static final String SECURE_URL_FALSE = "false";
067:
068: //
069: // Key and Values for wsrp-requiresRewrite
070: //
071: public static final String REQUIRES_REWRITE = "wsrp-requiresRewrite";
072: public static final String REQUIRES_REWRITE_TRUE = "true";
073: public static final String REQUIRES_REWRITE_FALSE = "false";
074:
075: //
076: // Key and Values for generic URL rewrite parameters
077: //
078: public static final String GENERIC_PARAM_PORTLET_HANDLE = "wsrp-portletHandle";
079: public static final String GENERIC_PARAM_USER_CONTEXT_KEY = "wsrp-userContextKey";
080: public static final String GENERIC_PARAM_PORTLET_INSTANCE_KEY = "wsrp-portletInstanceKey";
081: public static final String GENERIC_PARAM_SESSION_ID = "wsrp-sessionID";
082:
083: public static List reservedKeys = getReservedKeys();
084:
085: private static List getReservedKeys() {
086: List keys = new ArrayList();
087:
088: keys.add(URL_REWRITE_START);
089: keys.add(URL_REWRITE_END);
090: keys.add(FRAGMENT_ID);
091: keys.add(REQUIRES_REWRITE);
092: keys.add(URL);
093: keys.add(URL_TYPE);
094: keys.add(WINDOW_STATE);
095: keys.add(MODE);
096: keys.add(SECURE_URL);
097:
098: return keys;
099:
100: }
101:
102: public static boolean isReservedKey(String key) {
103: return reservedKeys.contains(key);
104: }
105:
106: //*********************************************
107: // Non url rewritting related strings
108: //*********************************************
109:
110: public static final String CACHE_PER_USER = "wsrp:perUser";
111: public static final String CACHE_FOR_ALL = "wsrp:forAll";
112:
113: public static final String AUTH_PASSWORD = "wsrp:password";
114: public static final String AUTH_NONE = "wsrp:none";
115: public static final String AUTH_CERT = "wsrp:certificate";
116:
117: //
118: // fault messages (from section 13)
119: //
120: public static final String ACCESS_DEFINED = "AccessDenied";
121: public static final String INCONSISTENT_PARAMETERS = "InconsistentParameters";
122: public static final String INVALID_REGISTRATION = "InvalidRegistration";
123: public static final String INVALID_COOKIE = "InvalidCookie";
124: public static final String INVALID_HANDLE = "InvalidHandle";
125: public static final String INVALID_SESSION = "InvalidSession";
126: public static final String INVALID_USER_CATEGORY = "InvalidUserCategory";
127: public static final String MISSING_PARAMETERS = "MissingParameters";
128: public static final String OPERATION_FAILED = "OperationFailed";
129: public static final String PORTLET_STATE_CHANGE_REQUIRED = "PortletStateChangeRequired";
130: public static final String UNSUPPORTED_LOCALE = "UnsupportedLocale";
131: public static final String UNSUPPORTED_MIME_TYPE = "UnsupportedMimeType";
132: public static final String UNSUPPORTED_MODE = "UnsupportedMode";
133: public static final String UNSUPPORTED_WINDOW_STATE = "UnsupportedWindowState";
134: }
|