|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ops4j.pax.wicket.util.AbstractContentSource<E>
public abstract class AbstractContentSource<E extends org.apache.wicket.Component>
| Field Summary |
|---|
| Fields inherited from interface org.ops4j.pax.wicket.api.ContentSource |
|---|
AGGREGATION_POINT, APPLICATION_NAME, BASIC_ROLES, DESTINATION_UNKNOWN, DESTINATIONS, HOMEPAGE_CLASSNAME, MOUNTPOINT, PAGE_ID, PAGE_NAME, REQUIRED_ROLES, SOURCE_ID |
| Constructor Summary | |
|---|---|
protected |
AbstractContentSource(org.osgi.framework.BundleContext bundleContext,
java.lang.String wicketId,
java.lang.String applicationName)
Construct an instance with AbstractContentSource. |
| Method Summary | ||
|---|---|---|
E |
createSourceComponent(java.lang.String wicketId)
Create the wicket component represented by this ContentSource instance. |
|
E |
createSourceComponent(java.lang.String wicketId,
org.apache.wicket.MarkupContainer parent)
Create the wicket component represented by this ContentSource instance. |
|
protected abstract E |
createWicketComponent(java.lang.String wicketId)
Create component with the specified wicketId. |
|
protected
|
createWicketComponent(java.lang.String wicketId,
C parent)
Default implementation that ignores the parent component. |
|
java.lang.String |
getApplicationName()
Returns the application name. |
|
protected PaxWicketAuthentication |
getAuthentication()
Returns the Authentication of the current request. |
|
org.apache.wicket.authorization.strategies.role.Roles |
getBasicRoles()
|
|
java.lang.String[] |
getDestinations()
Returns the destinations. |
|
org.apache.wicket.authorization.strategies.role.Roles |
getRequiredRoles()
|
|
java.lang.String |
getSourceId()
Returns the content source id. |
|
protected E |
onAuthorizationFailed(java.lang.String wicketId)
This method is called when the Authorization of the ContentSource has failed. |
|
org.osgi.framework.ServiceRegistration |
register()
Register the specified AbstractContentSource instance. |
|
void |
setApplicationName(java.lang.String applicationName)
Sets the application name. |
|
void |
setDestination(java.lang.String... destinationIds)
Sets the destination id. |
|
void |
setRoles(org.apache.wicket.authorization.strategies.role.Roles requiredRoles,
org.apache.wicket.authorization.strategies.role.Roles basicRoles)
|
|
void |
updated(java.util.Dictionary config)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractContentSource(org.osgi.framework.BundleContext bundleContext,
java.lang.String wicketId,
java.lang.String applicationName)
throws java.lang.IllegalArgumentException
AbstractContentSource.
bundleContext - The bundle context. This argument must not be null.wicketId - The WicketId. This argument must not be null or empty.applicationName - The application name. This argument must not be null or empty.
java.lang.IllegalArgumentException - Thrown if one or some or all arguments are null.| Method Detail |
|---|
public final java.lang.String[] getDestinations()
getDestinations in interface ContentSource<E extends org.apache.wicket.Component>
public final void setDestination(java.lang.String... destinationIds)
throws java.lang.IllegalArgumentException
destinationIds - The destination ids. This argument must not be null.
java.lang.IllegalArgumentException - Thrown if the destinationId argument is not null.
public final E createSourceComponent(java.lang.String wicketId)
throws java.lang.IllegalArgumentException
ContentSource instance. This method must not return
null object.
General convention:
createSourceComponent in interface ContentSource<E extends org.apache.wicket.Component>wicketId - The wicket id. This argument must not be null.
ContentSource instance, or null if user has no access to
this ContentSource.
java.lang.IllegalArgumentException - Thrown if the wicketId argument is null.
public final E createSourceComponent(java.lang.String wicketId,
org.apache.wicket.MarkupContainer parent)
throws java.lang.IllegalArgumentException
ContentSourceContentSource instance. This method must not return
null object.
createSourceComponent in interface ContentSource<E extends org.apache.wicket.Component>wicketId - The wicket id. This argument must not be null.parent - the parent MarkupContainer
ContentSource instance, or null if user has no access to
this ContentSource.
java.lang.IllegalArgumentException - Thrown if the wicketId argument is null.protected E onAuthorizationFailed(java.lang.String wicketId)
wicketId - The WicketId of the content to be created.
public final java.lang.String getSourceId()
getSourceId in interface ContentSource<E extends org.apache.wicket.Component>public final java.lang.String getApplicationName()
protected PaxWicketAuthentication getAuthentication()
public final void setApplicationName(java.lang.String applicationName)
throws java.lang.IllegalArgumentException
applicationName - The application name. This argument must not be null.
java.lang.IllegalArgumentException - Thrown if the applicationName argument is null.
protected abstract E createWicketComponent(java.lang.String wicketId)
throws java.lang.IllegalArgumentException
wicketId.
General convention:
wicketId - The WicketId. This argument must not be null.
wicketId.
java.lang.IllegalArgumentException - Thrown if the either or both arguments are null.
protected <C extends org.apache.wicket.MarkupContainer> E createWicketComponent(java.lang.String wicketId,
C parent)
throws java.lang.IllegalArgumentException
Component
wicketId - The WicketId. This argument must not be null.parent - the parent MarkupContainer
wicketId.
java.lang.IllegalArgumentException - Thrown if the either or both arguments are null.public final void updated(java.util.Dictionary config)
updated in interface org.osgi.service.cm.ManagedServicepublic final org.osgi.framework.ServiceRegistration register()
AbstractContentSource instance.
AbstractContentSource.public org.apache.wicket.authorization.strategies.role.Roles getRequiredRoles()
public org.apache.wicket.authorization.strategies.role.Roles getBasicRoles()
public final void setRoles(org.apache.wicket.authorization.strategies.role.Roles requiredRoles,
org.apache.wicket.authorization.strategies.role.Roles basicRoles)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||