Examples of EditableConversation


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

        Class<? extends Annotation> scopeType = convertToScope(this.beanManager, conversationGroupKey, qualifiers);

        ConversationKey conversationKey =
                new DefaultConversationKey(scopeType, conversationGroupKey, qualifiers);

        EditableConversation conversation = RequestCache.getConversation(conversationKey);

        if(conversation == null)
        {
            conversation = getConversationForKey(conversationKey, false);

            //TODO
            if (conversation != null && !conversation.isActive())
            {
                closeAndRemoveConversation(conversationKey, conversation, subGroups, true);
                conversation = null;
            }
View Full Code Here

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

        Class<? extends Annotation> scopeType = convertToScope(this.beanManager, conversationGroupKey, qualifiers);

        ConversationKey conversationKey =
                new DefaultConversationKey(scopeType, conversationGroupKey, qualifiers);

        EditableConversation conversation = RequestCache.getConversation(conversationKey);

        if(conversation == null)
        {
            conversation = getConversationForKey(conversationKey, false);

            if (conversation == null)
            {
                return false;
            }
        }
        return conversation.getActiveState();
    }
View Full Code Here

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

        Class<? extends Annotation> scopeType = convertToScope(this.beanManager, conversationGroupKey, qualifiers);

        ConversationKey conversationKey =
                new DefaultConversationKey(scopeType, conversationGroupKey, qualifiers);

        EditableConversation conversation = getConversationForKey(conversationKey, true);

        return closeAndRemoveConversation(conversationKey, conversation, subGroups, true);
    }
View Full Code Here

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

        return null;
    }

    private EditableConversation closeSubGroups(ConversationKey conversationKey, Class<?>[] subGroups)
    {
        EditableConversation editableConversation = this.groupedConversations.get(conversationKey);

        if(editableConversation == null)
        {
            throw new IllegalStateException(conversationKey.toString() +
                    " is no valid key for an existing conversation");
        }

        List<Class<?>> implicitSubGroupCandidates = new ArrayList<Class<?>>();
        for(Class<?> subGroup : subGroups)
        {
            if(editableConversation.removeBeanEntry(subGroup) == null)
            {
                //no bean was scoped -> try to use the sub-group as sub-group-type
                implicitSubGroupCandidates.add(subGroup);
            }
        }
View Full Code Here

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

     */
    public void removeInactiveConversations()
    {
        Iterator<EditableConversation> conversations = this.groupedConversations.values().iterator();

        EditableConversation conversation;
        while (conversations.hasNext())
        {
            conversation = conversations.next();

            if (!conversation.getActiveState())
            {
                conversations.remove();
            }
        }
    }
View Full Code Here

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

        return (T)this.attributes.get(name);
    }

    private EditableConversation getConversationForKey(ConversationKey conversationKey, boolean forceNewConversation)
    {
        EditableConversation editableConversation = this.groupedConversations.get(conversationKey);

        if(editableConversation != null)
        {
            return editableConversation;
        }
View Full Code Here

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

        {
            throw ExceptionUtils.windowContextManagerNotEditableException(windowContextManager);
        }

        Class<?> beanClass = beanDescriptor.getBeanClass();
        EditableConversation foundConversation = getConversation(
                (EditableWindowContextManager)windowContextManager, beanDescriptor);

        //noinspection unchecked
        return (T)foundConversation.getBean(beanClass);
    }
View Full Code Here

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

        {
            throw ExceptionUtils.windowContextManagerNotEditableException(windowContextManager);
        }

        Bean<?> bean = beanEntry.getBean();
        EditableConversation foundConversation =
                getConversation((EditableWindowContextManager)windowContextManager, bean);

        foundConversation.addBean(beanEntry);
    }
View Full Code Here

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

        {
            throw ExceptionUtils.windowContextManagerNotEditableException(windowContextManager);
        }

        Class<?> beanClass = beanDescriptor.getBeanClass();
        EditableConversation foundConversation = getConversation(
                (EditableWindowContextManager)windowContextManager, beanDescriptor);

        //noinspection unchecked
        return (T)foundConversation.getBean(beanClass);
    }
View Full Code Here

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

        {
            throw ExceptionUtils.windowContextManagerNotEditableException(windowContextManager);
        }

        Bean<?> bean = beanEntry.getBean();
        EditableConversation foundConversation =
                getConversation((EditableWindowContextManager)windowContextManager, bean);

        foundConversation.addBean(beanEntry);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.