org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.spi
Interface EditableConversation

All Superinterfaces:
Conversation, Serializable
All Known Implementing Classes:
DefaultConversation, InjectableConversation

public interface EditableConversation
extends Conversation

Allows to implement custom implementations of Conversation


Method Summary
<T> void
addBean(BeanEntry<T> beanInstance)
          Adds a BeanEntry which represents a scoped bean to the current conversation
 void deactivate()
          has to expire a conversation. if the conversation is expired afterwards it has to be inactive
 boolean getActiveState()
           
<T> T
getBean(Class<T> key)
           
<T> Set<Class<T>>
getBeanSubGroup(Class<T> key)
           
 boolean isActive()
           
<T> BeanEntry<T>
removeBeanEntry(Class<T> type)
          Allows to remove a bean of the given type
 
Methods inherited from interface org.apache.myfaces.extensions.cdi.core.api.scope.conversation.Conversation
close, restart
 

Method Detail

isActive

boolean isActive()
Returns:
evaluates and returns if the conversation is active

getActiveState

boolean getActiveState()
Returns:
returns if the conversation is active (without evaluation)

deactivate

void deactivate()
has to expire a conversation. if the conversation is expired afterwards it has to be inactive


addBean

<T> void addBean(BeanEntry<T> beanInstance)
Adds a BeanEntry which represents a scoped bean to the current conversation

Type Parameters:
T - tpye of the bean
Parameters:
beanInstance - bean instance which should be added to the conversation

getBean

<T> T getBean(Class<T> key)
Type Parameters:
T - type of the requested bean
Parameters:
key - class of the requested bean
Returns:
an instance of the requested bean if the conversation is active - null otherwise

getBeanSubGroup

<T> Set<Class<T>> getBeanSubGroup(Class<T> key)
Type Parameters:
T - type of the requested group
Parameters:
key - class of the requested sub-group
Returns:
a set of bean-types which are stored in the current conversation for the given group

removeBeanEntry

<T> BeanEntry<T> removeBeanEntry(Class<T> type)
Allows to remove a bean of the given type

Type Parameters:
T - target type
Parameters:
type - type of the bean
Returns:
the bean entry of the removed bean or null if there was no bean in the conversation


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