Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CalculationMessage.java @ 2211:5400631d2f96
Fixed problems with unformatted numbers in error message.
flys-artifacts/trunk@3845 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 31 Jan 2012 16:26:30 +0000 |
parents | a470b7c3b165 |
children | 4bd3d8bbb60c |
rev | line source |
---|---|
1157
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model; |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import de.intevation.artifacts.Message; |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 public class CalculationMessage implements Message { |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 protected String message; |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 protected int steps; |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 protected int currentStep; |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 public CalculationMessage() { |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 } |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 public CalculationMessage(int steps, int currentStep, String message) { |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 this.steps = steps; |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 this.currentStep = currentStep; |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 this.message = message; |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 } |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 public int getSteps() { |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 return steps; |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 } |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 public int getCurrentStep() { |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 return currentStep; |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 } |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 public String getMessage() { |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 return message; |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 } |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 @Override |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 public String getText() { |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 return |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 String.valueOf(currentStep) + "/" + String.valueOf(steps) + |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 " - " + getMessage(); |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 } |
a470b7c3b165
Write status messages and progress information of WSPLGEN Calculations into Artifact's DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 } |