Package stroom.query.audit.client
Class DocRefResourceHttpClient<T extends DocRefEntity>
- java.lang.Object
-
- stroom.query.audit.client.DocRefResourceHttpClient<T>
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,DocRefResource
public class DocRefResourceHttpClient<T extends DocRefEntity> extends java.lang.Object implements DocRefResource, java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description DocRefResourceHttpClient(java.lang.String baseUrl)
-
Method Summary
Modifier and Type Method Description void
close()
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 Stroomjavax.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 documentjavax.ws.rs.core.Response
get(ServiceUser user, java.lang.String uuid)
Retrieve the full config for the given DocRefjavax.ws.rs.core.Response
getAll(ServiceUser user)
Retrieve the full config for the given DocRefjavax.ws.rs.core.Response
getInfo(ServiceUser user, java.lang.String uuid)
Retrieve the full config for the given DocRefjavax.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 updatedConfig)
Update the documentjavax.ws.rs.core.Response
update(ServiceUser user, java.lang.String uuid, T updatedConfig)
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
getAll
public javax.ws.rs.core.Response getAll(ServiceUser user)
Description copied from interface:DocRefResource
Retrieve the full config for the given DocRef- Specified by:
getAll
in interfaceDocRefResource
- Parameters:
user
- Authenticated user passed in from web framework- Returns:
- The full list of doc refs
-
get
public javax.ws.rs.core.Response get(ServiceUser user, java.lang.String uuid)
Description copied from interface:DocRefResource
Retrieve the full config for the given DocRef- Specified by:
get
in interfaceDocRefResource
- Parameters:
user
- Authenticated user passed in from web frameworkuuid
- The UUID of the docRef to return- Returns:
- The full implementation specific config for this docRef.
-
getInfo
public javax.ws.rs.core.Response getInfo(ServiceUser user, java.lang.String uuid)
Description copied from interface:DocRefResource
Retrieve the full config for the given DocRef- Specified by:
getInfo
in interfaceDocRefResource
- Parameters:
user
- Authenticated user passed in from web frameworkuuid
- The UUID of the docRef to return- Returns:
- The DocRefInfo for the given DocRef
-
createDocument
public javax.ws.rs.core.Response createDocument(ServiceUser user, java.lang.String uuid, java.lang.String name)
Description copied from interface:DocRefResource
A new document has been created in Stroom- Specified by:
createDocument
in interfaceDocRefResource
- Parameters:
user
- Authenticated user passed in from web frameworkuuid
- The UUID of the document as created by stroomname
- The name of the document to be created.- Returns:
- A doc ref for the newly created document.
-
update
public javax.ws.rs.core.Response update(ServiceUser user, java.lang.String uuid, T updatedConfig)
-
update
public javax.ws.rs.core.Response update(ServiceUser user, java.lang.String uuid, java.lang.String updatedConfig)
Description copied from interface:DocRefResource
Update the document- Specified by:
update
in interfaceDocRefResource
- Parameters:
user
- Authenticated user passed in from web frameworkuuid
- The UUID of the document as created by stroomupdatedConfig
- The updated configuration- Returns:
- The updated config
-
copyDocument
public javax.ws.rs.core.Response copyDocument(ServiceUser user, java.lang.String originalUuid, java.lang.String copyUuid)
Description copied from interface:DocRefResource
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.- Specified by:
copyDocument
in interfaceDocRefResource
- Parameters:
user
- Authenticated user passed in from web frameworkoriginalUuid
- The uuid of the document being copiedcopyUuid
- The uuid of the copy- Returns:
- A doc ref for the new document copy.
-
moveDocument
public javax.ws.rs.core.Response moveDocument(ServiceUser user, java.lang.String uuid)
Description copied from interface:DocRefResource
A Notification from Stroom that the document has been 'moved'. In most cases the external system will not care about this.- Specified by:
moveDocument
in interfaceDocRefResource
- Parameters:
user
- Authenticated user passed in from web frameworkuuid
- The uuid of the document that was moved- Returns:
- A doc ref for the moved document.
-
renameDocument
public javax.ws.rs.core.Response renameDocument(ServiceUser user, java.lang.String uuid, java.lang.String name)
Description copied from interface:DocRefResource
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.- Specified by:
renameDocument
in interfaceDocRefResource
- Parameters:
user
- Authenticated user passed in from web frameworkuuid
- 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
public javax.ws.rs.core.Response deleteDocument(ServiceUser user, java.lang.String uuid)
Description copied from interface:DocRefResource
The document with this UUID is being deleted in Stroom.- Specified by:
deleteDocument
in interfaceDocRefResource
- Parameters:
user
- Authenticated user passed in from web frameworkuuid
- The uuid of the document you want to delete.- Returns:
- No content if OK
-
importDocument
public 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)
Description copied from interface:DocRefResource
Import the data as a new document.- Specified by:
importDocument
in interfaceDocRefResource
- Parameters:
user
- Authenticated user passed in from web frameworkuuid
- The UUID of the document to importname
- The name of the document to importconfirmed
- 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
public javax.ws.rs.core.Response exportDocument(ServiceUser user, java.lang.String uuid)
Description copied from interface:DocRefResource
Export the given document- Specified by:
exportDocument
in interfaceDocRefResource
- Parameters:
user
- Authenticated user passed in from web frameworkuuid
- The UUID of the document to export- Returns:
- A Map of Strings by Strings containing the exported data.
-
-