Package org.megatome.frame2.jaxbgen

Examples of org.megatome.frame2.jaxbgen.PurchaseOrderType


    return resolveForward(result, HTML_TOKEN);
  }

  private EventMapping mappingFor(String eventName) throws ConfigException {
    EventMapping mapping = this.eventMappings.get(eventName);

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


  }

  public String[] rolesfor(String event) throws ConfigException {
    final String[] TYPE = new String[0];

    EventMapping mapping = mappingFor(event);

    if (mapping != null) {
      return mapping.getRoles();
    }

    return TYPE;
  }
View Full Code Here

  public ForwardProxy resolveForward(EventHandlerProxy handler, String token,
      String tokenType) throws ViewException {
    // look in local forward first
    // then in global forward
    Forward fwd = null;

    if (tokenType.equals(HTML_TOKEN)) {
      fwd = handler.getDefinition().getHTMLForward(token);
    } else if (tokenType.equals(XML_TOKEN)) {
      fwd = handler.getDefinition().getXMLForward(token);
View Full Code Here

  }

  public ForwardProxy resolveForward(String token, String tokenType)
      throws ViewException {
    // global forward
    Forward fwd = resolveGlobalForward(token, tokenType);

    return new ForwardProxy(fwd);
  }
View Full Code Here

  }

  public Forward resolveGlobalForward(String token, String tokenType)
      throws ViewException {
    // global forward
    Forward fwd = null;

    if (tokenType.equals(HTML_TOKEN)) {
      fwd = getGlobalHTMLForward(token);
    } else if (tokenType.equals(XML_TOKEN)) {
      fwd = getGlobalXMLForward(token);
View Full Code Here

    for (ExceptionDef edef : this.exceptions) {
      String classtype = edef.getType();
      try {
        if (Class.forName(classtype).isInstance(ex)) {
          String view = edef.getView(vtype.toString());
          Forward fwd = resolveGlobalForward(view, tokenType);
          return new ExceptionProxy(fwd, edef);
        }
      } catch (ClassNotFoundException e) { // Not concerned with this
      }
    }
View Full Code Here

  @SuppressWarnings("unchecked")
  static public RequestProcessor instance(Configuration config,
      ServletContext context, HttpServletRequest request,
      HttpServletResponse response) {

    RequestProcessorDef requestProcessorDef = config
        .getHttpRequestProcessor();
    if (requestProcessorDef != null) {

      Class<RequestProcessor> c = createClass(requestProcessorDef
          .getType());
      if (c == null) {
        return null;
      }
View Full Code Here

  @SuppressWarnings("unchecked")
  static public RequestProcessor instance(Configuration config,
      Element[] elements, String eventPkg) {

    RequestProcessorDef requestProcessorDef = config
        .getSoapRequestProcessor();
    if (requestProcessorDef != null) {

      Class c = createClass(requestProcessorDef.getType());
      if (c == null) {
        return null;
      }

      Object[] objects = { config, elements, eventPkg };
View Full Code Here

            }

            if (eventProxy.isParent()) {
              // put eventNames in arraylist for iteration
              // put events in list mapped by eventName
              JaxbEventBase evt = unmarshall(unmarshaller, DOMStreamConverter
                  .toInputStream(element));
              evt.setValidatingSchema(s);
              eventList.add(evt);
              /*
               * eventList.add((Event)unmarshaller
               * .unmarshal(DOMStreamConverter
               * .toInputStream(this.elements[i])));
               */
              event.setResolve(ResolveType.PARENT);
              event.setEvents(eventList);
              events.add(event);
            } else if (eventProxy.isChildren()) {
              NodeList nodeList = element.getChildNodes();

              for (int j = 0; j < nodeList.getLength(); j++) {
                if (nodeList.item(j).getNodeType() == Node.ELEMENT_NODE) {
                  JaxbEventBase evt = unmarshall(unmarshaller,
                      DOMStreamConverter
                          .toInputStream(nodeList
                              .item(j)));
                  evt.setValidatingSchema(s);
                  eventList.add(evt);
                  /*
                   * eventList.add((Event)unmarshaller
                   * .unmarshal(DOMStreamConverter
                   * .toInputStream(nodeList .item(j))));
View Full Code Here

        Marshaller marshaller = jcontext.createMarshaller();

        Document doc = getTargetDocument();
       
        if (obj instanceof JaxbEventBase) {
          JaxbEventBase jeb = (JaxbEventBase)obj;
          marshaller.marshal(jeb.getMarshallableType(), doc);
        } else {
          marshaller.marshal(obj, doc);
        }
        result = doc.getDocumentElement();
      } catch (JAXBException e) {
View Full Code Here

TOP

Related Classes of org.megatome.frame2.jaxbgen.PurchaseOrderType

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.