org.ops4j.pax.wicket.util
Class AbstractPageFactory<T extends org.apache.wicket.Page>

java.lang.Object
  extended by org.ops4j.pax.wicket.util.AbstractPageFactory<T>
All Implemented Interfaces:
PageFactory<T>, org.osgi.service.cm.ManagedService
Direct Known Subclasses:
DefaultPageFactory

public abstract class AbstractPageFactory<T extends org.apache.wicket.Page>
extends java.lang.Object
implements PageFactory<T>, org.osgi.service.cm.ManagedService


Constructor Summary
protected AbstractPageFactory(org.osgi.framework.BundleContext bundleContext, java.lang.String pageId, java.lang.String applicationName, java.lang.String pageName)
           
 
Method Summary
 void dispose()
           
 java.lang.String getApplicationName()
          Returns the application name.
protected  PaxWicketAuthentication getAuthentication()
          Returns the Authentication of the current request.
 java.lang.String getPageName()
          Returns the page name.
 void register()
           
protected  void setApplicationName(java.lang.String applicationName)
          Sets the application name.
protected  void setPageName(java.lang.String pageName)
          Set the page name.
 void updated(java.util.Dictionary config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ops4j.pax.wicket.api.PageFactory
createPage, getPageClass
 

Constructor Detail

AbstractPageFactory

protected AbstractPageFactory(org.osgi.framework.BundleContext bundleContext,
                              java.lang.String pageId,
                              java.lang.String applicationName,
                              java.lang.String pageName)
                       throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

register

public final void register()
                    throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

dispose

public final void dispose()
                   throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

getApplicationName

public final java.lang.String getApplicationName()
Returns the application name.

Returns:
The application name.
Since:
1.0.0

getAuthentication

protected PaxWicketAuthentication getAuthentication()
Returns the Authentication of the current request. It is possible to obtain the Username of the logged in user as well as which roles that this user has assigned to it.

Returns:
the Authentication of the current request.

getPageName

public final java.lang.String getPageName()
Returns the page name.

Returns:
The page name.
Since:
1.0.0

updated

public void updated(java.util.Dictionary config)
             throws org.osgi.service.cm.ConfigurationException
Specified by:
updated in interface org.osgi.service.cm.ManagedService
Throws:
org.osgi.service.cm.ConfigurationException

setApplicationName

protected final void setApplicationName(java.lang.String applicationName)
                                 throws java.lang.IllegalArgumentException
Sets the application name.

Parameters:
applicationName - The application name. This argument must not be null or empty.
Throws:
java.lang.IllegalArgumentException - Thrown if the specified applicationName is null.
Since:
1.0.0

setPageName

protected final void setPageName(java.lang.String pageName)
                          throws java.lang.IllegalArgumentException
Set the page name.

Parameters:
pageName - The page name. This argument must not be null or empty.
Throws:
java.lang.IllegalArgumentException - Thrown if the specified pageName arguments are null.
Since:
1.0.0


Copyright © 2008. All Rights Reserved.