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(FacesContext context)
Get the specified the default message bundle for this user
|
static ResourceBundle |
getBundle(HttpSession session)
Get the specified the default message bundle for this user
|
static ClientConfigElement |
getClientConfig(FacesContext context)
Helper to get the client config element from the config service
|
static ClientConfigElement |
getClientConfig(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(FacesContext context) |
static org.springframework.extensions.config.ConfigService |
getConfigService(FacesContext context)
Helper to get the ConfigService instance
|
static org.springframework.extensions.config.ConfigService |
getConfigService(ServletContext context)
Helper to get the ConfigService instance
|
static String |
getContentTemplatesFolderName(FacesContext context) |
static String |
getContentTemplatesFolderName(ServletContext context) |
static User |
getCurrentUser(FacesContext context) |
static User |
getCurrentUser(HttpSession session) |
static DashboardManager |
getDashboardManager()
Retrieves the DashboardManager managed bean
|
static DialogManager |
getDialogManager()
Retrieves the DialogManager managed bean
|
static String |
getEmailTemplatesFolderName(FacesContext context) |
static String |
getEmailTemplatesFolderName(ServletContext context) |
static String |
getErrorPage(org.springframework.context.ApplicationContext context)
Retrieves the configured error page for the application
|
static String |
getErrorPage(ServletContext servletContext)
Retrieves the configured error page for the application
|
static String |
getGlossaryFolderName(FacesContext context) |
static String |
getGlossaryFolderName(ServletContext context) |
static String |
getGuestHomeFolderName(FacesContext context) |
static String |
getGuestHomeFolderName(ServletContext context) |
static String |
getInviteEmailTemplatesFolderName(FacesContext context) |
static String |
getInviteEmailTemplatesFolderName(ServletContext context) |
static Locale |
getLanguage(org.springframework.context.ApplicationContext ctx)
Return the configured language Locale for the application context
|
static Locale |
getLanguage(FacesContext fc)
Return the language Locale for the current user context
|
static Locale |
getLanguage(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(ServletContext servletContext)
Retrieves the configured login page for the application
|
static String |
getMessage(FacesContext context,
String msg)
Get the specified I18N message string from the default message bundle for this user
|
static String |
getMessage(HttpSession session,
String msg)
Get the specified I18N message string from the default message bundle for this user
|
static String |
getNotifyEmailTemplatesFolderName(FacesContext context) |
static String |
getNotifyEmailTemplatesFolderName(ServletContext context) |
static org.alfresco.service.cmr.repository.StoreRef |
getRepositoryStoreRef(FacesContext context) |
static org.alfresco.service.cmr.repository.StoreRef |
getRepositoryStoreRef(ServletContext context) |
static String |
getRootPath(FacesContext context) |
static String |
getRootPath(ServletContext context) |
static String |
getRSSTemplatesFolderName(FacesContext context) |
static String |
getRSSTemplatesFolderName(ServletContext context) |
static String |
getSavedSearchesFolderName(FacesContext context) |
static String |
getSavedSearchesFolderName(ServletContext context) |
static String |
getScriptsFolderName(FacesContext context) |
static String |
getScriptsFolderName(ServletContext context) |
static SidebarBean |
getSidebarBean()
Retrieves the SidebarBean
|
static String |
getSpaceTemplatesFolderName(FacesContext context) |
static String |
getSpaceTemplatesFolderName(ServletContext context) |
static WizardManager |
getWizardManager()
Retrieves the WizardManager managed bean
|
static void |
handleServletError(ServletContext servletContext,
HttpServletRequest request,
HttpServletResponse response,
Throwable error,
org.apache.commons.logging.Log logger,
String returnPage)
Handles errors thrown from servlets
|
static void |
handleSystemError(ServletContext servletContext,
HttpServletRequest request,
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(FacesContext context) |
static void |
logOut(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(FacesContext context,
User user) |
static void |
setInPortalServer(boolean inPortal)
Sets whether this application is running inside a portal server
|
static void |
setLanguage(FacesContext context,
String code)
Set the language locale for the current user context
|
static void |
setLanguage(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(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, Throwable error, org.apache.commons.logging.Log logger, String returnPage) throws IOException, ServletException
servletContext
- The servlet contextrequest
- The HTTP requestresponse
- The HTTP responseerror
- The exceptionlogger
- The loggerIOException
ServletException
public static void handleSystemError(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String messageKey, int statusCode, org.apache.commons.logging.Log logger) throws IOException, 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.ServletException
- the servlet exceptionpublic static DialogManager getDialogManager()
public static WizardManager getWizardManager()
public static DashboardManager getDashboardManager()
public static SidebarBean getSidebarBean()
public static String getErrorPage(ServletContext servletContext)
servletContext
- The servlet contextpublic static String getLoginPage(ServletContext servletContext)
servletContext
- The servlet contextpublic static User getCurrentUser(HttpSession session)
public static User getCurrentUser(FacesContext context)
public static void setCurrentUser(FacesContext context, User user)
public static void logOut(FacesContext context)
context
- public static org.alfresco.service.cmr.repository.StoreRef getRepositoryStoreRef(ServletContext context)
public static org.alfresco.service.cmr.repository.StoreRef getRepositoryStoreRef(FacesContext context)
public static String getCompanyRootId()
public static void setCompanyRootId(String id)
id
- The company root idpublic static String getCompanyRootId(FacesContext context)
public static String getRootPath(ServletContext context)
public static String getRootPath(FacesContext context)
public static String getGlossaryFolderName(ServletContext context)
public static String getGlossaryFolderName(FacesContext context)
public static String getSpaceTemplatesFolderName(ServletContext context)
public static String getSpaceTemplatesFolderName(FacesContext context)
public static String getContentTemplatesFolderName(ServletContext context)
public static String getContentTemplatesFolderName(FacesContext context)
public static String getInviteEmailTemplatesFolderName(ServletContext context)
public static String getInviteEmailTemplatesFolderName(FacesContext context)
public static String getNotifyEmailTemplatesFolderName(ServletContext context)
public static String getNotifyEmailTemplatesFolderName(FacesContext context)
public static String getEmailTemplatesFolderName(ServletContext context)
public static String getEmailTemplatesFolderName(FacesContext context)
public static String getRSSTemplatesFolderName(ServletContext context)
public static String getRSSTemplatesFolderName(FacesContext context)
public static String getSavedSearchesFolderName(ServletContext context)
public static String getSavedSearchesFolderName(FacesContext context)
public static String getScriptsFolderName(ServletContext context)
public static String getScriptsFolderName(FacesContext context)
public static String getGuestHomeFolderName(ServletContext context)
public static String getGuestHomeFolderName(FacesContext context)
public static void setLanguage(FacesContext context, String code)
context
- FacesContext for current usercode
- The ISO locale code to set@Deprecated public static void setLanguage(HttpSession session, String code)
session
- HttpSession for current usercode
- The ISO locale code to setpublic static Locale getLanguage(FacesContext fc)
fc
- FacesContext for the current userpublic static Locale getLanguage(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(FacesContext context, String msg)
context
- FacesContextmsg
- Message IDpublic static String getMessage(HttpSession session, String msg)
session
- HttpSessionmsg
- Message IDpublic static ResourceBundle getBundle(HttpSession session)
session
- HttpSessionpublic static ResourceBundle getBundle(FacesContext context)
context
- FacesContextpublic static org.springframework.extensions.config.ConfigService getConfigService(FacesContext context)
context
- FacesContextpublic static org.springframework.extensions.config.ConfigService getConfigService(ServletContext context)
context
- ServletContextpublic static ClientConfigElement getClientConfig(FacesContext context)
context
- FacesContextpublic static ClientConfigElement getClientConfig(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(FacesContext context)
Copyright © 2005–2017 Alfresco Software. All rights reserved.