diff --git a/etc/namespace-1.5.1.xsd b/etc/namespace-1.5.1.xsd new file mode 100644 index 00000000..214fa635 --- /dev/null +++ b/etc/namespace-1.5.1.xsd @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/etc/namespace.xml b/etc/namespace.xml index 42a2df8e..8c0ae320 100644 --- a/etc/namespace.xml +++ b/etc/namespace.xml @@ -1,4 +1,4 @@ - + TEST1 diff --git a/src/main/assemblies/assembly.xml b/src/main/assemblies/assembly.xml index 48771a72..a7d10605 100644 --- a/src/main/assemblies/assembly.xml +++ b/src/main/assemblies/assembly.xml @@ -37,7 +37,7 @@ lcmaps.db logging.xml - namespace-1.5.0.xsd + namespace-1.5.1.xsd namespace.xml path-authz.db storm.properties.template diff --git a/src/main/java/it/grid/storm/common/types/TransferProtocol.java b/src/main/java/it/grid/storm/common/types/TransferProtocol.java index 285380ee..74d209f3 100644 --- a/src/main/java/it/grid/storm/common/types/TransferProtocol.java +++ b/src/main/java/it/grid/storm/common/types/TransferProtocol.java @@ -103,6 +103,28 @@ public int hashCode() { } }; + /** + * Static attribute that indicates DAV TransferProtocol. + */ + public static TransferProtocol DAV = new TransferProtocol("dav") { + + public int hashCode() { + + return 7; + } + }; + + /** + * Static attribute that indicates DAV TransferProtocol. + */ + public static TransferProtocol DAVS = new TransferProtocol("davs") { + + public int hashCode() { + + return 9; + } + }; + private TransferProtocol(String protocol) { this.protocol = protocol; @@ -139,6 +161,10 @@ public static TransferProtocol getTransferProtocol(String protocol) { return HTTP; if (protocol.toLowerCase().replaceAll(" ", "").equals(HTTPS.toString())) return HTTPS; + if (protocol.toLowerCase().replaceAll(" ", "").equals(DAV.toString())) + return DAV; + if (protocol.toLowerCase().replaceAll(" ", "").equals(DAVS.toString())) + return DAVS; return EMPTY; } } diff --git a/src/main/java/it/grid/storm/config/Configuration.java b/src/main/java/it/grid/storm/config/Configuration.java index c3d284e5..5ad93edd 100644 --- a/src/main/java/it/grid/storm/config/Configuration.java +++ b/src/main/java/it/grid/storm/config/Configuration.java @@ -1297,7 +1297,7 @@ public String toString() { } public String getHTTPTURLPrefix() { - return cr.getConfiguration().getString(HTTP_TURL_PREFIX, "/fileTransfer"); + return cr.getConfiguration().getString(HTTP_TURL_PREFIX, ""); } public long getInProgressPutRequestExpirationTime() { diff --git a/src/main/java/it/grid/storm/namespace/StoRIImpl.java b/src/main/java/it/grid/storm/namespace/StoRIImpl.java index 472b30fc..3507c34e 100644 --- a/src/main/java/it/grid/storm/namespace/StoRIImpl.java +++ b/src/main/java/it/grid/storm/namespace/StoRIImpl.java @@ -485,8 +485,11 @@ public TTURL getTURL(TURLPrefix desiredProtocols) authority = transProt.getAuthority(); } - if (choosen.equals(Protocol.HTTP) || choosen.equals(Protocol.HTTPS)){ - resultTURL = buildHTTPTURL(choosen,authority); + if (choosen.equals(Protocol.HTTP) + || choosen.equals(Protocol.HTTPS) + || choosen.equals(Protocol.DAV) + || choosen.equals(Protocol.DAVS)) { + resultTURL = buildHTTPTURL(choosen,authority); } else { resultTURL = buildTURL(choosen, authority); } @@ -583,7 +586,7 @@ private TTURL buildHTTPTURL(Protocol p, Authority authority){ sb.append(getStFN().toString()); - log.debug("built http turl: {}", sb.toString()); + log.debug("built {} turl: {}", p.getSchema(), sb.toString()); return TTURL.makeFromString(sb.toString()); diff --git a/src/main/java/it/grid/storm/namespace/model/Protocol.java b/src/main/java/it/grid/storm/namespace/model/Protocol.java index 37075610..f47c90ba 100644 --- a/src/main/java/it/grid/storm/namespace/model/Protocol.java +++ b/src/main/java/it/grid/storm/namespace/model/Protocol.java @@ -39,12 +39,15 @@ public class Protocol { public final static Protocol RFIO = new Protocol(3, "RFIO", "rfio", 5001); public final static Protocol SRM = new Protocol(4, "SRM", "srm", 8444); public final static Protocol ROOT = new Protocol(5, "ROOT", "root", 1094); - // TODO HTTPS TURL - public final static Protocol HTTP = new Protocol(6, "HTTP", "http", 8080); - public final static Protocol HTTPS = new Protocol(7, "HTTPS", "https", 443); + + public final static Protocol HTTP = new Protocol(6, "HTTP", "http", 8085); + public final static Protocol HTTPS = new Protocol(7, "HTTPS", "https", 8443); public final static Protocol XROOT = new Protocol(8, "XROOT", "xroot", 1094); + public final static Protocol DAV = new Protocol(9, "DAV", "dav", 8085); + public final static Protocol DAVS = new Protocol(10, "DAV", "davs", 8443); + public final static Protocol EMPTY = new Protocol(0, "EMPTY", "", -1); public final static Protocol UNKNOWN = new Protocol(-1, "UNKNOWN", "", -1);