Class ModelAdapter<S,C extends Serializable>

java.lang.Object
org.exoplatform.portal.webui.application.ModelAdapter<S,C>

public abstract class ModelAdapter<S,C extends Serializable> extends Object
Version:
$Revision$
Author:
Julien Viet
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <S, C extends Serializable, I>
    ModelAdapter<S,C>
    getAdapter(org.exoplatform.portal.config.model.ApplicationType<S> type)
     
    abstract org.gatein.pc.api.StatefulPortletContext<C>
    getPortletContext(org.exoplatform.container.ExoContainer container, String applicationId, org.exoplatform.portal.config.model.ApplicationState<S> applicationState)
     
    abstract org.gatein.pc.api.PortletContext
    StatefulPortletContext returned by getPortletContext is actually of type PortletStateType.OPAQUE so that it can be properly handled in WSRP...
    abstract org.exoplatform.portal.pom.spi.portlet.Portlet
    getState(org.exoplatform.container.ExoContainer container, org.exoplatform.portal.config.model.ApplicationState<S> applicationState)
    Returns the state of the gadget as preferences or null if the preferences cannot be edited as such.
    abstract C
    getstateFromClonedContext(org.gatein.pc.api.PortletContext originalPortletContext, org.gatein.pc.api.PortletContext clonedPortletContext)
    Extracts the state based on what the current PortletContext is and the new cloned PortletContext
    abstract C
    getStateFromModifiedContext(org.gatein.pc.api.PortletContext originalPortletContext, org.gatein.pc.api.PortletContext modifiedPortletContext)
    Extracts the state based on what the current PortletContext is and the new modified PortletContext.
    abstract org.exoplatform.portal.config.model.ApplicationState<S>
    update(org.exoplatform.container.ExoContainer container, C updateState, org.exoplatform.portal.config.model.ApplicationState<S> applicationState)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModelAdapter

      public ModelAdapter()
  • Method Details

    • getAdapter

      public static <S, C extends Serializable, I> ModelAdapter<S,C> getAdapter(org.exoplatform.portal.config.model.ApplicationType<S> type)
    • getProducerOfferedPortletContext

      public abstract org.gatein.pc.api.PortletContext getProducerOfferedPortletContext(String applicationId)
      StatefulPortletContext returned by getPortletContext is actually of type PortletStateType.OPAQUE so that it can be properly handled in WSRP... This model needs to be revisited if we want to properly support consumer-side state management. See GTNPORTAL-736.
    • getPortletContext

      public abstract org.gatein.pc.api.StatefulPortletContext<C> getPortletContext(org.exoplatform.container.ExoContainer container, String applicationId, org.exoplatform.portal.config.model.ApplicationState<S> applicationState) throws Exception
      Throws:
      Exception
    • update

      public abstract org.exoplatform.portal.config.model.ApplicationState<S> update(org.exoplatform.container.ExoContainer container, C updateState, org.exoplatform.portal.config.model.ApplicationState<S> applicationState) throws Exception
      Throws:
      Exception
    • getState

      public abstract org.exoplatform.portal.pom.spi.portlet.Portlet getState(org.exoplatform.container.ExoContainer container, org.exoplatform.portal.config.model.ApplicationState<S> applicationState) throws Exception
      Returns the state of the gadget as preferences or null if the preferences cannot be edited as such.
      Parameters:
      container - the container
      applicationState - the application state
      Returns:
      the preferences
      Throws:
      Exception - any exception
    • getStateFromModifiedContext

      public abstract C getStateFromModifiedContext(org.gatein.pc.api.PortletContext originalPortletContext, org.gatein.pc.api.PortletContext modifiedPortletContext)
      Extracts the state based on what the current PortletContext is and the new modified PortletContext.
      Parameters:
      originalPortletContext - The current PortletContext for the Portlet
      modifiedPortletContext - The new modified PortletContext
      Returns:
    • getstateFromClonedContext

      public abstract C getstateFromClonedContext(org.gatein.pc.api.PortletContext originalPortletContext, org.gatein.pc.api.PortletContext clonedPortletContext)
      Extracts the state based on what the current PortletContext is and the new cloned PortletContext
      Parameters:
      originalPortletContext - The current PortletContext for the Portlet
      clonedPortletContext - The new cloned PortletContext
      Returns: