Esempio n. 1
0
  protected <S extends UtilsStatus<S, L, D>> Aht exportStatus(Class<S> c) {
    XmlStatusFactory f =
        new XmlStatusFactory(StatusQuery.get(StatusQuery.Key.StatusExport, "").getStatus());

    Aht xml = new Aht();
    for (S s : fUtils.all(c)) {
      Status status = f.build(s);
      if (mapGroups.containsKey(c)) {
        status.setGroup(mapGroups.get(c));
      }
      xml.getStatus().add(status);
    }
    return xml;
  }
  @Before
  public void init() {
    super.initOfx();
    Status status = new Status();
    status.setCode("myCode");
    status.setLangs(new Langs());
    status.setDescriptions(new Descriptions());

    status.getLangs().getLang().add(XmlLangFactory.create(lang, "myLang"));
    status
        .getDescriptions()
        .getDescription()
        .add(XmlDescriptionFactory.create(lang, "myDescription"));

    xmlStatus = new Aht();
    xmlStatus.getStatus().add(status);

    fOfx = new OfxStatusTableFactory(config, lang, translations);
  }