예제 #1
0
 public static void fillFieldsfromXML(
     org.dom4j.Element el,
     ims.domain.DomainFactory factory,
     OrderEntryTemplate obj,
     java.util.HashMap domMap)
     throws Exception {
   org.dom4j.Element fldEl;
   fldEl = el.element("formName");
   if (fldEl != null) {
     obj.setFormName(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("menuName");
   if (fldEl != null) {
     obj.setMenuName(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("description");
   if (fldEl != null) {
     obj.setDescription(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("components");
   if (fldEl != null) {
     fldEl = fldEl.element("set");
     obj.setComponents(
         ims.ocrr.configuration.domain.objects.OrderEntryTemplateComponent.fromSetXMLString(
             fldEl, factory, obj.getComponents(), domMap));
   }
   fldEl = el.element("templateCategory");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setTemplateCategory(ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("activeStatus");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setActiveStatus(ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("templatesLocations");
   if (fldEl != null) {
     fldEl = fldEl.element("set");
     obj.setTemplatesLocations(
         ims.ocrr.configuration.domain.objects.TemplateLocation.fromSetXMLString(
             fldEl, factory, obj.getTemplatesLocations(), domMap));
   }
   fldEl = el.element("columns");
   if (fldEl != null) {
     fldEl = fldEl.element("set");
     obj.setColumns(
         ims.ocrr.configuration.domain.objects.OrderEntryTemplateColumn.fromSetXMLString(
             fldEl, factory, obj.getColumns(), domMap));
   }
   fldEl = el.element("templateRoles");
   if (fldEl != null) {
     fldEl = fldEl.element("set");
     obj.setTemplateRoles(
         ims.ocrr.configuration.domain.objects.TemplateRole.fromSetXMLString(
             fldEl, factory, obj.getTemplateRoles(), domMap));
   }
   fldEl = el.element("formText");
   if (fldEl != null) {
     obj.setFormText(new String(fldEl.getTextTrim()));
   }
 }
예제 #2
0
  public String toAuditString() {
    StringBuffer auditStr = new StringBuffer();

    auditStr.append("\r\n*formName* :");
    auditStr.append(formName);
    auditStr.append("; ");
    auditStr.append("\r\n*menuName* :");
    auditStr.append(menuName);
    auditStr.append("; ");
    auditStr.append("\r\n*description* :");
    auditStr.append(description);
    auditStr.append("; ");
    auditStr.append("\r\n*components* :");
    if (components != null) {
      java.util.Iterator it4 = components.iterator();
      int i4 = 0;
      while (it4.hasNext()) {
        if (i4 > 0) auditStr.append(",");
        ims.ocrr.configuration.domain.objects.OrderEntryTemplateComponent obj =
            (ims.ocrr.configuration.domain.objects.OrderEntryTemplateComponent) it4.next();
        if (obj != null) {
          if (i4 == 0) {
            auditStr.append(toShortClassName(obj));
            auditStr.append("[");
          }

          auditStr.append(obj.getId());
        }
        i4++;
      }
      if (i4 > 0) auditStr.append("] " + i4);
    }
    auditStr.append("; ");
    auditStr.append("\r\n*templateCategory* :");
    if (templateCategory != null) auditStr.append(templateCategory.getText());
    auditStr.append("; ");
    auditStr.append("\r\n*activeStatus* :");
    if (activeStatus != null) auditStr.append(activeStatus.getText());
    auditStr.append("; ");
    auditStr.append("\r\n*templatesLocations* :");
    if (templatesLocations != null) {
      java.util.Iterator it7 = templatesLocations.iterator();
      int i7 = 0;
      while (it7.hasNext()) {
        if (i7 > 0) auditStr.append(",");
        ims.ocrr.configuration.domain.objects.TemplateLocation obj =
            (ims.ocrr.configuration.domain.objects.TemplateLocation) it7.next();
        if (obj != null) {
          if (i7 == 0) {
            auditStr.append(toShortClassName(obj));
            auditStr.append("[");
          }

          auditStr.append(obj.getId());
        }
        i7++;
      }
      if (i7 > 0) auditStr.append("] " + i7);
    }
    auditStr.append("; ");
    auditStr.append("\r\n*columns* :");
    if (columns != null) {
      java.util.Iterator it8 = columns.iterator();
      int i8 = 0;
      while (it8.hasNext()) {
        if (i8 > 0) auditStr.append(",");
        ims.ocrr.configuration.domain.objects.OrderEntryTemplateColumn obj =
            (ims.ocrr.configuration.domain.objects.OrderEntryTemplateColumn) it8.next();
        if (obj != null) {
          if (i8 == 0) {
            auditStr.append(toShortClassName(obj));
            auditStr.append("[");
          }

          auditStr.append(obj.getId());
        }
        i8++;
      }
      if (i8 > 0) auditStr.append("] " + i8);
    }
    auditStr.append("; ");
    auditStr.append("\r\n*templateRoles* :");
    if (templateRoles != null) {
      java.util.Iterator it9 = templateRoles.iterator();
      int i9 = 0;
      while (it9.hasNext()) {
        if (i9 > 0) auditStr.append(",");
        ims.ocrr.configuration.domain.objects.TemplateRole obj =
            (ims.ocrr.configuration.domain.objects.TemplateRole) it9.next();
        if (obj != null) {
          if (i9 == 0) {
            auditStr.append(toShortClassName(obj));
            auditStr.append("[");
          }

          auditStr.append(obj.getId());
        }
        i9++;
      }
      if (i9 > 0) auditStr.append("] " + i9);
    }
    auditStr.append("; ");
    auditStr.append("\r\n*formText* :");
    auditStr.append(formText);
    auditStr.append("; ");
    return auditStr.toString();
  }