| 1 | |
package com.aurea.maven.plugins.sonic.sdm.container.impl; |
| 2 | |
|
| 3 | |
import java.util.ArrayList; |
| 4 | |
import java.util.List; |
| 5 | |
|
| 6 | |
import com.aurea.maven.plugins.sonic.sdm.container.IContainerSetting; |
| 7 | |
import com.aurea.maven.plugins.sonic.sdm.container.IIncludePattern; |
| 8 | |
|
| 9 | |
public class DefaultContainerSetting implements IContainerSetting { |
| 10 | |
|
| 11 | |
private String name; |
| 12 | |
private String backupContainer; |
| 13 | |
private String busConnection; |
| 14 | |
private String routingHttpConnection; |
| 15 | |
private String enablePayloadCapture; |
| 16 | |
private String useForLookingGlass; |
| 17 | |
private String useIntraContainerMessaging; |
| 18 | |
private String segment; |
| 19 | |
private String containerParameterSet; |
| 20 | |
private String logDirectory; |
| 21 | |
private boolean bootContainer; |
| 22 | |
private boolean clone; |
| 23 | |
|
| 24 | |
private List<IIncludePattern> includes; |
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | 0 | public DefaultContainerSetting() { |
| 30 | 0 | } |
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | 0 | public DefaultContainerSetting(final String _myname) { |
| 37 | 0 | setName(_myname); |
| 38 | 0 | } |
| 39 | |
|
| 40 | |
public final String getSegment(){ |
| 41 | 0 | if(this.segment == null){ |
| 42 | 0 | this.segment=""; |
| 43 | |
} |
| 44 | 0 | return this.segment; |
| 45 | |
} |
| 46 | |
|
| 47 | |
public void setSegment(final String seg){ |
| 48 | 0 | this.segment = seg; |
| 49 | 0 | } |
| 50 | |
|
| 51 | |
public final String getLogDirectory(){ |
| 52 | 0 | if(this.logDirectory == null){ |
| 53 | 0 | this.logDirectory = ""; |
| 54 | |
} |
| 55 | 0 | return this.logDirectory; |
| 56 | |
} |
| 57 | |
|
| 58 | |
public void setLogDirectory(final String ld){ |
| 59 | 0 | this.logDirectory = ld; |
| 60 | 0 | } |
| 61 | |
|
| 62 | |
public final String getContainerParameterSet(){ |
| 63 | 0 | if(this.containerParameterSet == null){ |
| 64 | 0 | this.containerParameterSet = ""; |
| 65 | |
} |
| 66 | 0 | return this.containerParameterSet; |
| 67 | |
} |
| 68 | |
|
| 69 | |
public void setContainerParameterSet(final String cps){ |
| 70 | 0 | this.containerParameterSet = cps; |
| 71 | 0 | } |
| 72 | |
|
| 73 | |
|
| 74 | |
|
| 75 | |
|
| 76 | |
public final String getBusConnection() { |
| 77 | |
|
| 78 | 0 | if (busConnection == null) { |
| 79 | 0 | busConnection = ""; |
| 80 | |
} |
| 81 | 0 | return busConnection; |
| 82 | |
} |
| 83 | |
|
| 84 | |
|
| 85 | |
|
| 86 | |
|
| 87 | |
public final String getRoutingHttpConnection() { |
| 88 | |
|
| 89 | 0 | if (routingHttpConnection == null) { |
| 90 | 0 | routingHttpConnection = ""; |
| 91 | |
} |
| 92 | 0 | return routingHttpConnection; |
| 93 | |
} |
| 94 | |
|
| 95 | |
|
| 96 | |
|
| 97 | |
|
| 98 | |
public final String getEnablePayloadCapture() { |
| 99 | |
|
| 100 | 0 | if (enablePayloadCapture == null) { |
| 101 | 0 | enablePayloadCapture = ""; |
| 102 | |
} |
| 103 | 0 | return enablePayloadCapture; |
| 104 | |
} |
| 105 | |
|
| 106 | |
|
| 107 | |
|
| 108 | |
|
| 109 | |
public final String getUseForLookingGlass() { |
| 110 | |
|
| 111 | 0 | if (useForLookingGlass == null) { |
| 112 | 0 | useForLookingGlass = ""; |
| 113 | |
} |
| 114 | 0 | return useForLookingGlass; |
| 115 | |
|
| 116 | |
} |
| 117 | |
|
| 118 | |
|
| 119 | |
|
| 120 | |
|
| 121 | |
public final String getUseIntraContainerMessaging() { |
| 122 | |
|
| 123 | 0 | if (useIntraContainerMessaging == null) { |
| 124 | 0 | useIntraContainerMessaging = ""; |
| 125 | |
} |
| 126 | 0 | return useIntraContainerMessaging; |
| 127 | |
|
| 128 | |
} |
| 129 | |
|
| 130 | |
|
| 131 | |
|
| 132 | |
|
| 133 | |
public boolean isBootContainer() { |
| 134 | |
|
| 135 | 0 | return bootContainer; |
| 136 | |
} |
| 137 | |
|
| 138 | |
|
| 139 | |
|
| 140 | |
|
| 141 | |
public final String getName() { |
| 142 | |
|
| 143 | 0 | if (name == null) { |
| 144 | 0 | name = "default"; |
| 145 | |
} |
| 146 | 0 | return name; |
| 147 | |
} |
| 148 | |
|
| 149 | |
|
| 150 | |
|
| 151 | |
|
| 152 | |
public final String getBackupContainer() { |
| 153 | |
|
| 154 | 0 | if (backupContainer == null) { |
| 155 | 0 | backupContainer = ""; |
| 156 | |
} |
| 157 | 0 | return backupContainer; |
| 158 | |
} |
| 159 | |
|
| 160 | |
|
| 161 | |
|
| 162 | |
|
| 163 | |
|
| 164 | |
|
| 165 | |
public final void setName(final String _name) { |
| 166 | |
|
| 167 | 0 | this.name = _name; |
| 168 | 0 | } |
| 169 | |
|
| 170 | |
|
| 171 | |
|
| 172 | |
|
| 173 | |
|
| 174 | |
public final void setBackupContainer(final String _backupContainer) { |
| 175 | |
|
| 176 | 0 | this.backupContainer = _backupContainer; |
| 177 | 0 | } |
| 178 | |
|
| 179 | |
public void setClone(boolean _clone) { |
| 180 | 0 | this.clone = _clone; |
| 181 | 0 | } |
| 182 | |
|
| 183 | |
public boolean isClone(){ |
| 184 | 0 | return this.clone; |
| 185 | |
} |
| 186 | |
|
| 187 | |
|
| 188 | |
|
| 189 | |
|
| 190 | |
public final List<IIncludePattern> getIncludes() { |
| 191 | |
|
| 192 | 0 | if (includes == null) { |
| 193 | 0 | includes = new ArrayList<IIncludePattern>(); |
| 194 | |
} |
| 195 | 0 | return includes; |
| 196 | |
} |
| 197 | |
|
| 198 | |
|
| 199 | |
|
| 200 | |
|
| 201 | |
|
| 202 | |
|
| 203 | |
|
| 204 | |
public final void setIncludes(final List<IIncludePattern> _includes) { |
| 205 | |
|
| 206 | 0 | this.includes = _includes; |
| 207 | 0 | } |
| 208 | |
|
| 209 | |
|
| 210 | |
|
| 211 | |
|
| 212 | |
|
| 213 | |
|
| 214 | |
|
| 215 | |
public void setBusConnection(final String _busConnection) { |
| 216 | |
|
| 217 | 0 | this.busConnection = _busConnection; |
| 218 | 0 | } |
| 219 | |
|
| 220 | |
|
| 221 | |
|
| 222 | |
|
| 223 | |
|
| 224 | |
|
| 225 | |
|
| 226 | |
public void setRoutingHttpConnection(final String _routingHttpConnection) { |
| 227 | |
|
| 228 | 0 | this.routingHttpConnection = _routingHttpConnection; |
| 229 | 0 | } |
| 230 | |
|
| 231 | |
|
| 232 | |
|
| 233 | |
|
| 234 | |
|
| 235 | |
|
| 236 | |
|
| 237 | |
public void setEnablePayloadCapture(final String _enablePayloadCapture) { |
| 238 | |
|
| 239 | 0 | this.enablePayloadCapture = _enablePayloadCapture; |
| 240 | 0 | } |
| 241 | |
|
| 242 | |
|
| 243 | |
|
| 244 | |
|
| 245 | |
|
| 246 | |
|
| 247 | |
|
| 248 | |
public void setUseForLookingGlass(final String _useForLookingGlass) { |
| 249 | |
|
| 250 | 0 | this.useForLookingGlass = _useForLookingGlass; |
| 251 | 0 | } |
| 252 | |
|
| 253 | |
|
| 254 | |
|
| 255 | |
|
| 256 | |
|
| 257 | |
|
| 258 | |
|
| 259 | |
public void setUseIntraContainerMessaging(final String _useIntraContainerMessaging) { |
| 260 | |
|
| 261 | 0 | this.useIntraContainerMessaging = _useIntraContainerMessaging; |
| 262 | 0 | } |
| 263 | |
|
| 264 | |
|
| 265 | |
|
| 266 | |
|
| 267 | |
|
| 268 | |
public void setBootContainer(final boolean _bootContainer) { |
| 269 | |
|
| 270 | 0 | this.bootContainer = _bootContainer; |
| 271 | 0 | } |
| 272 | |
|
| 273 | |
@Override |
| 274 | |
public String toString() { |
| 275 | 0 | return "{" + getName() + "; patterns=" + getIncludes() + "}"; |
| 276 | |
} |
| 277 | |
|
| 278 | |
|
| 279 | |
|
| 280 | |
|
| 281 | |
|
| 282 | |
@Override |
| 283 | |
public int hashCode() { |
| 284 | 0 | final int prime = 31; |
| 285 | 0 | int result = 1; |
| 286 | 0 | result = prime * result + ((name == null) ? 0 : name.hashCode()); |
| 287 | 0 | return result; |
| 288 | |
} |
| 289 | |
|
| 290 | |
@Override |
| 291 | |
public boolean equals(Object obj) { |
| 292 | 0 | if (this == obj) |
| 293 | 0 | return true; |
| 294 | 0 | if (obj == null) |
| 295 | 0 | return false; |
| 296 | 0 | if (getClass() != obj.getClass()) |
| 297 | 0 | return false; |
| 298 | 0 | DefaultContainerSetting other = (DefaultContainerSetting) obj; |
| 299 | 0 | if (name == null) { |
| 300 | 0 | if (other.name != null) |
| 301 | 0 | return false; |
| 302 | 0 | } else if (!name.equals(other.name)) |
| 303 | 0 | return false; |
| 304 | 0 | return true; |
| 305 | |
} |
| 306 | |
|
| 307 | |
|
| 308 | |
|
| 309 | |
} |