Class PortletContainerImpl
- java.lang.Object
-
- org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl
-
- All Implemented Interfaces:
PortletContainerObject,PortletContainer
public class PortletContainerImpl extends Object implements PortletContainerObject
- Version:
- $Revision: 6365 $
- Author:
- Julien Viet
-
-
Field Summary
Fields Modifier and Type Field Description protected PortletApplicationImplapplication.protected StringclassNameThe portlet implementation class name.protected javax.portlet.PortletConfigconfigThe portlet config.protected org.gatein.common.logging.LoggerlogLogger.protected javax.portlet.PortletportletThe portlet instance.protected javax.portlet.PreferencesValidatorpreferencesValidatorThe preference validator, this is not exposed as runtime meta data as it is only used by the JSR 168 portlet container implementation.protected LifeCycleStatusstatusAre we started or not.protected SetuserDataConstraintsUser data constraint.protected org.gatein.common.concurrent.ValvevalveThe invocation valve.
-
Constructor Summary
Constructors Constructor Description PortletContainerImpl(ContainerPortletInfo info)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPortletFilter(PortletFilter filter)Add a filter.voidcreate()Creates the portlet container.voiddestroy()Destroys the portlet container.org.gatein.pc.api.invocation.response.PortletInvocationResponsedispatch(org.gatein.pc.api.invocation.PortletInvocation invocation)Invoke the portlet container.javax.portlet.PortletConfiggetConfig()PortletContainerContextgetContext()Returns the context of the portlet container.StringgetId()Return the portlet container id, unique within the context of the parent application.ContainerPortletInfogetInfo()Returns the runtime meta data of the container.javax.portlet.PortletgetPortlet()PortletApplicationgetPortletApplication()Returns the wired application.javax.portlet.PortletgetPortletInstance()Returns the current instance held by the container.javax.portlet.PreferencesValidatorgetPreferencesValidator()SetgetUserDataConstraints()org.gatein.common.concurrent.ValvegetValve()voidremovePortletFilter(PortletFilter filter)Remove a filter.voidsetContext(PortletContainerContext context)Set/unset the portlet container context.voidsetPortletApplication(PortletApplication application)Set/unset the application.voidstart()Starts the portlet container.voidstop()Stops the portlet container.StringtoString()
-
-
-
Field Detail
-
log
protected final org.gatein.common.logging.Logger log
Logger.
-
application
protected PortletApplicationImpl application
.
-
className
protected String className
The portlet implementation class name.
-
config
protected javax.portlet.PortletConfig config
The portlet config.
-
portlet
protected javax.portlet.Portlet portlet
The portlet instance.
-
valve
protected final org.gatein.common.concurrent.Valve valve
The invocation valve.
-
status
protected LifeCycleStatus status
Are we started or not.
-
userDataConstraints
protected Set userDataConstraints
User data constraint.
-
preferencesValidator
protected javax.portlet.PreferencesValidator preferencesValidator
The preference validator, this is not exposed as runtime meta data as it is only used by the JSR 168 portlet container implementation.
-
-
Constructor Detail
-
PortletContainerImpl
public PortletContainerImpl(ContainerPortletInfo info)
-
-
Method Detail
-
setContext
public void setContext(PortletContainerContext context)
Description copied from interface:PortletContainerObjectSet/unset the portlet container context.- Specified by:
setContextin interfacePortletContainerObject- Parameters:
context- the context
-
getContext
public PortletContainerContext getContext()
Description copied from interface:PortletContainerReturns the context of the portlet container.- Specified by:
getContextin interfacePortletContainer- Returns:
- the context
-
getInfo
public ContainerPortletInfo getInfo()
Description copied from interface:PortletContainerReturns the runtime meta data of the container.- Specified by:
getInfoin interfacePortletContainer- Returns:
- the info
-
getPortletInstance
public javax.portlet.Portlet getPortletInstance()
Description copied from interface:PortletContainerObjectReturns the current instance held by the container.- Specified by:
getPortletInstancein interfacePortletContainerObject- Returns:
- the instance
-
getId
public String getId()
Description copied from interface:PortletContainerReturn the portlet container id, unique within the context of the parent application.- Specified by:
getIdin interfacePortletContainer- Returns:
- the id
-
addPortletFilter
public void addPortletFilter(PortletFilter filter)
Description copied from interface:PortletContainerObjectAdd a filter.- Specified by:
addPortletFilterin interfacePortletContainerObject- Parameters:
filter- the portlet filter
-
removePortletFilter
public void removePortletFilter(PortletFilter filter)
Description copied from interface:PortletContainerObjectRemove a filter.- Specified by:
removePortletFilterin interfacePortletContainerObject- Parameters:
filter- the portlet filter
-
create
public void create() throws ExceptionDescription copied from interface:PortletContainerObjectCreates the portlet container.- Specified by:
createin interfacePortletContainerObject- Throws:
Exception- any exception preventing the creation
-
start
public void start() throws ExceptionDescription copied from interface:PortletContainerObjectStarts the portlet container.- Specified by:
startin interfacePortletContainerObject- Throws:
Exception- any exception preventing the start
-
stop
public void stop()
Description copied from interface:PortletContainerObjectStops the portlet container.- Specified by:
stopin interfacePortletContainerObject
-
destroy
public void destroy()
Description copied from interface:PortletContainerObjectDestroys the portlet container.- Specified by:
destroyin interfacePortletContainerObject
-
getConfig
public javax.portlet.PortletConfig getConfig()
-
getPortlet
public javax.portlet.Portlet getPortlet()
-
getPortletApplication
public PortletApplication getPortletApplication()
Description copied from interface:PortletContainerReturns the wired application.- Specified by:
getPortletApplicationin interfacePortletContainer- Returns:
- the application
-
setPortletApplication
public void setPortletApplication(PortletApplication application)
Description copied from interface:PortletContainerObjectSet/unset the application.- Specified by:
setPortletApplicationin interfacePortletContainerObject- Parameters:
application- the related application
-
getValve
public org.gatein.common.concurrent.Valve getValve()
-
getUserDataConstraints
public Set getUserDataConstraints()
-
getPreferencesValidator
public javax.portlet.PreferencesValidator getPreferencesValidator()
-
dispatch
public org.gatein.pc.api.invocation.response.PortletInvocationResponse dispatch(org.gatein.pc.api.invocation.PortletInvocation invocation) throws org.gatein.pc.api.PortletInvokerException, org.gatein.pc.api.invocation.InvocationExceptionDescription copied from interface:PortletContainerInvoke the portlet container.- Specified by:
dispatchin interfacePortletContainer- Parameters:
invocation- the portlet invocation- Returns:
- the portlet invocation response
- Throws:
org.gatein.pc.api.PortletInvokerException- a portlet invoker exceptionorg.gatein.pc.api.invocation.InvocationException- an invocation exception
-
-