Package uk.nhs.interoperability.payloads

Examples of uk.nhs.interoperability.payloads.Payload


  @Override
  public boolean preProcessSerialise(XMLNamespaceContext namespaces, Object item,
      String xpath, Element parent, Document xmldoc, Field field, Payload payload) {

    Payload p = (Payload)item;
   
    // See if we have an xpath with a variable in that needs replacing
    //String xpath = definition.getXpath();
    xpath = XPaths.replaceVariableInXPath(p, xpath);
   
    Element e = PayloadSerialiser.createNode(namespaces, xpath, parent, xmldoc, null, this, field, payload);
   
    // If there are some namespaces defined within this subclass, output them now and add them to the
    // collection of namespaces passed into the child payload object
    PayloadSerialiser.addNamespaceDeclarations(payload.getNamespaceContext(), e);
    namespaces.inheritNamespaces(p.getNamespaceContext());
   
    PayloadSerialiser.serialiseFieldsInPayload(namespaces, p, e, xmldoc);
    return false;
  }
View Full Code Here


        }
      }
     
      //Logger.info("Calling factory: name=" + definition.getTypeName() + " package=" + packg);
     
      Payload newPayload = DomainObjectFactory.getDomainObject(definition.getTypeName(), packg);
      if (newPayload == null) {
        Logger.trace(" We appear to have a null payload, assume it is an interface and try to select an implementation. The field being processed is: " + definition.getName());
        Logger.trace(" Calling factory with versionedName:'" + versionedName + "' in package:'"+packg+"'");
        newPayload = DomainObjectFactory.getDomainObjectWithVersion(versionedName, packg, definition.getTypeName());
        /*if (newPayload == null) {
View Full Code Here

 
  public static String processDerivedValues(Field field, Payload p) {
    String deriveValueFromTemplateNameUsedInField = field.getDeriveValueFromTemplateNameUsedInField();
    if (deriveValueFromTemplateNameUsedInField != null) {
      Logger.trace(" We need to find a template name from the payload in field: " + deriveValueFromTemplateNameUsedInField);
      Payload childPayloadObject = null;
      if (p.getValue(deriveValueFromTemplateNameUsedInField) != null) {
        childPayloadObject = (Payload)p.getValue(deriveValueFromTemplateNameUsedInField);
        Logger.trace(" Template name found - set as: " + childPayloadObject.getVersionedName());
        return childPayloadObject.getVersionedName();
        //p.setValue(field.getName(), p.getValue(deriveValueFromTemplateNameUsedInField));
      } else {
        Logger.trace(" Unable to get the template from the payload field!");
      }
    }
View Full Code Here

TOP

Related Classes of uk.nhs.interoperability.payloads.Payload

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.