Package org.jboss.soa.esb.listeners.config.xbeanmodel130

Examples of org.jboss.soa.esb.listeners.config.xbeanmodel130.JmsProviderType


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

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

        try {
      bus = (FsBus) 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, FtpListener listener, XMLBeansModel model) throws ConfigurationException {
    Element listenerNode = YADOMUtil.addElement(root, "listener");
    FtpBus bus;
    FtpProvider provider;

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

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

    FtpMessageFilter messageFilter = listener.getFtpMessageFilter();
    if(messageFilter == null) {
      messageFilter = bus.getFtpMessageFilter();
      if(messageFilter == null) {
        throw new ConfigurationException("No <ftp-detination> defined on either <ftp-listener> [" + listener.getName() + "] or <ftp-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

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

    FtpMessageFilter messageFilter = listener.getFtpMessageFilter();
    if(messageFilter == null) {
      messageFilter = bus.getFtpMessageFilter();
      if(messageFilter == null) {
        throw new ConfigurationException("No <ftp-detination> defined on either <ftp-listener> [" + listener.getName() + "] or <ftp-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.
    MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
    if(listener.getIsGateway()) {
      if ( messageFilter.getReadOnly() )
        listenerNode.setAttribute("gatewayClass", ReadOnlyRemoteGatewayListener.class.getName());
      else
        listenerNode.setAttribute("gatewayClass", RemoteGatewayListener.class.getName());
      // Map EPR related attributes onto the listener - from the bus and provider and listener.
      // Note: This will change - the Gateways will also support the EPR element...
View Full Code Here

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

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

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

        return null;
    }

    private WarSecurity getWarSecurity()
    {
        Globals globals = jbossesb.getGlobals();
        if (globals != null)
        {
            return globals.getWarSecurity();
        }
        return null;
    }
View Full Code Here

        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

TOP

Related Classes of org.jboss.soa.esb.listeners.config.xbeanmodel130.JmsProviderType

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.