Package org.apache.pluto.container.om.portlet

Examples of org.apache.pluto.container.om.portlet.EventDefinition


            //XMLStreamReader xml = (XMLStreamReader) event.getValue();
           
              //provider.getEventDefinition(event.getQName());
            try {
              // now test if object is jaxb
              EventDefinition eventDefinitionDD = getEventDefintion(portletWindow, event.getQName());
             
              ClassLoader loader = portletContextService.getClassLoader(portletWindow.getPortletDefinition().getApplication().getName());
              Class<? extends Serializable> clazz = loader.loadClass(eventDefinitionDD.getValueType()).asSubclass(Serializable.class);

              JAXBContext jc = JAXBContext.newInstance(clazz);
              Unmarshaller unmarshaller  = jc.createUnmarshaller();

//              unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
View Full Code Here


                //XMLStreamReader xml = (XMLStreamReader) event.getValue();
               
                  //provider.getEventDefinition(event.getQName());
                try {
                  // now test if object is jaxb
                  EventDefinition eventDefinitionDD = getEventDefintion(event.getQName());
                 
                  ClassLoader loader = portletContextService.getClassLoader(portletWindow.getPortletDefinition().getApplication().getName());
                  Class<? extends Serializable> clazz = loader.loadClass(eventDefinitionDD.getValueType()).asSubclass(Serializable.class);

                  JAXBContext jc = JAXBContext.newInstance(clazz);
                  Unmarshaller unmarshaller  = jc.createUnmarshaller();

//                  unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
View Full Code Here

                //XMLStreamReader xml = (XMLStreamReader) event.getValue();
               
                    //provider.getEventDefinition(event.getQName());
                try {
                    // now test if object is jaxb
                    EventDefinition eventDefinitionDD = getEventDefintion(portletWindow, event.getQName());
                   
                    ClassLoader loader = portletContextService.getClassLoader(portletWindow.getPortletDefinition().getApplication().getName());
                    Class<? extends Serializable> clazz = loader.loadClass(eventDefinitionDD.getValueType()).asSubclass(Serializable.class);

                    JAXBContext jc = JAXBContext.newInstance(clazz);
                    Unmarshaller unmarshaller  = jc.createUnmarshaller();

//                  unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
View Full Code Here

        final MockPortletDefinitionId portletDefinitionId = new MockPortletDefinitionId(1);
        final PortletApplicationDefinition portletApplicationDefinition = mock(PortletApplicationDefinition.class);
        final PortletDefinition portletDefinition = mock(PortletDefinition.class);
        final EventDefinitionReference searchRequestEventDefinitionReference = mock(EventDefinitionReference.class);
        final EventDefinitionReference searchResultsEventDefinitionReference = mock(EventDefinitionReference.class);
        final EventDefinition searchRequestEventDefinition = mock(EventDefinition.class);
        final EventDefinition searchResultsEventDefinition = mock(EventDefinition.class);
       
        when(event.getQName()).thenReturn(searchRequestName);
       
        when(searchRequestEventDefinitionReference.getQualifiedName(anyString())).thenReturn(searchRequestName);
        when(searchRequestEventDefinitionReference.getQName()).thenReturn(searchRequestName);
       
        when(searchResultsEventDefinitionReference.getQualifiedName(anyString())).thenReturn(searchResultsName);
        when(searchResultsEventDefinitionReference.getQName()).thenReturn(searchResultsName);
       
        when(searchRequestEventDefinition.getQName()).thenReturn(searchRequestName);
        when(searchRequestEventDefinition.getQualifiedName(anyString())).thenReturn(searchRequestName);
       
        when(searchResultsEventDefinition.getQName()).thenReturn(searchResultsName);
        when(searchResultsEventDefinition.getQualifiedName(anyString())).thenReturn(searchResultsName);


        when(this.portletDefinitionRegistry.getParentPortletApplicationDescriptor(portletDefinitionId)).thenReturn(portletApplicationDefinition);
        when(this.portletDefinitionRegistry.getParentPortletDescriptor(portletDefinitionId)).thenReturn(portletDefinition);
       
View Full Code Here

        catch (XMLStreamException e) {
            throw new IllegalStateException("Failed to create XMLStreamReader for portlet event: " + event, e);
        }
       
        // now test if object is jaxb
        final EventDefinition eventDefinitionDD = getEventDefintion(portletWindow, event.getQName());
       
        final PortletDefinition portletDefinition = portletWindow.getPlutoPortletWindow().getPortletDefinition();
        final PortletApplicationDefinition application = portletDefinition.getApplication();
        final String portletApplicationName = application.getName();
       
        final ClassLoader loader;
        try {
            loader = portletContextService.getClassLoader(portletApplicationName);
        }
        catch (PortletContainerException e) {
            throw new IllegalStateException("Failed to get ClassLoader for portlet application: " + portletApplicationName, e);
        }
       
        final String eventType = eventDefinitionDD.getValueType();
        final Class<? extends Serializable> clazz;
        try {
            clazz = loader.loadClass(eventType).asSubclass(Serializable.class);
        }
        catch (ClassNotFoundException e) {
View Full Code Here

TOP

Related Classes of org.apache.pluto.container.om.portlet.EventDefinition

Copyright © 2018 www.massapicom. 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.