]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/support/deploy/HttpdApplicationTargetData.java
Move SLC Support
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / support / deploy / HttpdApplicationTargetData.java
diff --git a/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/support/deploy/HttpdApplicationTargetData.java b/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/support/deploy/HttpdApplicationTargetData.java
deleted file mode 100644 (file)
index 3bc08c7..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.support.deploy;\r
-\r
-import java.io.File;\r
-import java.net.MalformedURLException;\r
-import java.net.URL;\r
-\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.deploy.TargetData;\r
-\r
-public class HttpdApplicationTargetData implements TargetData {\r
-       private HttpdServer webServer;\r
-       private String relativePath;\r
-       private String targetRootPath;\r
-\r
-       public HttpdServer getWebServer() {\r
-               return webServer;\r
-       }\r
-\r
-       public void setWebServer(HttpdServer webServer) {\r
-               this.webServer = webServer;\r
-       }\r
-\r
-       public String getRelativePath() {\r
-               return relativePath;\r
-       }\r
-\r
-       /**\r
-        * If targetRootLocation not set, used to build the targetRootLocation,\r
-        * relative to the webserver base.\r
-        */\r
-       public void setRelativePath(String relativePath) {\r
-               this.relativePath = relativePath;\r
-       }\r
-\r
-       public String getTargetRootPath() {\r
-               return targetRootPath;\r
-       }\r
-\r
-       public void setTargetRootPath(String targetRootPath) {\r
-               this.targetRootPath = targetRootPath;\r
-       }\r
-\r
-       public URL getTargetBaseUrl() {\r
-               try {\r
-                       URL wsUrl = getWebServer().getBaseUrl();\r
-                       // TODO: use URI\r
-                       return new URL(wsUrl, wsUrl.getFile() + '/' + relativePath);\r
-               } catch (MalformedURLException e) {\r
-                       throw new SlcException("Cannot get base url for " + relativePath, e);\r
-               }\r
-       }\r
-\r
-       public File getTargetRootLocation() {\r
-               if (targetRootPath != null && !targetRootPath.equals("")) {\r
-                       return new File(targetRootPath);\r
-               } else {\r
-                       HttpdServerTargetData targetData = (HttpdServerTargetData) getWebServer()\r
-                                       .getTargetData();\r
-                       String path = targetData.getServerRoot() + File.separator\r
-                                       + getRelativePath();\r
-                       return new File(path);\r
-               }\r
-       }\r
-\r
-}\r