Interface DocRefResource

    • Method Summary

      Modifier and Type Method Description
      javax.ws.rs.core.Response copyDocument​(ServiceUser user, java.lang.String originalUuid, java.lang.String copyUuid)
      A notification from Stroom that a document is being copied.
      javax.ws.rs.core.Response createDocument​(ServiceUser user, java.lang.String uuid, java.lang.String name)
      A new document has been created in Stroom
      javax.ws.rs.core.Response deleteDocument​(ServiceUser user, java.lang.String uuid)
      The document with this UUID is being deleted in Stroom.
      javax.ws.rs.core.Response exportDocument​(ServiceUser user, java.lang.String uuid)
      Export the given document
      javax.ws.rs.core.Response get​(ServiceUser user, java.lang.String uuid)
      Retrieve the full config for the given DocRef
      javax.ws.rs.core.Response getAll​(ServiceUser user)
      Retrieve the full config for the given DocRef
      javax.ws.rs.core.Response getInfo​(ServiceUser user, java.lang.String uuid)
      Retrieve the full config for the given DocRef
      javax.ws.rs.core.Response importDocument​(ServiceUser user, java.lang.String uuid, java.lang.String name, java.lang.Boolean confirmed, java.util.Map<java.lang.String,​java.lang.String> dataMap)
      Import the data as a new document.
      javax.ws.rs.core.Response moveDocument​(ServiceUser user, java.lang.String uuid)
      A Notification from Stroom that the document has been 'moved'.
      javax.ws.rs.core.Response renameDocument​(ServiceUser user, java.lang.String uuid, java.lang.String name)
      A notifiation from Stroom that the name of a document has been changed.
      javax.ws.rs.core.Response update​(ServiceUser user, java.lang.String uuid, java.lang.String updatedConfigJson)
      Update the document
    • Method Detail

      • getAll

        @GET
        @Path("/")
        @Timed
        javax.ws.rs.core.Response getAll​(ServiceUser user)
        Retrieve the full config for the given DocRef
        Parameters:
        user - Authenticated user passed in from web framework
        Returns:
        The full list of doc refs
      • get

        @GET
        @Path("/{uuid}")
        @Timed
        javax.ws.rs.core.Response get​(ServiceUser user,
                                      @PathParam("uuid")
                                      java.lang.String uuid)
        Retrieve the full config for the given DocRef
        Parameters:
        user - Authenticated user passed in from web framework
        uuid - The UUID of the docRef to return
        Returns:
        The full implementation specific config for this docRef.
      • getInfo

        @GET
        @Path("/{uuid}/info")
        @Timed
        javax.ws.rs.core.Response getInfo​(ServiceUser user,
                                          @PathParam("uuid")
                                          java.lang.String uuid)
        Retrieve the full config for the given DocRef
        Parameters:
        user - Authenticated user passed in from web framework
        uuid - The UUID of the docRef to return
        Returns:
        The DocRefInfo for the given DocRef
      • createDocument

        @POST
        @Path("/create/{uuid}/{name}")
        javax.ws.rs.core.Response createDocument​(ServiceUser user,
                                                 @PathParam("uuid")
                                                 java.lang.String uuid,
                                                 @PathParam("name")
                                                 java.lang.String name)
        A new document has been created in Stroom
        Parameters:
        user - Authenticated user passed in from web framework
        uuid - The UUID of the document as created by stroom
        name - The name of the document to be created.
        Returns:
        A doc ref for the newly created document.
      • update

        @PUT
        @Consumes("application/json")
        @Path("/update/{uuid}")
        javax.ws.rs.core.Response update​(ServiceUser user,
                                         @PathParam("uuid")
                                         java.lang.String uuid,
                                         java.lang.String updatedConfigJson)
        Update the document
        Parameters:
        user - Authenticated user passed in from web framework
        uuid - The UUID of the document as created by stroom
        updatedConfigJson - The updated configuration
        Returns:
        The updated config
      • copyDocument

        @POST
        @Path("/copy/{originalUuid}/{copyUuid}")
        javax.ws.rs.core.Response copyDocument​(ServiceUser user,
                                               @PathParam("originalUuid")
                                               java.lang.String originalUuid,
                                               @PathParam("copyUuid")
                                               java.lang.String copyUuid)
        A notification from Stroom that a document is being copied. The external system should copy it's configuration for the original into a new entity.
        Parameters:
        user - Authenticated user passed in from web framework
        originalUuid - The uuid of the document being copied
        copyUuid - The uuid of the copy
        Returns:
        A doc ref for the new document copy.
      • moveDocument

        @PUT
        @Path("/move/{uuid}")
        javax.ws.rs.core.Response moveDocument​(ServiceUser user,
                                               @PathParam("uuid")
                                               java.lang.String uuid)
        A Notification from Stroom that the document has been 'moved'. In most cases the external system will not care about this.
        Parameters:
        user - Authenticated user passed in from web framework
        uuid - The uuid of the document that was moved
        Returns:
        A doc ref for the moved document.
      • renameDocument

        @PUT
        @Path("/rename/{uuid}/{name}")
        javax.ws.rs.core.Response renameDocument​(ServiceUser user,
                                                 @PathParam("uuid")
                                                 java.lang.String uuid,
                                                 @PathParam("name")
                                                 java.lang.String name)
        A notifiation from Stroom that the name of a document has been changed. Whilst the name belongs to stroom it may be helpful for the external system to know what the name is, but the name should not be used for referencing the DocRef between systems as it could easily be out of sync.
        Parameters:
        user - Authenticated user passed in from web framework
        uuid - The uuid of the document you want to rename.
        name - The new name of the document.
        Returns:
        A doc ref for the renamed document.
      • deleteDocument

        @DELETE
        @Path("/delete/{uuid}")
        javax.ws.rs.core.Response deleteDocument​(ServiceUser user,
                                                 @PathParam("uuid")
                                                 java.lang.String uuid)
        The document with this UUID is being deleted in Stroom.
        Parameters:
        user - Authenticated user passed in from web framework
        uuid - The uuid of the document you want to delete.
        Returns:
        No content if OK
      • importDocument

        @POST
        @Path("/import/{uuid}/{name}/{confirmed}")
        javax.ws.rs.core.Response importDocument​(ServiceUser user,
                                                 @PathParam("uuid")
                                                 java.lang.String uuid,
                                                 @PathParam("name")
                                                 java.lang.String name,
                                                 @PathParam("confirmed")
                                                 java.lang.Boolean confirmed,
                                                 java.util.Map<java.lang.String,​java.lang.String> dataMap)
        Import the data as a new document.
        Parameters:
        user - Authenticated user passed in from web framework
        uuid - The UUID of the document to import
        name - The name of the document to import
        confirmed - Is the import a confirmed one? If it isn't then this is just a dry run.
        dataMap - The data to import
        Returns:
        The created document
      • exportDocument

        @GET
        @Path("/export/{uuid}")
        javax.ws.rs.core.Response exportDocument​(ServiceUser user,
                                                 @PathParam("uuid")
                                                 java.lang.String uuid)
        Export the given document
        Parameters:
        user - Authenticated user passed in from web framework
        uuid - The UUID of the document to export
        Returns:
        A Map of Strings by Strings containing the exported data.