001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.cocoon.webapps.portal;
018:
019: /**
020: * Some constants for the portal
021: *
022: * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
023: * @version CVS $Id: PortalConstants.java 433543 2006-08-22 06:22:54Z crossley $
024: */
025: public interface PortalConstants {
026:
027: /** The name of the portal context. */
028: String SESSION_CONTEXT_NAME = "portal";
029:
030: /** The private context of the portal profile. Some more information
031: * is appended by the PortalManager to this key.
032: */
033: String PRIVATE_SESSION_CONTEXT_NAME = "org.apache.cocoon.webapps.portal.context.SessionContext";
034:
035: /** The Module name of the authentication module */
036: String AUTHENTICATION_MODULE_NAME = "portal";
037:
038: /** If a coplet is loaded the <code>SessionInfo.copletInfo</code> map
039: * contains in this key the parameters for the coplet.
040: */
041: String COPLETINFO_PARAMETERS = "COPLETINFO_PARAMETERS";
042:
043: /** If a coplet is loaded the <code>SessionInfo.copletInfo</code> map
044: * contains in this key the portal URI
045: */
046: String COPLETINFO_PORTALURI = "COPLETINFO_PORTALURI";
047:
048: /** If a coplet is loaded the <code>SessionInfo.copletInfo</code> map
049: * contains in this key the status profile
050: */
051: String COPLETINFO_STATUSPROFILE = "COPLETINFO_STATUSPROFILE";
052:
053: // XML Elements
054: String ELEMENT_CONFIGURATION = "configuration";
055: String ELEMENT_ID = "id";
056: String ELEMENT_ADMINCONF = "portaladminconf";
057: String ELEMENT_LAYOUT = "layout";
058: String ELEMENT_PORTAL = "portal";
059: String ELEMENT_PORTALCONF = "portalconf";
060: String ELEMENT_PROFILE = "profile";
061: String ELEMENT_ROLE = "role";
062: String ELEMENT_STATE = "state";
063: String ELEMENT_COPLET = "coplet";
064: String ELEMENT_COPLETS = "coplets";
065:
066: // admin conf states
067: final String STATE_USER = "user";
068: final String STATE_ROLE = "role";
069: final String STATE_MAIN = "main";
070: final String STATE_COPLETS = "coplets";
071: final String STATE_GLOBAL = "global";
072: final String STATE_COPLET = "coplet";
073: final String STATE_MAIN_ROLE = "mainrole";
074:
075: /** The name of the attribute holding the portal configuration */
076: final String ATTRIBUTE_CONFIGURATION = "portalConf";
077:
078: /** The name of the attribute holding the url rewritten portal uri */
079: final String ATTRIBUTE_PORTAL_URI = "portalURI";
080:
081: final String ATTRIBUTE_COPLET_REPOSITORY = "portalRep";
082:
083: final String PROFILE_PROFILE = "profile"; // DocumentFragment
084: final String PROFILE_TYPE_PATHS = "typePaths"; // List
085: final String PROFILE_TYPE_CONF_PATHS = "typeConfPaths"; // List
086: final String PROFILE_PORTAL_LAYOUTS = "portalLayouts"; // Map
087: final String PROFILE_COPLET_LAYOUTS = "copletLayouts"; // Map
088: final String PROFILE_MISC_POINTER = "misc"; // Node[] with the values from below
089: final int PROFILE_MISC_HEADER_NODE = 0;
090: final int PROFILE_MISC_FOOTER_NODE = 1;
091: final int PROFILE_MISC_HEADER_CONTENT_NODE = 2;
092: final int PROFILE_MISC_FOOTER_CONTENT_NODE = 3;
093: final int PROFILE_MISC_COLUMNS_NODE = 4;
094: final int PROFILE_MISC_LAST_COPLET_NODE = 5;
095: final int PROFILE_MISC_MESSAGES_NODE = 6;
096: // starting with 8 the columns follow (by now max: 5)
097:
098: final String PROFILE_DEFAULT_COPLETS = "defCoplets"; // Map
099: final String PROFILE_MEDIA_COPLETS = "mediaCoplets"; // Map
100: final String PROFILE_SAVE_STATUS_FLAG = "saveStatus"; // Value not used
101:
102: /** Configuration Map */
103: final String CONF_BUILD_RESOURCE = "A";
104: final String CONF_AUTH_REDIRECT = "B";
105: final String CONF_LAYOUTBASE_RESOURCE = "C";
106: final String CONF_COPLETBASE_RESOURCE = "D";
107: final String CONF_COPLETBASE_SAVE_RESOURCE = "E";
108: final String CONF_TYPEBASE_RESOURCE = "F";
109: final String CONF_GLOBALDELTA_LOADRESOURCE = "G";
110: final String CONF_GLOBALDELTA_SAVERESOURCE = "H";
111: final String CONF_GLOBALDELTA_TYPERESOURCE = "I";
112: final String CONF_ROLEDELTA_LOADRESOURCE = "J";
113: final String CONF_ROLEDELTA_SAVERESOURCE = "K";
114: final String CONF_ROLEDELTA_TYPERESOURCE = "L";
115: final String CONF_USERDELTA_LOADRESOURCE = "M";
116: final String CONF_USERDELTA_SAVERESOURCE = "N";
117: final String CONF_USERDELTA_TYPERESOURCE = "O";
118: final String CONF_STATUS_LOADRESOURCE = "P";
119: final String CONF_STATUS_SAVERESOURCE = "Q";
120: final String CONF_ADMIN_TYPE_BASE = "R";
121: final String CONF_PORTAL_URI = "S";
122: final String CONF_PROFILE_CACHE = "T";
123: final String CONF_PARALLEL_COPLETS = "U";
124: final String CONF_COPLET_TIMEOUT = "V";
125:
126: final int MAX_COLUMNS = 5;
127:
128: /* The Parameters for the coplet */
129: final String PARAMETER_MEDIA = "media";
130: final String PARAMETER_ID = "id";
131: final String PARAMETER_NUMBER = "number";
132: final String PARAMETER_CUSTOMIZE = "customize";
133: final String PARAMETER_SIZE = "size";
134: final String PARAMETER_VISIBLE = "visible";
135: final String PARAMETER_PERSISTENT = "persistent";
136: }
|