1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.support.action.support;
14
15 import java.util.ArrayList;
16 import java.util.Collection;
17
18 import com.eviware.soapui.model.ModelItem;
19 import com.eviware.soapui.support.action.SoapUIActionMapping;
20
21 /***
22 * A list of SoapUIActionMappings
23 *
24 * @author ole.matzura
25 */
26
27 public class SoapUIActionMappingList<T extends ModelItem> extends ArrayList<SoapUIActionMapping<T>>
28 {
29 public SoapUIActionMappingList()
30 {
31 super();
32 }
33
34 public SoapUIActionMappingList( Collection<? extends SoapUIActionMapping<T>> arg0 )
35 {
36 super( arg0 );
37 }
38
39 public int getMappingIndex( String id )
40 {
41 for( int c = 0; c < size(); c++ )
42 {
43 if( get( c ).getActionId().equals( id ))
44 return c;
45 }
46
47 return -1;
48 }
49
50 public SoapUIActionMapping<T> getMapping( String id )
51 {
52 for( SoapUIActionMapping<T> mapping : this )
53 {
54 if( mapping.getActionId().equals( id ))
55 return mapping;
56 }
57
58 return null;
59 }
60 }