Decompiled by Jad v1 8g Copyright 2001 Pavel Kouznetsov Jad home page

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) nocasts braces
package com.stf.workflow.core.controller;
import com.stf.workflow.core.data.DataBucket;
import com.stf.workflow.core.data.SimpleFormDataProvider;
import com.stf.workflow.core.validator.Validator;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.*;
// Referenced classes of package com.stf.workflow.core.controller:
// SimpleFormController, AbstractMultiFormController
public abstract class MultiFormController extends SimpleFormController
implements AbstractMultiFormController
{
public MultiFormController()
{
E = new HashMap(5);
D = new HashMap(5);
}
protected Map A(Object obj)
{
return new HashMap(1);
}
public synchronized int getFormId()
{
A4++;
E.put(Integer.valueOf(A4), createForm());
D.put(Integer.valueOf(A4), new SimpleFormDataProvider());
return A4;
}
public synchronized void removeForm(int i)
{
E.remove(Integer.valueOf(i));
D.remove(Integer.valueOf(i));
}
public synchronized DataBucket getFormData(int i, Map map)
{
A(E.get(Integer.valueOf(i)), map);
SimpleFormDataProvider simpleformdataprovider = (SimpleFormDataProvider)D.get(Integer.valueOf(i));
simpleformdataprovider.getDataBucket().getReferenceData().putAll(A(E.get(Integer.valueOf(i))));
simpleformdataprovider.initDataProvider(E.get(Integer.valueOf(i)));
return simpleformdataprovider.getDataBucket();
}
public synchronized Object submit(int i, DataBucket databucket, String s)
throws Throwable
{
SimpleFormDataProvider simpleformdataprovider = (SimpleFormDataProvider)D.get(Integer.valueOf(i));
if(s.contains("."))
{
s = s.substring(s.lastIndexOf(".") + 1, s.length());
}
simpleformdataprovider.cleanFromErrors();
getValidator().setButtonName(s);
if(getValidator().launchValidator(databucket).booleanValue())
{
simpleformdataprovider.getDataFromClient(databucket, E.get(Integer.valueOf(i)));
Method amethod[] = getClass().getMethods();
try
{
String s1 = (new StringBuilder()).append("on").append(s.substring(0, 1).toUpperCase()).append(s.substring(1)).toString();
Method method = null;
Map map = null;
Method amethod1[] = amethod;
int j = amethod1.length;
int k = 0;
do
{
if(k >= j)
{
break;
}
Method method1 = amethod1[k];
if(method1.getName().equals(s1))
{
Class aclass[] = method1.getParameterTypes();
if(aclass.length == 1)
{
map = (Map)method1.invoke(this, new Object[] {
E.get(Integer.valueOf(i))
});
}
if(aclass.length == 2)
{
map = (Map)method1.invoke(this, new Object[] {
E.get(Integer.valueOf(i)), simpleformdataprovider.getDataBucket().getRequestData()
});
}
method = method1;
break;
}
k++;
} while(true);
if(method == null)
{
throw new NoSuchMethodException((new StringBuilder()).append("There is no method ").append(s1).append(" in controller").toString());
}
if(map != null)
{
String s2;
for(Iterator iterator = map.keySet().iterator(); iterator.hasNext(); ((SimpleFormDataProvider)D.get(Integer.valueOf(i))).getDataBucket().getReferenceData().put(s2, map.get(s2)))
{
s2 = (String)iterator.next();
}
}
}
catch(IllegalAccessException illegalaccessexception)
{
illegalaccessexception.printStackTrace();
}
catch(InvocationTargetException invocationtargetexception)
{
throw invocationtargetexception.getCause();
}
simpleformdataprovider.initDataProvider(E.get(Integer.valueOf(i)));
simpleformdataprovider.getDataBucket().setSubmittionSucceed(Boolean.valueOf(true));
return simpleformdataprovider.getDataBucket();
} else
{
simpleformdataprovider.synchronize(databucket);
simpleformdataprovider.getDataBucket().setSubmittionSucceed(Boolean.valueOf(false));
return simpleformdataprovider.getDataBucket();
}
}
protected Map E;
protected Map D;
private int A4;
}