Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Commit

Permalink
#69 fix for metadata posting
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed Aug 14, 2018
1 parent 6dd0b0f commit 045325f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@ So those need to be updated on your installation. The compute checksum allows a
A Docker deploy option was added. This involves a Dockerfile added to the project, along with a 'runit.sh' as the endpoint. The Docker image is alpine:tomcat8. The image mounts the /etc/irods-ext/irods-rest.properties from the host system, as well as an optional cert directory that will cause the import of an SSL cert if you are working with self signed certs. See the Docker.md file for Docker instructions. Please give that a whirl and report results and thoughts.


#### issue posting metada updates #69

Fixes for metadata update, removing old XML namespace semantics.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
import org.irods.jargon.rest.domain.MetadataQueryResultEntry;
import org.irods.jargon.rest.domain.PermissionListing;
import org.irods.jargon.rest.utils.DataUtils;
import org.jboss.resteasy.annotations.providers.jaxb.json.Mapped;
import org.jboss.resteasy.annotations.providers.jaxb.json.XmlNsMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -86,7 +84,8 @@ public class CollectionService extends AbstractIrodsService {
@GET
@Path("{path:.*}")
@Produces({ "application/json" })
@Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest", jsonName = "irods-rest") })
// @Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest",
// jsonName = "irods-rest") })
public CollectionData getCollectionData(@HeaderParam("Authorization") final String authorization,
@PathParam("path") final String path, @QueryParam("offset") @DefaultValue("0") final int offset,
@QueryParam("listing") @DefaultValue("false") final boolean isListing,
Expand Down Expand Up @@ -203,7 +202,8 @@ public CollectionData getCollectionData(@HeaderParam("Authorization") final Stri
@PUT
@Path("{path:.*}")
@Produces({ "application/json" })
@Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest", jsonName = "irods-rest") })
// @Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest",
// jsonName = "irods-rest") })
public CollectionData addCollection(@HeaderParam("Authorization") final String authorization,
@PathParam("path") final String path) throws JargonException {

Expand Down Expand Up @@ -363,7 +363,8 @@ public MetadataListing getCollectionMetadata(@HeaderParam("Authorization") final
@Path("{path:.*}/metadata")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest", jsonName = "irods-rest") })
// @Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest",
// jsonName = "irods-rest") })
public List<MetadataOperationResultEntry> deleteCollectionMetadata(
@HeaderParam("Authorization") final String authorization, @PathParam("path") final String path,
final MetadataOperation metadataOperation) throws JargonException {
Expand Down Expand Up @@ -446,7 +447,8 @@ public List<MetadataOperationResultEntry> deleteCollectionMetadata(
@Path("{path:.*}/metadata")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest", jsonName = "irods-rest") })
// @Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest",
// jsonName = "irods-rest") })
public List<MetadataOperationResultEntry> addCollectionMetadata(
@HeaderParam("Authorization") final String authorization, @PathParam("path") final String path,
final MetadataOperation metadataOperation) throws JargonException {
Expand Down Expand Up @@ -527,7 +529,8 @@ public List<MetadataOperationResultEntry> addCollectionMetadata(
*/
@DELETE
@Path("{path:.*}")
@Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest", jsonName = "irods-rest") })
// @Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest",
// jsonName = "irods-rest") })
public void removeCollection(@HeaderParam("Authorization") final String authorization,
@PathParam("path") final String path, @QueryParam("force") @DefaultValue("false") final boolean force)
throws JargonException {
Expand Down Expand Up @@ -581,7 +584,8 @@ public void removeCollection(@HeaderParam("Authorization") final String authoriz
@GET
@Path("{path:.*}/acl")
@Produces({ "application/json" })
@Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest", jsonName = "irods-rest") })
// @Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest",
// jsonName = "irods-rest") })
public PermissionListing getCollectionAcl(@HeaderParam("Authorization") final String authorization,
@PathParam("path") final String path) throws FileNotFoundException, JargonException {

Expand Down Expand Up @@ -638,7 +642,8 @@ public PermissionListing getCollectionAcl(@HeaderParam("Authorization") final St
@PUT
@Path("{path:.*}/acl/{userName}")
@Produces({ "application/json" })
@Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest", jsonName = "irods-rest") })
// @Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest",
// jsonName = "irods-rest") })
public void addCollectionAcl(@HeaderParam("Authorization") final String authorization,
@PathParam("path") final String path, @PathParam("userName") final String userName,
@QueryParam("recursive") @DefaultValue("false") final boolean recursive,
Expand Down Expand Up @@ -722,7 +727,8 @@ public void addCollectionAcl(@HeaderParam("Authorization") final String authoriz
@DELETE
@Path("{path:.*}/acl/{userName}")
@Produces({ "application/json" })
@Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest", jsonName = "irods-rest") })
// @Mapped(namespaceMap = { @XmlNsMap(namespace = "http://irods.org/irods-rest",
// jsonName = "irods-rest") })
public void deleteCollectionAcl(@HeaderParam("Authorization") final String authorization,
@PathParam("path") final String path, @PathParam("userName") final String userName,
@QueryParam("recursive") @DefaultValue("false") final boolean recursive)
Expand Down

0 comments on commit 045325f

Please sign in to comment.