Revision 44419 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/DefaultDataServerExplorerPool.java

View differences:

DefaultDataServerExplorerPool.java
37 37
        return this.pool.isEmpty();
38 38
    }
39 39
    
40
    public DataServerExplorerPoolEntry createEntry(String name, String description, DataServerExplorerParameters explorer) {
41
        DefaultDataServerExplorerPoolEntry entry = new DefaultDataServerExplorerPoolEntry(name, description, explorer);
42
        return entry;
43
    }
44

  
45
    @Override
40 46
    public void add(String name, DataServerExplorerParameters explorer) {
41 47
        this.add(name, null, explorer);
42 48
    }
43 49

  
50
    @Override
44 51
    public void add(String name, String description, DataServerExplorerParameters explorer) {
45
        DefaultDataServerExplorerPoolEntry newexplorer = new DefaultDataServerExplorerPoolEntry(name, description, explorer);
52
        DataServerExplorerPoolEntry newexplorer = createEntry(name, description, explorer);
46 53
        DataServerExplorerPoolEntry existent = this.get(name);
47 54
        if( existent!=null ) {
48 55
            newexplorer.copyTo(existent);
......
51 58
        }
52 59
    }
53 60

  
61
    @Override
54 62
    public void remove(DataServerExplorerPoolEntry entry) {
55 63
        this.remove(entry.getName());
56 64
    }
57 65

  
66
    @Override
58 67
    public void remove(int explorerIndex) {
59 68
        this.pool.remove(explorerIndex);
60 69
    }
61 70

  
71
    @Override
62 72
    public void remove(String name) {
63 73
        if( StringUtils.isBlank(name) ) {
64 74
            return;
......
71 81
        }
72 82
    }
73 83
    
84
    @Override
74 85
    public int size() {
75 86
        return this.pool.size();
76 87
    }
77 88

  
89
    @Override
78 90
    public DataServerExplorerPoolEntry get(int index) {
79 91
        return (DataServerExplorerPoolEntry) this.pool.get(index);
80 92
    }
81 93

  
94
    @Override
82 95
    public DataServerExplorerPoolEntry get(String name) {
83 96
        if( StringUtils.isBlank(name) ) {
84 97
            return null;
......
92 105
        return null;
93 106
    }
94 107

  
108
    @Override
95 109
    public Iterator iterator() {
96 110
        return this.pool.iterator();
97 111
    }
98 112

  
113
    @Override
99 114
    public void saveToState(PersistentState state) throws PersistenceException {
100 115
        state.set("pool", pool);
101 116
    }
102 117

  
118
    @Override
103 119
    public void loadFromState(PersistentState state) throws PersistenceException {
104 120
        List l = state.getList("pool");
105 121
        this.pool = new ArrayList();

Also available in: Unified diff