1 /**
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * If it is not possible or desirable to put the notice in a particular
7 * file, then You may include the notice in a location (such as a LICENSE
8 * file in a relevant directory) where a recipient would be likely to look
9 * for such a notice.
10
11 *
12 */
13
14 /* ---------------------------------------------------------------------------
15 * U.S. Government, Department of the Army
16 * Army Materiel Command
17 * Research Development Engineering Command
18 * Communications Electronics Research Development and Engineering Center
19 * ---------------------------------------------------------------------------
20 */
21 package org.miloss.fgsms.presentation;
22
23 import java.util.ArrayList;
24 import java.util.List;
25
26 /**
27 *Provides a simple class to use for temporary storage of transactional web service performance data for the purposes of chart rendering
28 * @author AO
29 */
30 public class TransactionLogData {
31 public List<TransactionLogStruct> stuff;
32 public TransactionLogData()
33 {
34 stuff = new ArrayList<TransactionLogStruct>();
35 }
36 public boolean Contains(String action)
37 {
38 for (int i=0; i< stuff.size(); i++)
39 {
40 if (stuff.get(i).action.equalsIgnoreCase(action))
41 return true;
42 }
43 return false;
44 }
45
46 public void add(TransactionLogStruct add)
47 {
48 stuff.add(add);
49
50 }
51
52 public List<TransactionLogTimeStampStruct> get(String action)
53 {
54 for (int i=0; i< stuff.size(); i++)
55 {
56 if (stuff.get(i).action.equalsIgnoreCase(action))
57 return stuff.get(i).data;
58 }
59 return null;
60 }
61 public int Size()
62 {
63 return stuff.size();
64 }
65
66 }