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 Object
implements PageFactory<T>, org.osgi.service.cm.ManagedService


Constructor Summary
protected AbstractPageFactory(org.osgi.framework.BundleContext bundleContext, String pageId, String applicationName, String pageName)
          While this constructor does not require a pageClass it will NOT analyse the loaded classes automatically for the PaxWicketMountPoint annotation.
protected AbstractPageFactory(org.osgi.framework.BundleContext bundleContext, String pageId, String applicationName, String pageName, Class<? extends org.apache.wicket.markup.html.WebPage> pageClass)
          This constructor expects an pageClass.
 
Method Summary
 void dispose()
           
 String getApplicationName()
          Returns the application name.
 String getPageName()
          Returns the page name.
 void register()
           
protected  void setApplicationName(String applicationName)
          Sets the application name.
protected  void setInternalBundleContext(org.osgi.framework.BundleContext bundleContext)
           
protected  void setPageId(String pageId)
           
protected  void setPageName(String pageName)
          Set the page name.
 void updated(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,
                              String pageId,
                              String applicationName,
                              String pageName)
                       throws IllegalArgumentException
While this constructor does not require a pageClass it will NOT analyse the loaded classes automatically for the PaxWicketMountPoint annotation.

Throws:
IllegalArgumentException

AbstractPageFactory

protected AbstractPageFactory(org.osgi.framework.BundleContext bundleContext,
                              String pageId,
                              String applicationName,
                              String pageName,
                              Class<? extends org.apache.wicket.markup.html.WebPage> pageClass)
                       throws IllegalArgumentException
This constructor expects an pageClass. This class is expected to be the exported page and is automatically scanned for the PaxWicketMountPoint annotation. The found page is automatically exported as service mounting the page on the defined place.

Throws:
IllegalArgumentException
Method Detail

register

public final void register()
                    throws IllegalStateException
Throws:
IllegalStateException

dispose

public final void dispose()
                   throws IllegalStateException
Throws:
IllegalStateException

getApplicationName

public final String getApplicationName()
Returns the application name.

Returns:
The application name.
Since:
1.0.0

getPageName

public final String getPageName()
Returns the page name.

Returns:
The page name.
Since:
1.0.0

updated

public void updated(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(String applicationName)
                                 throws IllegalArgumentException
Sets the application name.

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

setPageId

protected final void setPageId(String pageId)
                        throws IllegalArgumentException
Throws:
IllegalArgumentException

setPageName

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

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

setInternalBundleContext

protected final void setInternalBundleContext(org.osgi.framework.BundleContext bundleContext)
                                       throws IllegalArgumentException
Throws:
IllegalArgumentException


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.