public class Application extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
BEAN_CONFIG_SERVICE |
static String |
BEAN_DATA_DICTIONARY |
static String |
BEAN_IMPORTER_BOOTSTRAP |
static String |
MESSAGE_BUNDLE |
| Modifier and Type | Method and Description |
|---|---|
static ResourceBundle |
getBundle(javax.faces.context.FacesContext context)
Get the specified the default message bundle for this user
|
static ResourceBundle |
getBundle(javax.servlet.http.HttpSession session)
Get the specified the default message bundle for this user
|
static ClientConfigElement |
getClientConfig(javax.faces.context.FacesContext context)
Helper to get the client config element from the config service
|
static ClientConfigElement |
getClientConfig(javax.servlet.ServletContext context)
Helper to get the client config element from the config service
|
static String |
getCompanyRootId()
Deprecated.
Replace with user-context-specific getCompanyRootId (e.g. could be tenant-specific)
|
static String |
getCompanyRootId(javax.faces.context.FacesContext context) |
static org.springframework.extensions.config.ConfigService |
getConfigService(javax.faces.context.FacesContext context)
Helper to get the ConfigService instance
|
static org.springframework.extensions.config.ConfigService |
getConfigService(javax.servlet.ServletContext context)
Helper to get the ConfigService instance
|
static String |
getContentTemplatesFolderName(javax.faces.context.FacesContext context) |
static String |
getContentTemplatesFolderName(javax.servlet.ServletContext context) |
static User |
getCurrentUser(javax.faces.context.FacesContext context) |
static User |
getCurrentUser(javax.servlet.http.HttpSession session) |
static DashboardManager |
getDashboardManager()
Retrieves the DashboardManager managed bean
|
static DialogManager |
getDialogManager()
Retrieves the DialogManager managed bean
|
static String |
getEmailTemplatesFolderName(javax.faces.context.FacesContext context) |
static String |
getEmailTemplatesFolderName(javax.servlet.ServletContext context) |
static String |
getErrorPage(org.springframework.context.ApplicationContext context)
Retrieves the configured error page for the application
|
static String |
getErrorPage(javax.servlet.ServletContext servletContext)
Retrieves the configured error page for the application
|
static String |
getGlossaryFolderName(javax.faces.context.FacesContext context) |
static String |
getGlossaryFolderName(javax.servlet.ServletContext context) |
static String |
getGuestHomeFolderName(javax.faces.context.FacesContext context) |
static String |
getGuestHomeFolderName(javax.servlet.ServletContext context) |
static String |
getInviteEmailTemplatesFolderName(javax.faces.context.FacesContext context) |
static String |
getInviteEmailTemplatesFolderName(javax.servlet.ServletContext context) |
static Locale |
getLanguage(org.springframework.context.ApplicationContext ctx)
Return the configured language Locale for the application context
|
static Locale |
getLanguage(javax.faces.context.FacesContext fc)
Return the language Locale for the current user context
|
static Locale |
getLanguage(javax.servlet.http.HttpSession session,
boolean useInterfaceLanguage)
Return the language Locale for the current user Session.
|
static String |
getLoginPage(org.springframework.context.ApplicationContext context)
Retrieves the configured login page for the application
|
static String |
getLoginPage(javax.servlet.ServletContext servletContext)
Retrieves the configured login page for the application
|
static String |
getMessage(javax.faces.context.FacesContext context,
String msg)
Get the specified I18N message string from the default message bundle for this user
|
static String |
getMessage(javax.servlet.http.HttpSession session,
String msg)
Get the specified I18N message string from the default message bundle for this user
|
static String |
getNotifyEmailTemplatesFolderName(javax.faces.context.FacesContext context) |
static String |
getNotifyEmailTemplatesFolderName(javax.servlet.ServletContext context) |
static org.alfresco.service.cmr.repository.StoreRef |
getRepositoryStoreRef(javax.faces.context.FacesContext context) |
static org.alfresco.service.cmr.repository.StoreRef |
getRepositoryStoreRef(javax.servlet.ServletContext context) |
static String |
getRootPath(javax.faces.context.FacesContext context) |
static String |
getRootPath(javax.servlet.ServletContext context) |
static String |
getRSSTemplatesFolderName(javax.faces.context.FacesContext context) |
static String |
getRSSTemplatesFolderName(javax.servlet.ServletContext context) |
static String |
getSavedSearchesFolderName(javax.faces.context.FacesContext context) |
static String |
getSavedSearchesFolderName(javax.servlet.ServletContext context) |
static String |
getScriptsFolderName(javax.faces.context.FacesContext context) |
static String |
getScriptsFolderName(javax.servlet.ServletContext context) |
static SidebarBean |
getSidebarBean()
Retrieves the SidebarBean
|
static String |
getSpaceTemplatesFolderName(javax.faces.context.FacesContext context) |
static String |
getSpaceTemplatesFolderName(javax.servlet.ServletContext context) |
static WizardManager |
getWizardManager()
Retrieves the WizardManager managed bean
|
static void |
handleServletError(javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Throwable error,
org.apache.commons.logging.Log logger,
String returnPage)
Handles errors thrown from servlets
|
static void |
handleSystemError(javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String messageKey,
int statusCode,
org.apache.commons.logging.Log logger)
Handles error conditions detected by servlets.
|
static boolean |
inPortalServer()
Determines whether the server is running in a portal
|
static boolean |
isDynamicConfig(javax.faces.context.FacesContext context) |
static void |
logOut(javax.faces.context.FacesContext context)
Invalidate Alfresco ticket and Web/Portlet session and clear the Security context for this thread.
|
static void |
setCompanyRootId(String id)
Deprecated.
Replace with user-context-specific getCompanyRootId (e.g. could be tenant-specific)
|
static void |
setCurrentUser(javax.faces.context.FacesContext context,
User user) |
static void |
setInPortalServer(boolean inPortal)
Sets whether this application is running inside a portal server
|
static void |
setLanguage(javax.faces.context.FacesContext context,
String code)
Set the language locale for the current user context
|
static void |
setLanguage(javax.servlet.http.HttpSession session,
String code)
Deprecated.
|
public static final String BEAN_CONFIG_SERVICE
public static final String BEAN_DATA_DICTIONARY
public static final String BEAN_IMPORTER_BOOTSTRAP
public static final String MESSAGE_BUNDLE
public static void setInPortalServer(boolean inPortal)
inPortal - true to indicate the application is running as a portletpublic static boolean inPortalServer()
public static void handleServletError(javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Throwable error,
org.apache.commons.logging.Log logger,
String returnPage)
throws IOException,
javax.servlet.ServletException
servletContext - The servlet contextrequest - The HTTP requestresponse - The HTTP responseerror - The exceptionlogger - The loggerIOExceptionjavax.servlet.ServletExceptionpublic static void handleSystemError(javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String messageKey,
int statusCode,
org.apache.commons.logging.Log logger)
throws IOException,
javax.servlet.ServletException
servletContext - The servlet contextrequest - The HTTP requestresponse - The HTTP responsemessageKey - the resource bundle key for the error mesagestatusCode - the status code to set on the responselogger - The loggerIOException - Signals that an I/O exception has occurred.javax.servlet.ServletException - the servlet exceptionpublic static DialogManager getDialogManager()
public static WizardManager getWizardManager()
public static DashboardManager getDashboardManager()
public static SidebarBean getSidebarBean()
public static String getErrorPage(javax.servlet.ServletContext servletContext)
servletContext - The servlet contextpublic static String getLoginPage(javax.servlet.ServletContext servletContext)
servletContext - The servlet contextpublic static User getCurrentUser(javax.servlet.http.HttpSession session)
public static User getCurrentUser(javax.faces.context.FacesContext context)
public static void setCurrentUser(javax.faces.context.FacesContext context,
User user)
public static void logOut(javax.faces.context.FacesContext context)
context - public static org.alfresco.service.cmr.repository.StoreRef getRepositoryStoreRef(javax.servlet.ServletContext context)
public static org.alfresco.service.cmr.repository.StoreRef getRepositoryStoreRef(javax.faces.context.FacesContext context)
public static String getCompanyRootId()
public static void setCompanyRootId(String id)
id - The company root idpublic static String getCompanyRootId(javax.faces.context.FacesContext context)
public static String getRootPath(javax.servlet.ServletContext context)
public static String getRootPath(javax.faces.context.FacesContext context)
public static String getGlossaryFolderName(javax.servlet.ServletContext context)
public static String getGlossaryFolderName(javax.faces.context.FacesContext context)
public static String getSpaceTemplatesFolderName(javax.servlet.ServletContext context)
public static String getSpaceTemplatesFolderName(javax.faces.context.FacesContext context)
public static String getContentTemplatesFolderName(javax.servlet.ServletContext context)
public static String getContentTemplatesFolderName(javax.faces.context.FacesContext context)
public static String getInviteEmailTemplatesFolderName(javax.servlet.ServletContext context)
public static String getInviteEmailTemplatesFolderName(javax.faces.context.FacesContext context)
public static String getNotifyEmailTemplatesFolderName(javax.servlet.ServletContext context)
public static String getNotifyEmailTemplatesFolderName(javax.faces.context.FacesContext context)
public static String getEmailTemplatesFolderName(javax.servlet.ServletContext context)
public static String getEmailTemplatesFolderName(javax.faces.context.FacesContext context)
public static String getRSSTemplatesFolderName(javax.servlet.ServletContext context)
public static String getRSSTemplatesFolderName(javax.faces.context.FacesContext context)
public static String getSavedSearchesFolderName(javax.servlet.ServletContext context)
public static String getSavedSearchesFolderName(javax.faces.context.FacesContext context)
public static String getScriptsFolderName(javax.servlet.ServletContext context)
public static String getScriptsFolderName(javax.faces.context.FacesContext context)
public static String getGuestHomeFolderName(javax.servlet.ServletContext context)
public static String getGuestHomeFolderName(javax.faces.context.FacesContext context)
public static void setLanguage(javax.faces.context.FacesContext context,
String code)
context - FacesContext for current usercode - The ISO locale code to set@Deprecated public static void setLanguage(javax.servlet.http.HttpSession session, String code)
session - HttpSession for current usercode - The ISO locale code to setpublic static Locale getLanguage(javax.faces.context.FacesContext fc)
fc - FacesContext for the current userpublic static Locale getLanguage(javax.servlet.http.HttpSession session, boolean useInterfaceLanguage)
session - HttpSession for the current useruseInterfaceLanguage - If the session language hasn't been established yet, should we base it on user preferences?public static Locale getLanguage(org.springframework.context.ApplicationContext ctx)
ctx - the application contextpublic static String getMessage(javax.faces.context.FacesContext context, String msg)
context - FacesContextmsg - Message IDpublic static String getMessage(javax.servlet.http.HttpSession session, String msg)
session - HttpSessionmsg - Message IDpublic static ResourceBundle getBundle(javax.servlet.http.HttpSession session)
session - HttpSessionpublic static ResourceBundle getBundle(javax.faces.context.FacesContext context)
context - FacesContextpublic static org.springframework.extensions.config.ConfigService getConfigService(javax.faces.context.FacesContext context)
context - FacesContextpublic static org.springframework.extensions.config.ConfigService getConfigService(javax.servlet.ServletContext context)
context - ServletContextpublic static ClientConfigElement getClientConfig(javax.faces.context.FacesContext context)
context - FacesContextpublic static ClientConfigElement getClientConfig(javax.servlet.ServletContext context)
context - ServletContextpublic static String getErrorPage(org.springframework.context.ApplicationContext context)
context - The Spring contextpublic static String getLoginPage(org.springframework.context.ApplicationContext context)
context - The Spring contexrpublic static boolean isDynamicConfig(javax.faces.context.FacesContext context)
Copyright © 2005–2018 Alfresco Software. All rights reserved.