org.apache.myfaces.extensions.cdi.jsf.impl.config.view
Class DefaultViewConfigDescriptor

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.jsf.impl.config.view.DefaultViewConfigDescriptor
All Implemented Interfaces:
ViewConfigDescriptor, EditableViewConfigDescriptor

public class DefaultViewConfigDescriptor
extends Object
implements EditableViewConfigDescriptor


Constructor Summary
DefaultViewConfigDescriptor(String viewId, Class<? extends ViewConfig> viewDefinitionClass, Page.NavigationMode navigationMode, Page.ViewParameterMode viewParameterMode, List<Class<? extends AccessDecisionVoter>> accessDecisionVoters, Class<? extends ViewConfig> errorView, List<Annotation> metaDataList)
          Constructor for creating a ViewConfigDescriptor
 
Method Summary
 void addPageBean(Class pageBeanClass)
          Allows to add page-beans
 boolean equals(Object o)
          
 List<Class<? extends AccessDecisionVoter>> getAccessDecisionVoters()
          AccessDecisionVoters which should be invoked to secure the page represented by the current entry.
 Class<? extends ViewConfig> getErrorView()
          Exposes the inline error-page
 List<Annotation> getMetaData()
          Custom meta-data which is configured for the entry.
<T extends Annotation>
List<T>
getMetaData(Class<T> target)
          Custom meta-data which is configured for the entry.
 Page.NavigationMode getNavigationMode()
          Navigation type which should be used if type-safe navigation is used
 List<PageBeanDescriptor> getPageBeanDescriptors()
          Page-bean descriptors for the page represented by the current entry.
 Class<? extends ViewConfig> getViewConfig()
          Class which was used for creating the current descriptor
 String getViewId()
          View-ID of the current descriptor
 Page.ViewParameterMode getViewParameterMode()
          Exposes the Page.ViewParameterMode of the current entry
 int hashCode()
          
 void invokeInitViewMethods()
          Invokes the methods annotated with InitView
 void invokePostRenderViewMethods()
          Invokes the methods annotated with PostRenderView
 void invokePrePageActionMethods()
          Invokes the methods annotated with PrePageAction
 void invokePreRenderViewMethods()
          Invokes the methods annotated with PreRenderView
 boolean isPartialViewConfig()
          Exposes if the current view-config represents a partial config which isn't created based on a central config
 void setPartialViewConfig(boolean inlinePageBean)
          Allows to mark the current descriptor as partial config e.g. due to inline configs with View
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultViewConfigDescriptor

public DefaultViewConfigDescriptor(String viewId,
                                   Class<? extends ViewConfig> viewDefinitionClass,
                                   Page.NavigationMode navigationMode,
                                   Page.ViewParameterMode viewParameterMode,
                                   List<Class<? extends AccessDecisionVoter>> accessDecisionVoters,
                                   Class<? extends ViewConfig> errorView,
                                   List<Annotation> metaDataList)
Constructor for creating a ViewConfigDescriptor

Parameters:
viewId - view-id represented by the descriptor
viewDefinitionClass - view-config class
navigationMode - configured navigation-mode
viewParameterMode - configured view-parameter-mode
accessDecisionVoters - configured access-decision-voters
errorView - optional inline error-view
metaDataList - optional meta-data
Method Detail

getViewId

public String getViewId()
View-ID of the current descriptor

Specified by:
getViewId in interface ViewConfigDescriptor
Returns:
current view-id

getViewConfig

public Class<? extends ViewConfig> getViewConfig()
Class which was used for creating the current descriptor

Specified by:
getViewConfig in interface ViewConfigDescriptor
Returns:
view-config class

getNavigationMode

public Page.NavigationMode getNavigationMode()
Navigation type which should be used if type-safe navigation is used

Specified by:
getNavigationMode in interface ViewConfigDescriptor
Returns:
configured navigation mode

getViewParameterMode

public Page.ViewParameterMode getViewParameterMode()
Exposes the Page.ViewParameterMode of the current entry

Specified by:
getViewParameterMode in interface EditableViewConfigDescriptor
Returns:
current view-parameter-mode

getPageBeanDescriptors

public List<PageBeanDescriptor> getPageBeanDescriptors()
Page-bean descriptors for the page represented by the current entry.

Specified by:
getPageBeanDescriptors in interface ViewConfigDescriptor
Returns:
descriptors which represent the page-beans for the current page

invokeInitViewMethods

public void invokeInitViewMethods()
Invokes the methods annotated with InitView

Specified by:
invokeInitViewMethods in interface EditableViewConfigDescriptor

invokePrePageActionMethods

public void invokePrePageActionMethods()
Invokes the methods annotated with PrePageAction

Specified by:
invokePrePageActionMethods in interface EditableViewConfigDescriptor

invokePreRenderViewMethods

public void invokePreRenderViewMethods()
Invokes the methods annotated with PreRenderView

Specified by:
invokePreRenderViewMethods in interface EditableViewConfigDescriptor

invokePostRenderViewMethods

public void invokePostRenderViewMethods()
Invokes the methods annotated with PostRenderView

Specified by:
invokePostRenderViewMethods in interface EditableViewConfigDescriptor

getAccessDecisionVoters

public List<Class<? extends AccessDecisionVoter>> getAccessDecisionVoters()
AccessDecisionVoters which should be invoked to secure the page represented by the current entry.

Specified by:
getAccessDecisionVoters in interface ViewConfigDescriptor
Returns:
configured access-decision-voters

getErrorView

public Class<? extends ViewConfig> getErrorView()
Exposes the inline error-page

Specified by:
getErrorView in interface EditableViewConfigDescriptor
Returns:
inline error-page

getMetaData

public List<Annotation> getMetaData()
Custom meta-data which is configured for the entry. It allows to provide and resolve custom meta-data annotated with ViewMetaData

Specified by:
getMetaData in interface ViewConfigDescriptor
Returns:
custom meta-data of the current entry

getMetaData

public <T extends Annotation> List<T> getMetaData(Class<T> target)
Custom meta-data which is configured for the entry. It allows to provide and resolve custom meta-data annotated with ViewMetaData

Specified by:
getMetaData in interface ViewConfigDescriptor
Parameters:
target - target type
Returns:
custom meta-data for the given type of the current entry

addPageBean

public void addPageBean(Class pageBeanClass)
Allows to add page-beans

Specified by:
addPageBean in interface EditableViewConfigDescriptor
Parameters:
pageBeanClass - page-bean which should be added

setPartialViewConfig

public void setPartialViewConfig(boolean inlinePageBean)
Allows to mark the current descriptor as partial config e.g. due to inline configs with View

Specified by:
setPartialViewConfig in interface EditableViewConfigDescriptor
Parameters:
inlinePageBean - indicates if the entry is in the partial view-config mode

isPartialViewConfig

public boolean isPartialViewConfig()
Exposes if the current view-config represents a partial config which isn't created based on a central config

Specified by:
isPartialViewConfig in interface EditableViewConfigDescriptor
Returns:
true if it is a partial config, false otherwise

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.