import java.util.Iterator;
import java.util.List;
-import org.splat.service.technical.ProjectSettingsService;
import org.splat.dal.bo.som.ProgressState;
import org.splat.dal.bo.som.SimulationContext;
import org.splat.dal.bo.som.SimulationContextType;
+import org.splat.service.technical.ProjectSettingsService;
public class SimulationContextFacade {
- private SimulationContext my;
- private String name;
- private int at;
- private ProgressState state;
+ private transient final SimulationContext _my;
+ private transient final String _name;
+ private transient int _at;
+ private transient ProgressState _state;
// ==============================================================================================================================
// Constructor
// ==============================================================================================================================
- public SimulationContextFacade(SimulationContext represented,
- List<ProjectSettingsService.Step> steps) {
+ public SimulationContextFacade(final SimulationContext represented,
+ final List<ProjectSettingsService.Step> steps) {
// --------------------------------------------------------------
SimulationContextType mytype;
- my = represented;
- mytype = my.getType();
+ _my = represented;
+ mytype = _my.getType();
for (Iterator<ProjectSettingsService.Step> i = steps.iterator(); i
.hasNext();) {
ProjectSettingsService.Step step = i.next();
- if (!mytype.isAttachedTo(step))
+ if (!mytype.isAttachedTo(step)) {
continue;
- at = step.getNumber(); // There is no direct service for getting the step number
+ }
+ _at = step.getNumber(); // There is no direct service for getting the step number
break;
}
- name = my.getType().getName();
+ _name = _my.getType().getName();
if (mytype.isApproved()) {
- state = ProgressState.inCHECK;
+ _state = ProgressState.inCHECK;
// RKV: TODO: Do translation in presentation layer by struts tools: name = ResourceBundle.getBundle("som",
// ApplicationSettings.getCurrentLocale()).getString("type.context." + name);
} else {
- state = ProgressState.inDRAFT;
+ _state = ProgressState.inDRAFT;
}
}
public String getEditIcon() {
// ----------------------------
- StringBuffer result = new StringBuffer("icon.ed").append(state).append(
+ StringBuffer result = new StringBuffer("icon.ed").append(_state).append(
".png");
return result.toString();
}
public String getIndex() {
// -------------------------
- return String.valueOf(my.getIndex());
+ return String.valueOf(_my.getIndex());
}
public int getStepNumber() {
// ---------------------------
- return at;
+ return _at;
}
public String getTypeName() {
// ----------------------------
- return name;
+ return _name;
}
public String getValue() {
// -------------------------
- return my.getValue();
+ return _my.getValue();
}
}
\ No newline at end of file