View Javadoc

1   /**
2    * Copyright (C) 2005-2009 Alfresco Software Limited.
3    *
4    * This file is part of the Spring Surf Extension project.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *  http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  package org.springframework.extensions.surf;
20  
21  /**
22   * Web Framework constants
23   * 
24   * @author muzquiano
25   */
26  public class WebFrameworkConstants
27  {
28      // Labels
29      public static final String FRAMEWORK_TITLE = "Alfresco Surf";
30      public static final String FRAMEWORK_VERSION = "3.3";
31      public static final String FRAMEWORK_INITIALIZATION_SUCCESS_MESSAGE = "Successfully Initialized Web Framework";
32      
33      // System Pages
34      public static final String SYSTEM_PAGE_GETTING_STARTED = "page-getting-started";
35      public static final String SYSTEM_PAGE_UNCONFIGURED = "page-unconfigured";
36      public static final String SYSTEM_PAGE_CONTENT_NOT_LOADED = "page-content-not-loaded";
37      public static final String SYSTEM_PAGE_CONTENT_ASSOCIATION_MISSING = "page-content-association-missing";
38      public static final String DEFAULT_SYSTEM_PAGE_GETTING_STARTED = "/core/page-gettingstarted.jsp";
39      public static final String DEFAULT_SYSTEM_PAGE_UNCONFIGURED = "/core/page-unconfigured.jsp";
40      public static final String DEFAULT_SYSTEM_PAGE_CONTENT_NOT_LOADED = "/core/content-not-loaded.jsp";
41      public static final String DEFAULT_SYSTEM_PAGE_CONTENT_ASSOCIATION_MISSING = "/core/content-association-missing.jsp";
42  
43      // Dispatcher Handlers
44      public static final String DISPATCHER_HANDLER_PAGE_ERROR = "page-error";
45      public static final String DISPATCHER_HANDLER_COMPONENT_ERROR = "component-error";
46      public static final String DISPATCHER_HANDLER_TEMPLATE_ERROR = "template-error";
47      public static final String DISPATCHER_HANDLER_REGION_ERROR = "region-error";
48      public static final String DISPATCHER_HANDLER_REGION_NO_COMPONENT = "region-nocomponent";
49      public static final String DEFAULT_DISPATCHER_HANDLER_PAGE_ERROR = "/core/page-error.jsp";
50      public static final String DEFAULT_DISPATCHER_HANDLER_COMPONENT_ERROR = "/core/component-error.jsp";
51      public static final String DEFAULT_DISPATCHER_HANDLER_TEMPLATE_ERROR = "/core/template-error.jsp";
52      public static final String DEFAULT_DISPATCHER_HANDLER_REGION_ERROR = "/core/region-error.jsp";
53      public static final String DEFAULT_DISPATCHER_HANDLER_REGION_NO_COMPONENT = "/core/region-nocomponent.jsp";
54      
55      // Region Scopes
56      public static final String REGION_SCOPE_GLOBAL   = "global";
57      public static final String REGION_SCOPE_TEMPLATE = "template";
58      public static final String REGION_SCOPE_PAGE     = "page";
59      public static final String REGION_SCOPE_URI      = "uri";
60      public static final String REGION_SCOPE_THEME    = "theme";
61          
62      // Chromes
63      public static final String DEFAULT_REGION_CHROME_ID = "default-region-chrome";
64      public static final String CHROMELESS_REGION_CHROME_ID = "chromeless-region-chrome";
65      public static final String DEFAULT_COMPONENT_CHROME_ID = "default-component-chrome";
66      //public static final String DEBUG_COMPONENT_CHROME_ID = "debug-component-chrome";
67      
68      // Misc
69      public static final String DEFAULT_ALFRESCO_ENDPOINT_ID = "alfresco";
70  
71      // Renderer Context Parameters (Page)
72      public static final String RENDER_DATA_PAGE_ID = "page-id";
73      public static final String RENDER_DATA_PAGE_TYPE_ID = "page-type-id";
74      public static final String RENDER_DATA_TEMPLATE_ID = "template-id";
75      public static final String RENDER_DATA_TEMPLATE_TYPE_ID = "template-type-id";
76      public static final String RENDER_DATA_REGION_ID = "region-id";
77      public static final String RENDER_DATA_REGION_SCOPE_ID = "region-scope-id";
78      public static final String RENDER_DATA_REGION_SOURCE_ID = "region-source-id";
79      public static final String RENDER_DATA_REGION_CHROME_ID = "region-chrome-id";
80      public static final String RENDER_DATA_COMPONENT_ID = "component-id";
81      public static final String RENDER_DATA_COMPONENT_TYPE_ID = "component-type-id";
82      public static final String RENDER_DATA_COMPONENT_REGION_ID = "component-region-id";
83      public static final String RENDER_DATA_COMPONENT_SOURCE_ID = "component-source-id";
84      public static final String RENDER_DATA_COMPONENT_SCOPE_ID = "component-scope-id";
85      public static final String RENDER_DATA_COMPONENT_CHROME_ID = "component-chrome-id";
86      
87      public static final String RENDER_DATA_HTMLID = "htmlid";
88      public static final String RENDER_DATA_REQUEST_CONTEXT_STACK_KEY = "configuration-stack";
89      
90      // Model Persistence Store ID key name
91      public static final String WEBAPP_ID_REQUEST_PARAM_NAME = "alfWebappId";
92      public static final String WEBAPP_ID_SESSION_ATTRIBUTE_NAME = "alfWebappId";
93      
94      public static final String STORE_ID_REQUEST_PARAM_NAME = "alfStoreId";    
95      public static final String STORE_ID_SESSION_ATTRIBUTE_NAME = "alfStoreId";
96      
97      // Request Context Environment
98      public static final String STORE_ID_REQUEST_CONTEXT_NAME = "alfStoreId";
99      public static final String WEBAPP_ID_REQUEST_CONTEXT_NAME = "alfWebappId";
100     
101     // Web Studio Signature
102     public static final String WEB_STUDIO_SIGNATURE = "<!-- Include Alfresco Web Studio -->";
103     
104     // Theme
105     public static final String DEFAULT_THEME_ID = "default";
106     
107     // Page Types
108     public static final String GENERIC_PAGE_TYPE_DEFAULT_PAGE_ID = "generic";
109     
110     // Processor Types
111     public static final String PROCESSOR_JSP = "jsp";
112     public static final String PROCESSOR_FREEMARKER = "freemarker";
113     public static final String PROCESSOR_WEBSCRIPT = "webscript";
114     public static final String DEFAULT_PROCESSOR = "jsp";
115 }