org.jboss.seam.faces.viewdata
Class ViewDataStoreImpl

java.lang.Object
  extended by org.jboss.seam.faces.viewdata.ViewDataStoreImpl
All Implemented Interfaces:
ViewDataStore

@ApplicationScoped
public class ViewDataStoreImpl
extends Object
implements ViewDataStore

Data store for view specific data.

Author:
Stuart Douglas

Constructor Summary
ViewDataStoreImpl()
           
 
Method Summary
 void addData(String viewId, Annotation annotation)
          Adds data to the store
<T extends Annotation>
List<T>
getAllData(String viewId, Class<T> type)
          returns all data for a given viewId, with the most specific data at the start of the list
<T extends Annotation>
List<T>
getAllDataForCurrentViewId(Class<T> type)
          returns all data for the current viewId, with the most specific data at the start of the list
<T extends Annotation>
T
getData(String viewId, Class<T> type)
          gets the most specific data for a given viewId
<T extends Annotation>
T
getDataForCurrentViewId(Class<T> type)
          gets the most specific data for the current viewId
 void setup(ViewDataConfigurationExtension extension)
          setup the bean with the configuration from the extension It would be better if the extension could do this, but the extension cannot resolve the bean until after all lifecycle events have been processed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewDataStoreImpl

public ViewDataStoreImpl()
Method Detail

setup

@Inject
public void setup(ViewDataConfigurationExtension extension)
setup the bean with the configuration from the extension It would be better if the extension could do this, but the extension cannot resolve the bean until after all lifecycle events have been processed


addData

public void addData(String viewId,
                    Annotation annotation)
Description copied from interface: ViewDataStore
Adds data to the store

Specified by:
addData in interface ViewDataStore
Parameters:
viewId - The view id to associate the data with. A * at the end of the view id is considered a wildcard
annotation - the data to store

getData

public <T extends Annotation> T getData(String viewId,
                                        Class<T> type)
Description copied from interface: ViewDataStore
gets the most specific data for a given viewId

Specified by:
getData in interface ViewDataStore

getDataForCurrentViewId

public <T extends Annotation> T getDataForCurrentViewId(Class<T> type)
Description copied from interface: ViewDataStore
gets the most specific data for the current viewId

Specified by:
getDataForCurrentViewId in interface ViewDataStore

getAllData

public <T extends Annotation> List<T> getAllData(String viewId,
                                                 Class<T> type)
Description copied from interface: ViewDataStore
returns all data for a given viewId, with the most specific data at the start of the list

Specified by:
getAllData in interface ViewDataStore

getAllDataForCurrentViewId

public <T extends Annotation> List<T> getAllDataForCurrentViewId(Class<T> type)
Description copied from interface: ViewDataStore
returns all data for the current viewId, with the most specific data at the start of the list

Specified by:
getAllDataForCurrentViewId in interface ViewDataStore


Copyright © 2011 Seam Framework. All Rights Reserved.