use of com.revolsys.spring.resource.UrlResource in project com.revolsys.open by revolsys.
the class AbstractWebService method setPassword.
public void setPassword(final String password) {
this.password = PasswordUtil.decrypt(password);
final UrlResource serviceUrl = this.serviceUrl;
if (serviceUrl != null) {
String username = this.username;
if (username == null) {
username = serviceUrl.getUsername();
}
this.serviceUrl = serviceUrl.newUrlResourceAuthorization(username, this.password);
}
}
use of com.revolsys.spring.resource.UrlResource in project com.revolsys.open by revolsys.
the class ArcGisRestServerRecordLayer method setLayerDescription.
public void setLayerDescription(final FeatureLayer layerDescription) {
this.layerDescription = layerDescription;
if (layerDescription != null) {
final String name = layerDescription.getName();
setName(name);
final UrlResource url = layerDescription.getRootServiceUrl();
setUrl(url);
final PathName pathName = layerDescription.getPathName();
setLayerPath(pathName);
final long minScale = layerDescription.getMinScale();
setMinimumScale(minScale);
final long maxScale = layerDescription.getMaxScale();
setMaximumScale(maxScale);
}
}
use of com.revolsys.spring.resource.UrlResource in project com.revolsys.open by revolsys.
the class OsmDocument method newDocument.
public static OsmDocument newDocument(final String serverUrl, BoundingBox boundingBox) {
if (boundingBox != null) {
boundingBox = boundingBox.convert(OsmConstants.WGS84_2D);
if (!boundingBox.isEmpty()) {
final StringBuilder url = new StringBuilder(serverUrl);
url.append("map?bbox=");
url.append(boundingBox.getMinX());
url.append(",");
url.append(boundingBox.getMinY());
url.append(",");
url.append(boundingBox.getMaxX());
url.append(",");
url.append(boundingBox.getMaxY());
final Resource resource = new UrlResource(url.toString());
return new OsmDocument(resource);
}
}
return new OsmDocument();
}
use of com.revolsys.spring.resource.UrlResource in project com.revolsys.open by revolsys.
the class AbstractWebService method setUsername.
public void setUsername(final String username) {
this.username = username;
final UrlResource serviceUrl = this.serviceUrl;
if (serviceUrl != null) {
String password = this.password;
if (password == null) {
password = serviceUrl.getPassword();
}
this.serviceUrl = serviceUrl.newUrlResourceAuthorization(username, password);
}
}
use of com.revolsys.spring.resource.UrlResource in project com.revolsys.open by revolsys.
the class MapGuideWebServerRecordLayer method setWebServiceLayer.
public void setWebServiceLayer(final FeatureLayer layerDescription) {
this.webServiceLayer = layerDescription;
if (this.webServiceLayer != null) {
final String name = this.webServiceLayer.getName();
setName(name);
final UrlResource serviceUrl = this.webServiceLayer.getWebService().getServiceUrl();
setUrl(serviceUrl);
final PathName pathName = this.webServiceLayer.getPathName();
setLayerPath(pathName);
}
}
Aggregations