8 |
import java.util.HashMap; |
import java.util.HashMap; |
9 |
import java.util.regex.Pattern; |
import java.util.regex.Pattern; |
10 |
|
|
11 |
|
import javax.management.RuntimeErrorException; |
12 |
|
|
13 |
import org.apache.commons.lang.ArrayUtils; |
import org.apache.commons.lang.ArrayUtils; |
14 |
import org.apache.commons.lang.StringUtils; |
import org.apache.commons.lang.StringUtils; |
15 |
import org.apache.log4j.Logger; |
import org.apache.log4j.Logger; |
150 |
* .properties line. @see #parsePropertiesString |
* .properties line. @see #parsePropertiesString |
151 |
* @throws MalformedURLException |
* @throws MalformedURLException |
152 |
*/ |
*/ |
153 |
public static DbServerSettings parsePropertiesString(String propString) |
@Override |
154 |
|
public DbServerSettings parsePropertiesString(String propString) |
155 |
throws MalformedURLException { |
throws MalformedURLException { |
156 |
|
|
157 |
if (propString == null || propString.isEmpty()) |
if (propString == null || propString.isEmpty()) |
185 |
|
|
186 |
public DbServerSettings() { |
public DbServerSettings() { |
187 |
this(DbType.postgis); |
this(DbType.postgis); |
188 |
|
|
189 |
} |
} |
190 |
|
|
191 |
public DbServerSettings(DbType dbType) { |
public DbServerSettings(DbType dbType) { |
195 |
put(JDBCDataStoreFactory.PK_METADATA_TABLE.key, null); |
put(JDBCDataStoreFactory.PK_METADATA_TABLE.key, null); |
196 |
} |
} |
197 |
|
|
198 |
|
public DbServerSettings(String propertiesString) { |
199 |
|
try { |
200 |
|
parsePropertiesString(propertiesString); |
201 |
|
} catch (MalformedURLException e) { |
202 |
|
throw new RuntimeException(e); |
203 |
|
} |
204 |
|
} |
205 |
|
|
206 |
public String[] getCachedTypeNames() { |
public String[] getCachedTypeNames() { |
207 |
return cachedTypeNames; |
return cachedTypeNames; |
208 |
} |
} |