Package org.jboss.soa.esb.listeners.config.xbeanmodel120.FtpBusDocument

Examples of org.jboss.soa.esb.listeners.config.xbeanmodel120.FtpBusDocument.FtpBus


        return serviceContractList;
    }
   
    public String getAuthDomain()
    {
        WarSecurity warSecurity = getWarSecurity();
        if (warSecurity != null)
        {
          return warSecurity.getDomain();
        }
        return null;
    }
View Full Code Here


        return null;
    }
   
    public String getAuthMethod()
    {
        WarSecurity warSecurity = getWarSecurity();
        if (warSecurity != null)
        {
            return warSecurity.getMethod().toString();
        }
        return null;
    }
View Full Code Here

   * @return The ConfigTree listener configuration node.
   * @throws org.jboss.soa.esb.ConfigurationException Invalid listener configuration.
   */
  public static Element map(Element root, HibernateListener listener, XMLBeansModel model) throws ConfigurationException {
    Element listenerNode = YADOMUtil.addElement(root, "listener");
    HibernateBus bus;
    HibernateProvider provider;

        listenerNode.setAttribute("name", listener.getName());

    try {
      bus = (HibernateBus) model.getBus(listener.getBusidref());
    } catch (ClassCastException e) {
      throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <hibernate-listener> must reference a <hibernate-bus>.");
    }
    try {
      provider = (HibernateProvider) model.getProvider(bus);
    } catch (ClassCastException e) {
      throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <hibernate-provider> instance.  Unexpected exception - this should have caused a validation error!");
    }

    List<HibernateMessageFilter> messageFilters = null;
    messageFilters = listener.getHibernateMessageFilterList();

    if(messageFilters.size() == 0) {
      messageFilters = bus.getHibernateMessageFilterList();
      if(messageFilters == null) {
        throw new ConfigurationException("No <hibernate-message-filter> defined on either <hibernate-listener> [" + listener.getName() + "] or <hibernate-bus> [" + bus.getBusid() + "].");
      }
    }
    // Map the standard listener attributes - common across all listener types...
    MapperUtil.mapDefaultAttributes(listener, listenerNode, model);
    // Map the <property> elements targeted at the listener - from the listener itself.
View Full Code Here

   * @throws org.jboss.soa.esb.ConfigurationException Invalid listener configuration.
   */
  public static Element map(Element root, HibernateListener listener, XMLBeansModel model) throws ConfigurationException {
    Element listenerNode = YADOMUtil.addElement(root, "listener");
    HibernateBus bus;
    HibernateProvider provider;

        listenerNode.setAttribute("name", listener.getName());

    try {
      bus = (HibernateBus) model.getBus(listener.getBusidref());
View Full Code Here

     * @return The ConfigTree listener configuration node.
     * @throws org.jboss.soa.esb.ConfigurationException Invalid listener configuration.
     */
    public static Element map(Element root, HttpGateway listener, XMLBeansModel model) throws ConfigurationException {
        Element listenerNode = YADOMUtil.addElement(root, "listener");
        HttpBus bus;
        HttpProvider provider;

        listenerNode.setAttribute("name", listener.getName());

        try {
            bus = (HttpBus) model.getOptionalBus(listener.getBusidref());
        } catch (ClassCastException e) {
            throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <http-listener> must reference a <http-bus>.");
        }

        // Map the standard listener attributes - common across all listener types...
        MapperUtil.mapDefaultAttributes(listener, listenerNode, model);

        String urlPattern = listener.getUrlPattern();
        PayloadAs.Enum payloadAs = listener.getPayloadAs();

        if(listener.getAsyncResponseList() != null && !listener.getAsyncResponseList().isEmpty()) {
            AsyncHttpResponse asyncResponse = listener.getAsyncResponseList().get(0);
            listenerNode.setAttribute(HttpGatewayServlet.ASYNC_SERVICE_INVOKE, "true");
            listenerNode.setAttribute(HttpGatewayServlet.ASYNC_STATUS_CODE, Integer.toString(asyncResponse.getStatusCode()));
            AsyncHttpResponse.Payload payload = asyncResponse.getPayload();
            if(payload != null) {
                listenerNode.setAttribute(HttpGatewayServlet.ASYNC_PAYLOAD, payload.getClasspathResource());
                listenerNode.setAttribute(HttpGatewayServlet.ASYNC_PAYLOAD_CONTENT_TYPE, payload.getContentType());
                if(payload.getCharacterEncoding() != null) {
                    listenerNode.setAttribute(HttpGatewayServlet.ASYNC_PAYLOAD_CHARACTER_ENCODING, payload.getCharacterEncoding());
                }
            }
        } else {
            listenerNode.setAttribute(HttpGatewayServlet.ASYNC_SERVICE_INVOKE, "false");
        }

        if(bus != null) {
            try {
                provider = (HttpProvider) model.getProvider(bus);
            } catch (ClassCastException e) {
                throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <http-provider> instance.  Unexpected exception - this should have caused a validation error!");
            }

            // Map the <property> elements targeted at the listener - from the listener itself.
            //MapperUtil.mapProperties(provider.getPropertyList(), listenerNode);
            for(Property property : provider.getPropertyList()) {
                Element propertyElement = listenerNode.getOwnerDocument().createElement("property");
                MapperUtil.serialize(property, propertyElement);
                listenerNode.appendChild(propertyElement);
            }

            List<HttpBus.ProtectedMethods> protectedMethodsList = bus.getProtectedMethodsList();
            List<HttpBus.AllowedRoles> rolesList = bus.getAllowedRolesList();
            HttpBus.TransportGuarantee.Enum transportGuarantee = bus.getTransportGuarantee();

            MapperUtil.mapProperties(bus.getPropertyList(), listenerNode);
            mapStandardSettings(listenerNode, urlPattern, payloadAs, listener.getPropertyList());

            if(protectedMethodsList != null && !protectedMethodsList.isEmpty()) {
                HttpBus.ProtectedMethods methods = protectedMethodsList.get(0);
                StringBuilder methodsString = new StringBuilder();
View Full Code Here

    private static void mapExceptionStatusMappings(Element listenerNode, HttpProvider provider, HttpGateway listener) throws ConfigurationException {
        StringBuilder exceptionMappingsAttrBuilder = new StringBuilder();

        if(provider != null) {
            HttpExceptionMappings providerExceptionConfig = provider.getException();
            if(providerExceptionConfig != null) {
                buildExceptionMappingCSV(exceptionMappingsAttrBuilder, providerExceptionConfig);
            }
        }

        if(listener != null && listener.getExceptionList() != null && !listener.getExceptionList().isEmpty()) {
            HttpExceptionMappings listenerExceptionConfig = listener.getExceptionList().get(0);
            buildExceptionMappingCSV(exceptionMappingsAttrBuilder, listenerExceptionConfig);
        }

        if(exceptionMappingsAttrBuilder.length() > 0) {
            listenerNode.setAttribute(org.jboss.soa.esb.listeners.gateway.http.HttpGatewayServlet.EXCEPTION_MAPPINGS, exceptionMappingsAttrBuilder.toString());
View Full Code Here

     * @throws org.jboss.soa.esb.ConfigurationException Invalid listener configuration.
     */
    public static Element map(Element root, HttpGateway listener, XMLBeansModel model) throws ConfigurationException {
        Element listenerNode = YADOMUtil.addElement(root, "listener");
        HttpBus bus;
        HttpProvider provider;

        listenerNode.setAttribute("name", listener.getName());

        try {
            bus = (HttpBus) model.getOptionalBus(listener.getBusidref());
        } catch (ClassCastException e) {
            throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <http-listener> must reference a <http-bus>.");
        }

        // Map the standard listener attributes - common across all listener types...
        MapperUtil.mapDefaultAttributes(listener, listenerNode, model);

        String urlPattern = listener.getUrlPattern();
        PayloadAs.Enum payloadAs = listener.getPayloadAs();

        if(listener.getAsyncResponseList() != null && !listener.getAsyncResponseList().isEmpty()) {
            AsyncHttpResponse asyncResponse = listener.getAsyncResponseList().get(0);
            listenerNode.setAttribute(HttpGatewayServlet.ASYNC_SERVICE_INVOKE, "true");
            listenerNode.setAttribute(HttpGatewayServlet.ASYNC_STATUS_CODE, Integer.toString(asyncResponse.getStatusCode()));
            AsyncHttpResponse.Payload payload = asyncResponse.getPayload();
            if(payload != null) {
                listenerNode.setAttribute(HttpGatewayServlet.ASYNC_PAYLOAD, payload.getClasspathResource());
                listenerNode.setAttribute(HttpGatewayServlet.ASYNC_PAYLOAD_CONTENT_TYPE, payload.getContentType());
                if(payload.getCharacterEncoding() != null) {
                    listenerNode.setAttribute(HttpGatewayServlet.ASYNC_PAYLOAD_CHARACTER_ENCODING, payload.getCharacterEncoding());
                }
            }
        } else {
            listenerNode.setAttribute(HttpGatewayServlet.ASYNC_SERVICE_INVOKE, "false");
        }

        if(bus != null) {
            try {
                provider = (HttpProvider) model.getProvider(bus);
            } catch (ClassCastException e) {
                throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <http-provider> instance.  Unexpected exception - this should have caused a validation error!");
            }

            // Map the <property> elements targeted at the listener - from the listener itself.
            //MapperUtil.mapProperties(provider.getPropertyList(), listenerNode);
            for(Property property : provider.getPropertyList()) {
                Element propertyElement = listenerNode.getOwnerDocument().createElement("property");
                MapperUtil.serialize(property, propertyElement);
                listenerNode.appendChild(propertyElement);
            }

View Full Code Here

     * @return The ConfigTree listener configuration node.
     * @throws org.jboss.soa.esb.ConfigurationException Invalid listener configuration.
     */
    public static Element map(Element root, JbrListener listener, XMLBeansModel model) throws ConfigurationException {
        Element listenerNode = YADOMUtil.addElement(root, "listener");
        JbrBus bus;
        JbrProvider provider;

        listenerNode.setAttribute("name", listener.getName());

        try {
            bus = (JbrBus) model.getBus(listener.getBusidref());
        } catch (ClassCastException e) {
            throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <jbr-listener> must reference a <jbr-bus>.");
        }
        try {
            provider = (JbrProvider) model.getProvider(bus);
        } catch (ClassCastException e) {
            throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <jbr-provider> instance.  Unexpected exception - this should have caused a validation error!");
        }

        // Map the standard listener attributes - common across all listener types...
        MapperUtil.mapDefaultAttributes(listener, listenerNode, model);
        // Map the <property> elements targeted at the listener - from the listener itself.
        MapperUtil.mapProperties(provider.getPropertyList(), listenerNode);
        MapperUtil.mapProperties(bus.getPropertyList(), listenerNode);
        MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);

        if(listener.getIsGateway()) {
            String host = provider.getHost();

            listenerNode.setAttribute("gatewayClass", JBossRemotingGatewayListener.class.getName());
      listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));

            if(host != null) {
                listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_HOST, host);
            }
            listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_PROTOCOL, provider.getProtocol().toString());
            listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_PORT, Integer.toString(bus.getPort()));
        } else {
            throw new ConfigurationException("Invalid <jbr-listener> config [" + listener.getName() + "].  <jbr-listener> is currently only supported as a gateway listener.");
        }

        return listenerNode;
View Full Code Here

     * @throws org.jboss.soa.esb.ConfigurationException Invalid listener configuration.
     */
    public static Element map(Element root, JbrListener listener, XMLBeansModel model) throws ConfigurationException {
        Element listenerNode = YADOMUtil.addElement(root, "listener");
        JbrBus bus;
        JbrProvider provider;

        listenerNode.setAttribute("name", listener.getName());

        try {
            bus = (JbrBus) model.getBus(listener.getBusidref());
        } catch (ClassCastException e) {
            throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <jbr-listener> must reference a <jbr-bus>.");
        }
        try {
            provider = (JbrProvider) model.getProvider(bus);
        } catch (ClassCastException e) {
            throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <jbr-provider> instance.  Unexpected exception - this should have caused a validation error!");
        }

        // Map the standard listener attributes - common across all listener types...
        MapperUtil.mapDefaultAttributes(listener, listenerNode, model);
        // Map the <property> elements targeted at the listener - from the listener itself.
        MapperUtil.mapProperties(provider.getPropertyList(), listenerNode);
        MapperUtil.mapProperties(bus.getPropertyList(), listenerNode);
        MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);

        if(listener.getIsGateway()) {
            String host = provider.getHost();

            listenerNode.setAttribute("gatewayClass", JBossRemotingGatewayListener.class.getName());
      listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));

            if(host != null) {
                listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_HOST, host);
            }
            listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_PROTOCOL, provider.getProtocol().toString());
            listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_PORT, Integer.toString(bus.getPort()));
        } else {
            throw new ConfigurationException("Invalid <jbr-listener> config [" + listener.getName() + "].  <jbr-listener> is currently only supported as a gateway listener.");
        }

View Full Code Here

   * @return The ConfigTree listener configuration node.
   * @throws org.jboss.soa.esb.ConfigurationException Invalid listener configuration.
   */
  public static Element map(Element root, JmsListener listener, XMLBeansModel model) throws ConfigurationException {
    Element listenerNode = YADOMUtil.addElement(root, "listener");
    JmsBus bus;
    JmsProviderType provider;

        listenerNode.setAttribute("name", listener.getName());

    try {
      bus = (JmsBus) model.getBus(listener.getBusidref());
    } catch (ClassCastException e) {
      throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <jms-listener> must reference a <jms-bus>.");
    }
    try {
      provider = (JmsProviderType) model.getProvider(bus);
    } catch (ClassCastException e) {
      throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <jms-provider> instance.  Unexpected exception - this should have caused a validation error!");
    }

    JmsMessageFilter messageFilter = listener.getJmsMessageFilter();
    if(messageFilter == null) {
      messageFilter = bus.getJmsMessageFilter();
      if(messageFilter == null) {
        throw new ConfigurationException("No <jms-detination> defined on either <jms-listener> [" + listener.getName() + "] or <jms-bus> [" + bus.getBusid() + "].");
      }
    }

    final Class<?> gatewayClass ;
    if (provider instanceof JmsJcaProvider) {
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.listeners.config.xbeanmodel120.FtpBusDocument.FtpBus

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.