com.ibm.xsp.application
Class ApplicationEx

java.lang.Object
  extended by javax.faces.application.Application
      extended by com.ibm.xsp.application.ApplicationEx

public abstract class ApplicationEx
extends javax.faces.application.Application

API level method for the application object - users should not directly call methods in the subclasses of ApplicationEx as those methods are not part of the API and are likely to change in name and/or implementation. This class is not intended to be subclassed by other developers (if you have a use-case that requires a subclass let us know; it may be considered in a later release).


Field Summary
static java.lang.String EXTENSION_PROPERTYPROVIDER
           
 
Constructor Summary
ApplicationEx()
           
 
Method Summary
 void addApplicationListener(ApplicationListener listener)
          Add an application listener.
 void addSessionListener(SessionListener listener)
          Add a session listener.
abstract  javax.faces.model.DataModel createDataModel(java.lang.Object data)
          Create a DataModel instance by adapting the specified data object.
protected abstract  com.ibm.xsp.persistence.PersistenceService createPersistenceService()
          Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass.
 SessionData createSessionData(FacesContextEx context)
          Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass
abstract  void destroy()
          Destroy the application, once this call has been made subsequent calls to service are illegal
abstract  java.util.List findServices(java.lang.String serviceType)
          Return the list of service implementations for a particular service type.
 java.lang.String getApplicationId()
          Return a unique application id.
 java.util.List<ApplicationListener> getApplicationListeners()
          Get the application listeners.
abstract  java.lang.String getApplicationProperty(java.lang.String name, java.lang.String defaultValue)
          Return the named application property or the specified default value if the property doesn't exist.
abstract  com.ibm.xsp.beanmanagement.FacesBeanManager getBeanManager(java.lang.String scope)
           
abstract  com.ibm.xsp.controller.FacesController getController()
          Return the FacesController used by this application
abstract  com.ibm.xsp.factory.FactoryLookup getFactoryLookup()
          Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass. Not 100% sure of that
abstract  com.ibm.xsp.url.UrlHandler getHandler(java.net.URL url)
          Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass.
abstract  java.util.Map getHandlerMap()
          Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass. Should be typed.
static ApplicationEx getInstance()
          Return the current ApplicationEx
static ApplicationEx getInstance(javax.faces.context.FacesContext context)
          Return the current ApplicationEx
abstract  java.lang.Object getObject(java.lang.String key)
          Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass
abstract  com.ibm.xsp.persistence.PersistenceService getPersistenceService()
          Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass.
abstract  java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
          Return the named property or the specified default value if the property doesn't exist.
abstract  FacesSharableRegistry getRegistry()
          Load the meta-data describing XPages tags that are valid within the current application.
abstract  java.util.ResourceBundle getResourceBundle(java.lang.String baseName, java.util.Locale locale)
          Load a resource bndle for the specified locale, from the .properties files within the NSF.
 java.util.List<SessionListener> getSessionListeners()
          Get the session listeners.
abstract  java.util.TimeZone getUserTimeZone(javax.faces.context.FacesContext context)
          Return the timezone for the current user.
 boolean isSupportedRenderKit(java.lang.String renderKitId)
          Return true if the specified renderkit is supported by this application.
abstract  void putObject(java.lang.String key, java.lang.Object object)
          Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass
abstract  void refresh()
          Notification that the application should be refreshed.
 void removeApplicationListener(ApplicationListener listener)
          Remove an application listener.
abstract  void removeRegistry()
          Unload the registry loaded in getRegistry().
 void removeSessionListener(SessionListener listener)
          Remove a session listener.
abstract  void setController(com.ibm.xsp.controller.FacesController controller)
          Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass
 
Methods inherited from class javax.faces.application.Application
addComponent, addConverter, addConverter, addValidator, createComponent, createComponent, createConverter, createConverter, createMethodBinding, createValidator, createValueBinding, getActionListener, getComponentTypes, getConverterIds, getConverterTypes, getDefaultLocale, getDefaultRenderKitId, getMessageBundle, getNavigationHandler, getPropertyResolver, getStateManager, getSupportedLocales, getValidatorIds, getVariableResolver, getViewHandler, setActionListener, setDefaultLocale, setDefaultRenderKitId, setMessageBundle, setNavigationHandler, setPropertyResolver, setStateManager, setSupportedLocales, setVariableResolver, setViewHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTENSION_PROPERTYPROVIDER

public static final java.lang.String EXTENSION_PROPERTYPROVIDER
See Also:
Constant Field Values
Constructor Detail

ApplicationEx

public ApplicationEx()
Method Detail

getInstance

public static ApplicationEx getInstance()
Return the current ApplicationEx


getInstance

public static ApplicationEx getInstance(javax.faces.context.FacesContext context)
Return the current ApplicationEx


getSessionListeners

public java.util.List<SessionListener> getSessionListeners()
Get the session listeners. The list can be null.


addSessionListener

public void addSessionListener(SessionListener listener)
Add a session listener.


removeSessionListener

public void removeSessionListener(SessionListener listener)
Remove a session listener.


getApplicationListeners

public java.util.List<ApplicationListener> getApplicationListeners()
Get the application listeners. The list can be null.


addApplicationListener

public void addApplicationListener(ApplicationListener listener)
Add an application listener.


removeApplicationListener

public void removeApplicationListener(ApplicationListener listener)
Remove an application listener.


getApplicationId

public java.lang.String getApplicationId()
Return a unique application id. This id is generally used to store Application specific data into a container, like a database.


refresh

public abstract void refresh()
Notification that the application should be refreshed. This is generally called after a deployment happened.


isSupportedRenderKit

public boolean isSupportedRenderKit(java.lang.String renderKitId)
Return true if the specified renderkit is supported by this application.

Returns:

findServices

public abstract java.util.List findServices(java.lang.String serviceType)
Return the list of service implementations for a particular service type.

Parameters:
serviceType - the name of the service

createSessionData

public SessionData createSessionData(FacesContextEx context)
Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass

Create a persistent session data object. This can be overridden by a custom implementation, to store other attributes


getProperty

public abstract java.lang.String getProperty(java.lang.String name,
                                             java.lang.String defaultValue)
Return the named property or the specified default value if the property doesn't exist.


getApplicationProperty

public abstract java.lang.String getApplicationProperty(java.lang.String name,
                                                        java.lang.String defaultValue)
Return the named application property or the specified default value if the property doesn't exist. This method doesn't access the request/viewScope/session/theme specific properties through FacesContextEx, but does access the server xsp.properties file.


getObject

public abstract java.lang.Object getObject(java.lang.String key)
Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass

Get a global object stored in this application. Note that those objects are discarded after a deployment.

Parameters:
key - the object key
Returns:

putObject

public abstract void putObject(java.lang.String key,
                               java.lang.Object object)
Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass

Put a global object in this application. If the object is null, then the entry is removed from the table Note that those objects are discarded after a deployment.

Parameters:
key - the object key
object - the object to add

setController

public abstract void setController(com.ibm.xsp.controller.FacesController controller)
Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass

Set the FacesController to be used by this application. This method will throw an IllegalStateExecption if the controller is already set.


getController

public abstract com.ibm.xsp.controller.FacesController getController()
Return the FacesController used by this application


destroy

public abstract void destroy()
Destroy the application, once this call has been made subsequent calls to service are illegal


getHandlerMap

public abstract java.util.Map getHandlerMap()
Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass. Should be typed.

Returns:
Returns the UriHandler map.

getHandler

public abstract com.ibm.xsp.url.UrlHandler getHandler(java.net.URL url)
Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass.

Returns:
Returns the UriHandler for the specified string.

getFactoryLookup

public abstract com.ibm.xsp.factory.FactoryLookup getFactoryLookup()
Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass. Not 100% sure of that

Returns:
Returns the FactoryLookup associated with this application.

createDataModel

public abstract javax.faces.model.DataModel createDataModel(java.lang.Object data)
Create a DataModel instance by adapting the specified data object.


getResourceBundle

public abstract java.util.ResourceBundle getResourceBundle(java.lang.String baseName,
                                                           java.util.Locale locale)
                                                    throws java.io.IOException
Load a resource bndle for the specified locale, from the .properties files within the NSF.

Throws:
java.io.IOException

getBeanManager

public abstract com.ibm.xsp.beanmanagement.FacesBeanManager getBeanManager(java.lang.String scope)
Returns:
Return the FacesBeanManager for the specified scope, used by DataSources to store the data between requests in DataContainer objects.

getUserTimeZone

public abstract java.util.TimeZone getUserTimeZone(javax.faces.context.FacesContext context)
Return the timezone for the current user.

Parameters:
context -
Returns:

createPersistenceService

protected abstract com.ibm.xsp.persistence.PersistenceService createPersistenceService()
Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass.

Create the persistence service to use with this application


getPersistenceService

public abstract com.ibm.xsp.persistence.PersistenceService getPersistenceService()
Deprecated. should not be published, should be pushed down to ApplicationExImpl subclass.

Returns:
Return the persistence service for this application instance.

getRegistry

public abstract FacesSharableRegistry getRegistry()
Load the meta-data describing XPages tags that are valid within the current application.

Returns:

removeRegistry

public abstract void removeRegistry()
Unload the registry loaded in getRegistry().