|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wicket.Application
public abstract class Application
Base class for all Wicket applications. To create a Wicket application, you generally should not directly subclass this class. Instead, you will want to subclass some subclass of Application, like WebApplication, which is appropriate for the protocol and markup type you are working with.
Application has the following interesting features / attributes:
ResourceReference
for more details.
WebApplication
Field Summary | |
---|---|
static java.lang.String |
CONFIGURATION
Configuration constant for the 2 types |
static java.lang.String |
CONTEXTPATH
Configuration type constant for getting the context path out of the web.xml |
static java.lang.String |
DEPLOYMENT
Configuration type constant for deployment |
static java.lang.String |
DEVELOPMENT
Configuration type constant for development |
Constructor Summary | |
---|---|
Application()
Constructor. |
Method Summary | |
---|---|
void |
addComponentInstantiationListener(IComponentInstantiationListener listener)
Adds a component instantiation listener. |
void |
configure(java.lang.String configurationType)
Convenience method that sets application settings to good defaults for the given configuration type (either DEVELOPMENT or DEPLOYMENT). |
void |
configure(java.lang.String configurationType,
IResourceFinder resourceFinder)
Configures application settings to good defaults for the given configuration type (either DEVELOPMENT or DEPLOYMENT). |
void |
configure(java.lang.String configurationType,
java.lang.String resourceFolder)
Convenience method that sets application settings to good defaults for the given configuration type (either DEVELOPMENT or DEPLOYMENT). |
protected void |
destroy()
Called when wicket servlet is destroyed. |
static boolean |
exists()
Checks if the Application threadlocal is set in this
thread |
static Application |
get()
Get Application for current thread. |
static Application |
get(java.lang.String applicationKey)
Gets the Application based on the application key of that application. |
IAjaxSettings |
getAjaxSettings()
Deprecated. use getDebugSettings() instead |
abstract java.lang.String |
getApplicationKey()
Gets the unique key of this application within a given context (like a web application). |
IApplicationSettings |
getApplicationSettings()
|
java.lang.String |
getConfigurationType()
Gets the configuration mode that is currently set, either DEVELOPMENT or DEPLOYMENT . |
IDebugSettings |
getDebugSettings()
|
IExceptionSettings |
getExceptionSettings()
|
IFrameworkSettings |
getFrameworkSettings()
|
abstract java.lang.Class |
getHomePage()
Application subclasses must specify a home page class by implementing this abstract method. |
MarkupCache |
getMarkupCache()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
IMarkupSettings |
getMarkupSettings()
|
java.io.Serializable |
getMetaData(MetaDataKey key)
Gets metadata for this application using the given key. |
java.lang.String |
getName()
Gets the name of this application. |
IPageSettings |
getPageSettings()
|
IRequestCycleSettings |
getRequestCycleSettings()
|
IResourceSettings |
getResourceSettings()
|
ISecuritySettings |
getSecuritySettings()
|
protected abstract ISessionFactory |
getSessionFactory()
Gets the factory for creating session instances. |
ISessionSettings |
getSessionSettings()
|
ISessionStore |
getSessionStore()
Gets the facade object for working getting/ storing session instances. |
Settings |
getSettings()
Deprecated. will be made private after 1.2 |
SharedResources |
getSharedResources()
Gets the shared resources. |
protected void |
init()
Allows for initialization of the application by a subclass. |
void |
initializeComponents()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected void |
internalDestroy()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected void |
internalInit()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
static boolean |
isAttached()
|
void |
logEventTarget(IRequestTarget target)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
void |
logResponseTarget(IRequestTarget requestTarget)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected abstract ISessionStore |
newSessionStore()
Creates a new session facade. |
void |
removeComponentInstantiationListener(IComponentInstantiationListener listener)
Removes a component instantiation listener. |
static void |
set(Application application)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
void |
setMetaData(MetaDataKey key,
java.io.Serializable object)
Sets the metadata for this application using the given key. |
static void |
unset()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONFIGURATION
public static final java.lang.String CONTEXTPATH
public static final java.lang.String DEPLOYMENT
public static final java.lang.String DEVELOPMENT
Constructor Detail |
---|
public Application()
init()
for any configuration of your
application instead of overriding the constructor.
Method Detail |
---|
public static boolean exists()
Application
threadlocal is set in this
thread
get()
can return the instance of
application, false otherwisepublic static Application get()
public static Application get(java.lang.String applicationKey)
applicationKey
- The unique key of the application within a certain context
(e.g. a web application)
java.lang.IllegalArgumentException
- When no application was found with the provided keypublic static boolean isAttached()
public static void set(Application application)
application
- The current application or null for this threadpublic static void unset()
public final void addComponentInstantiationListener(IComponentInstantiationListener listener)
Note: wicket does not guarantee the execution order of added listeners
listener
- the listener to addpublic final void configure(java.lang.String configurationType)
configurationType
- The configuration type (either DEVELOPMENT or DEPLOYMENT)configure(String, IResourceFinder)
public final void configure(java.lang.String configurationType, IResourceFinder resourceFinder)
configurationType
- The configuration type. Must currently be either DEVELOPMENT
or DEPLOYMENT. Currently, if the configuration type is
DEVELOPMENT, resources are polled for changes, component usage
is checked, wicket tags are not stripped from ouput and a
detailed exception page is used. If the type is DEPLOYMENT,
component usage is not checked, wicket tags are stripped from
output and a non-detailed exception page is used to display
errors.resourceFinder
- Resource finder for looking up resourcespublic final void configure(java.lang.String configurationType, java.lang.String resourceFolder)
configurationType
- The configuration type (either DEVELOPMENT or DEPLOYMENT)resourceFolder
- Folder for polling resourcespublic final IAjaxSettings getAjaxSettings()
getDebugSettings()
instead
IAjaxSettings
public abstract java.lang.String getApplicationKey()
public final IApplicationSettings getApplicationSettings()
IApplicationSettings
public java.lang.String getConfigurationType()
DEVELOPMENT
or DEPLOYMENT
.
public final IDebugSettings getDebugSettings()
IDebugSettings
public final IExceptionSettings getExceptionSettings()
IExceptionSettings
public final IFrameworkSettings getFrameworkSettings()
IFrameworkSettings
public abstract java.lang.Class getHomePage()
public final MarkupCache getMarkupCache()
public final IMarkupSettings getMarkupSettings()
IMarkupSettings
public final java.io.Serializable getMetaData(MetaDataKey key)
key
- The key for the data
MetaDataKey
public final java.lang.String getName()
public final IPageSettings getPageSettings()
IPageSettings
public final IRequestCycleSettings getRequestCycleSettings()
IDebugSettings
public final IResourceSettings getResourceSettings()
IResourceSettings
public final ISecuritySettings getSecuritySettings()
ISecuritySettings
public final ISessionSettings getSessionSettings()
ISessionSettings
public final ISessionStore getSessionStore()
public Settings getSettings()
getApplicationSettings()
,
getDebugSettings()
,
getExceptionSettings()
,
getMarkupSettings()
,
getPageSettings()
,
getRequestCycleSettings()
,
getResourceSettings()
,
getSecuritySettings()
,
getSessionSettings()
public final SharedResources getSharedResources()
public final void initializeComponents()
public void logEventTarget(IRequestTarget target)
target
- public void logResponseTarget(IRequestTarget requestTarget)
requestTarget
- public final void removeComponentInstantiationListener(IComponentInstantiationListener listener)
listener
- the listener to removepublic final void setMetaData(MetaDataKey key, java.io.Serializable object)
MetaDataKey
.
key
- The singleton key for the metadataobject
- The metadata object
java.lang.IllegalArgumentException
MetaDataKey
protected void destroy()
protected abstract ISessionFactory getSessionFactory()
protected void init()
protected void internalDestroy()
protected void internalInit()
protected abstract ISessionStore newSessionStore()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |