44import java .util .List ;
55
66import org .apache .commons .configuration .HierarchicalConfiguration ;
7- import org .goobi .beans .Processproperty ;
7+ import org .goobi .beans .GoobiProperty ;
88import org .goobi .beans .Step ;
99import org .goobi .beans .User ;
1010import org .goobi .beans .Usergroup ;
2323@ PluginImplementation
2424@ Log4j
2525public class UserAssignmentPlugin extends AbstractStepPlugin implements IStepPlugin , IPlugin {
26+ private static final long serialVersionUID = -7718261144382577236L ;
2627 private static final String PLUGIN_NAME = "intranda_step_user_assignment" ;
2728 private Step targetStep ;
2829 private List <Usergroup > oldGroups ;
@@ -37,16 +38,16 @@ public class UserAssignmentPlugin extends AbstractStepPlugin implements IStepPlu
3738 public void initialize (Step step , String returnPath ) {
3839 // get workflow name from properties
3940 String workflowName = null ;
40- for (Processproperty pp : step .getProzess ().getEigenschaften ()) {
41- if (pp . getTitel (). equals ( "Template" )) {
42- workflowName = pp .getWert ();
41+ for (GoobiProperty pp : step .getProzess ().getProperties ()) {
42+ if ("Template" . equals ( pp . getPropertyName () )) {
43+ workflowName = pp .getPropertyValue ();
4344 }
4445 }
4546 // if property Template does not exist try goobiWorkflow instead
4647 if (workflowName == null ) {
47- for (Processproperty pp : step .getProzess ().getEigenschaften ()) {
48- if (pp . getTitel (). equals ( "goobiWorkflow" )) {
49- workflowName = pp .getWert ();
48+ for (GoobiProperty pp : step .getProzess ().getProperties ()) {
49+ if ("goobiWorkflow" . equals ( pp . getPropertyName () )) {
50+ workflowName = pp .getPropertyValue ();
5051 }
5152 }
5253 }
@@ -58,7 +59,7 @@ public void initialize(Step step, String returnPath) {
5859 List <HierarchicalConfiguration > workflows = hc .configurationsAt ("workflow" );
5960 configAssignmentStepName = hc .getString ("assignmentStep" , "- no assignment configured -" );
6061 for (HierarchicalConfiguration workflow : workflows ) {
61- if (myconfig == null || ((workflow . getString ( "" ) .equals ("*" ) || workflow .getString ("" ).equals (workflowName ))
62+ if (myconfig == null || (("*" .equals (workflow . getString ( "" ) ) || workflow .getString ("" ).equals (workflowName ))
6263 && step .getTitel ().equals (configAssignmentStepName ))) {
6364 myconfig = hc ;
6465 }
@@ -69,9 +70,9 @@ public void initialize(Step step, String returnPath) {
6970 configAssignmentStepName = myconfig .getString ("assignmentStep" , "- no assignment configured -" );
7071 configTargetStepName = myconfig .getString ("targetStep" , "- no assignment configured -" );
7172 }
72- super .returnPath = returnPath ;
73- super .myStep = step ;
74- loadAllCurrentUsers ();
73+ super .returnPath = returnPath ;
74+ super .myStep = step ;
75+ loadAllCurrentUsers ();
7576 }
7677
7778 /**
0 commit comments