1 package org
.argeo
.slc
.support
.deploy
;
4 import java
.net
.MalformedURLException
;
7 import org
.argeo
.slc
.core
.SlcException
;
8 import org
.argeo
.slc
.core
.deploy
.TargetData
;
10 public class HttpdApplicationTargetData
implements TargetData
{
11 private ApacheHttpdServer webServer
;
12 private String relativePath
;
14 public ApacheHttpdServer
getWebServer() {
18 public void setWebServer(ApacheHttpdServer webServer
) {
19 this.webServer
= webServer
;
22 public String
getRelativePath() {
26 public void setRelativePath(String relativePath
) {
27 this.relativePath
= relativePath
;
30 public URL
getTargetBaseUrl() {
32 URL wsUrl
= getWebServer().getBaseUrl();
33 return new URL(wsUrl
, wsUrl
.getFile() + '/' + relativePath
);
34 } catch (MalformedURLException e
) {
35 throw new SlcException("Cannot get base url for " + relativePath
, e
);
39 public File
getTargetRootLocation() {
40 return new File(getWebServer().getBaseLocation().getPath()
41 + File
.separator
+ getRelativePath());