wicket.request.target.component
Class BookmarkablePageRequestTarget

java.lang.Object
  extended by wicket.request.target.component.BookmarkablePageRequestTarget
All Implemented Interfaces:
IRequestTarget, IBookmarkablePageRequestTarget, IEventProcessor
Direct Known Subclasses:
ExpiredPageClassRequestTarget

public class BookmarkablePageRequestTarget
extends java.lang.Object
implements IBookmarkablePageRequestTarget

Default implementation of IBookmarkablePageRequestTarget. Target that denotes a page that is to be created from the provided page class. This is typically used for redirects to bookmarkable pages or mounted pages.

Author:
Eelco Hillenius, Igor Vaynberg (ivaynberg)

Constructor Summary
BookmarkablePageRequestTarget(java.lang.Class pageClass)
          Construct.
BookmarkablePageRequestTarget(java.lang.Class pageClass, PageParameters pageParameters)
          Construct.
BookmarkablePageRequestTarget(java.lang.String pageMapName, java.lang.Class pageClass)
          Construct.
BookmarkablePageRequestTarget(java.lang.String pageMapName, java.lang.Class pageClass, PageParameters pageParameters)
          Construct.
 
Method Summary
 void detach(RequestCycle requestCycle)
          This method is alled on the end of a request cycle to indicate that processing is done and that cleaning up of the subject(s) of this target may be done.
 boolean equals(java.lang.Object obj)
           
 java.lang.Object getLock(RequestCycle requestCycle)
          Gets the lock to be used for synchronization.
 Page getPage()
           
 java.lang.Class getPageClass()
          Gets the page class.
 java.lang.String getPageMapName()
          Gets the optional page map name.
 PageParameters getPageParameters()
          Gets the optional page parameters.
 int hashCode()
           
protected  Page newPage(java.lang.Class pageClass, RequestCycle requestCycle)
          Constructs a new instance of a page given its class name
 void processEvents(RequestCycle requestCycle)
          After a page is restored, this method is responsible for calling any event handling code based on the request.
 void respond(RequestCycle requestCycle)
          Generates a response.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BookmarkablePageRequestTarget

public BookmarkablePageRequestTarget(java.lang.Class pageClass)
Construct.

Parameters:
pageClass - the class of the page

BookmarkablePageRequestTarget

public BookmarkablePageRequestTarget(java.lang.Class pageClass,
                                     PageParameters pageParameters)
Construct.

Parameters:
pageClass - the class of the page
pageParameters - optional page parameters

BookmarkablePageRequestTarget

public BookmarkablePageRequestTarget(java.lang.String pageMapName,
                                     java.lang.Class pageClass)
Construct.

Parameters:
pageMapName - optional page map name
pageClass - the class of the page

BookmarkablePageRequestTarget

public BookmarkablePageRequestTarget(java.lang.String pageMapName,
                                     java.lang.Class pageClass,
                                     PageParameters pageParameters)
Construct.

Parameters:
pageMapName - optional page map name
pageClass - the class of the page
pageParameters - optional page parameters
Method Detail

detach

public void detach(RequestCycle requestCycle)
Description copied from interface: IRequestTarget
This method is alled on the end of a request cycle to indicate that processing is done and that cleaning up of the subject(s) of this target may be done.

Specified by:
detach in interface IRequestTarget
Parameters:
requestCycle - the current request cycle
See Also:
IRequestTarget.detach(wicket.RequestCycle)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getPage

public final Page getPage()
Returns:
The page that was created, null if the response did not happen yet

getPageClass

public final java.lang.Class getPageClass()
Description copied from interface: IBookmarkablePageRequestTarget
Gets the page class.

Specified by:
getPageClass in interface IBookmarkablePageRequestTarget
Returns:
the page class
See Also:
IBookmarkablePageRequestTarget.getPageClass()

getPageMapName

public final java.lang.String getPageMapName()
Description copied from interface: IBookmarkablePageRequestTarget
Gets the optional page map name.

Specified by:
getPageMapName in interface IBookmarkablePageRequestTarget
Returns:
the optional page map name
See Also:
IBookmarkablePageRequestTarget.getPageMapName()

getPageParameters

public final PageParameters getPageParameters()
Description copied from interface: IBookmarkablePageRequestTarget
Gets the optional page parameters.

Specified by:
getPageParameters in interface IBookmarkablePageRequestTarget
Returns:
the page parameters or null
See Also:
IBookmarkablePageRequestTarget.getPageParameters()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

processEvents

public void processEvents(RequestCycle requestCycle)
Description copied from interface: IEventProcessor
After a page is restored, this method is responsible for calling any event handling code based on the request.

Specified by:
processEvents in interface IEventProcessor
Parameters:
requestCycle - the current request cycle
See Also:
IEventProcessor.processEvents(wicket.RequestCycle)

respond

public void respond(RequestCycle requestCycle)
Description copied from interface: IRequestTarget
Generates a response.

Specified by:
respond in interface IRequestTarget
Parameters:
requestCycle - the current request cycle
See Also:
IRequestTarget.respond(wicket.RequestCycle)

getLock

public java.lang.Object getLock(RequestCycle requestCycle)
Description copied from interface: IRequestTarget
Gets the lock to be used for synchronization.

Specified by:
getLock in interface IRequestTarget
Parameters:
requestCycle - the current request cycle
Returns:
Any lock to be used to synchronize this target or null if no synchronization is needed.
See Also:
IRequestTarget.getLock(RequestCycle)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

newPage

protected Page newPage(java.lang.Class pageClass,
                       RequestCycle requestCycle)
Constructs a new instance of a page given its class name

Parameters:
pageClass - class name of the page to be created
requestCycle - request cycle
Returns:
new instance of page


Copyright © 2004-2007 Wicket developers. All Rights Reserved.