org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation
Class InjectableConversation

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.InjectableConversation
All Implemented Interfaces:
Serializable, Conversation, EditableConversation

@Typed
public class InjectableConversation
extends Object
implements EditableConversation

See Also:
Serialized Form

Constructor Summary
protected InjectableConversation(javax.enterprise.inject.spi.Bean<?> bean, org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.WindowContextManager windowContextManager)
           
 
Method Summary
<T> void
addBean(org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.BeanEntry<T> beanInstance)
          Adds a BeanEntry which represents a scoped bean to the current conversation
 void close()
          
 void deactivate()
          has to expire a conversation. if the conversation is expired afterwards it has to be inactive
protected  EditableConversation findConversation()
           
 boolean getActiveState()
          
<T> T
getBean(Class<T> key)
          
<T> Set<Class<T>>
getBeanSubGroup(Class<T> key)
          
 boolean isActive()
          
<T> org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.BeanEntry<T>
removeBeanEntry(Class<T> type)
          Allows to remove a bean of the given type
 void restart()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectableConversation

protected InjectableConversation(javax.enterprise.inject.spi.Bean<?> bean,
                                 org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.WindowContextManager windowContextManager)
Method Detail

close

public void close()

Specified by:
close in interface Conversation

restart

public void restart()

Specified by:
restart in interface Conversation

isActive

public boolean isActive()

Specified by:
isActive in interface EditableConversation
Returns:
evaluates and returns if the conversation is active

getActiveState

public boolean getActiveState()

Specified by:
getActiveState in interface EditableConversation
Returns:
returns if the conversation is active (without evaluation)

deactivate

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

Specified by:
deactivate in interface EditableConversation

addBean

public <T> void addBean(org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.BeanEntry<T> beanInstance)
Adds a BeanEntry which represents a scoped bean to the current conversation

Specified by:
addBean in interface EditableConversation
Type Parameters:
T - tpye of the bean
Parameters:
beanInstance - bean instance which should be added to the conversation

getBean

public <T> T getBean(Class<T> key)

Specified by:
getBean in interface EditableConversation
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

public <T> Set<Class<T>> getBeanSubGroup(Class<T> key)

Specified by:
getBeanSubGroup in interface EditableConversation
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

public <T> org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.BeanEntry<T> removeBeanEntry(Class<T> type)
Allows to remove a bean of the given type

Specified by:
removeBeanEntry in interface EditableConversation
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

findConversation

protected EditableConversation findConversation()


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