private void readProjectConfigs() {
/*--------------------------------
* projektabhängig die richtigen Felder in der Gui anzeigen
* --------------------------------*/
ConfigProjects cp = null;
try {
cp = new ConfigProjects(this.prozessVorlage.getProjekt().getTitel());
} catch (IOException e) {
Helper.setFehlerMeldung("IOException", e.getMessage());
return;
}
this.docType = cp.getParamString("createNewProcess.defaultdoctype", this.co.getAllDoctypes().get(0).getTitle());
this.useOpac = cp.getParamBoolean("createNewProcess.opac[@use]");
this.useTemplates = cp.getParamBoolean("createNewProcess.templates[@use]");
this.naviFirstPage = "ProzessverwaltungKopie1";
if (this.opacKatalog.equals("")) {
this.opacKatalog = cp.getParamString("createNewProcess.opac.catalogue");
}
/*
* -------------------------------- die auszublendenden Standard-Felder ermitteln --------------------------------
*/
for (String t : cp.getParamList("createNewProcess.itemlist.hide")) {
this.standardFields.put(t, false);
}
/*
* -------------------------------- die einzublendenen (zusätzlichen) Eigenschaften ermitteln --------------------------------
*/
int count = cp.getParamList("createNewProcess.itemlist.item").size();
for (int i = 0; i < count; i++) {
AdditionalField fa = new AdditionalField(this);
fa.setFrom(cp.getParamString("createNewProcess.itemlist.item(" + i + ")[@from]"));
fa.setTitel(cp.getParamString("createNewProcess.itemlist.item(" + i + ")"));
fa.setRequired(cp.getParamBoolean("createNewProcess.itemlist.item(" + i + ")[@required]"));
fa.setIsdoctype(cp.getParamString("createNewProcess.itemlist.item(" + i + ")[@isdoctype]"));
fa.setIsnotdoctype(cp.getParamString("createNewProcess.itemlist.item(" + i + ")[@isnotdoctype]"));
// attributes added 30.3.09
String test = (cp.getParamString("createNewProcess.itemlist.item(" + i + ")[@initStart]"));
fa.setInitStart(test);
fa.setInitEnd(cp.getParamString("createNewProcess.itemlist.item(" + i + ")[@initEnd]"));
/*
* -------------------------------- Bindung an ein Metadatum eines Docstructs --------------------------------
*/
if (cp.getParamBoolean("createNewProcess.itemlist.item(" + i + ")[@ughbinding]")) {
fa.setUghbinding(true);
fa.setDocstruct(cp.getParamString("createNewProcess.itemlist.item(" + i + ")[@docstruct]"));
fa.setMetadata(cp.getParamString("createNewProcess.itemlist.item(" + i + ")[@metadata]"));
}
/*
* -------------------------------- prüfen, ob das aktuelle Item eine Auswahlliste werden soll --------------------------------
*/
int selectItemCount = cp.getParamList("createNewProcess.itemlist.item(" + i + ").select").size();
/* Children durchlaufen und SelectItems erzeugen */
if (selectItemCount > 0) {
fa.setSelectList(new ArrayList<SelectItem>());
}
for (int j = 0; j < selectItemCount; j++) {
String svalue = cp.getParamString("createNewProcess.itemlist.item(" + i + ").select(" + j + ")[@label]");
String sid = cp.getParamString("createNewProcess.itemlist.item(" + i + ").select(" + j + ")");
fa.getSelectList().add(new SelectItem(sid, svalue, null));
}
this.additionalFields.add(fa);
}
}