Package stroom.query.audit.rest
Class AuditedDocRefResourceImpl<T extends DocRefEntity>
- java.lang.Object
-
- stroom.query.audit.rest.AuditedDocRefResourceImpl<T>
-
- All Implemented Interfaces:
DocRefResource
public class AuditedDocRefResourceImpl<T extends DocRefEntity> extends java.lang.Object implements DocRefResource
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOPY_DOC_REFstatic java.lang.StringCREATE_DOC_REFstatic java.lang.StringDELETE_DOC_REFstatic java.lang.StringEXPORT_DOC_REFstatic java.lang.StringGET_ALL_DOC_REFSstatic java.lang.StringGET_DOC_REFstatic java.lang.StringGET_DOC_REF_INFOstatic java.lang.StringIMPORT_DOC_REFstatic java.lang.StringMOVE_DOC_REFstatic java.lang.StringRENAME_DOC_REFstatic java.lang.StringUPDATE_DOC_REF
-
Constructor Summary
Constructors Constructor Description AuditedDocRefResourceImpl(DocRefService service, event.logging.EventLoggingService eventLoggingService, AuthorisationService authorisationService, DocRefEntity.ClassProvider docRefEntityClassSupplier)
-
Method Summary
Modifier and Type Method Description javax.ws.rs.core.ResponsecopyDocument(ServiceUser user, java.lang.String originalUuid, java.lang.String copyUuid)A notification from Stroom that a document is being copied.javax.ws.rs.core.ResponsecreateDocument(ServiceUser user, java.lang.String uuid, java.lang.String name)A new document has been created in Stroomjavax.ws.rs.core.ResponsedeleteDocument(ServiceUser user, java.lang.String uuid)The document with this UUID is being deleted in Stroom.javax.ws.rs.core.ResponseexportDocument(ServiceUser user, java.lang.String uuid)Export the given documentjavax.ws.rs.core.Responseget(ServiceUser user, java.lang.String uuid)Retrieve the full config for the given DocRefjavax.ws.rs.core.ResponsegetAll(ServiceUser user)Retrieve the full config for the given DocRefjavax.ws.rs.core.ResponsegetInfo(ServiceUser user, java.lang.String uuid)Retrieve the full config for the given DocRefjavax.ws.rs.core.ResponseimportDocument(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.ResponsemoveDocument(ServiceUser user, java.lang.String uuid)A Notification from Stroom that the document has been 'moved'.javax.ws.rs.core.ResponserenameDocument(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.Responseupdate(ServiceUser user, java.lang.String uuid, java.lang.String updatedConfigJson)Update the document
-
-
-
Field Detail
-
GET_ALL_DOC_REFS
public static final java.lang.String GET_ALL_DOC_REFS
- See Also:
- Constant Field Values
-
GET_DOC_REF
public static final java.lang.String GET_DOC_REF
- See Also:
- Constant Field Values
-
GET_DOC_REF_INFO
public static final java.lang.String GET_DOC_REF_INFO
- See Also:
- Constant Field Values
-
CREATE_DOC_REF
public static final java.lang.String CREATE_DOC_REF
- See Also:
- Constant Field Values
-
UPDATE_DOC_REF
public static final java.lang.String UPDATE_DOC_REF
- See Also:
- Constant Field Values
-
COPY_DOC_REF
public static final java.lang.String COPY_DOC_REF
- See Also:
- Constant Field Values
-
MOVE_DOC_REF
public static final java.lang.String MOVE_DOC_REF
- See Also:
- Constant Field Values
-
RENAME_DOC_REF
public static final java.lang.String RENAME_DOC_REF
- See Also:
- Constant Field Values
-
DELETE_DOC_REF
public static final java.lang.String DELETE_DOC_REF
- See Also:
- Constant Field Values
-
IMPORT_DOC_REF
public static final java.lang.String IMPORT_DOC_REF
- See Also:
- Constant Field Values
-
EXPORT_DOC_REF
public static final java.lang.String EXPORT_DOC_REF
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AuditedDocRefResourceImpl
@Inject public AuditedDocRefResourceImpl(DocRefService service, event.logging.EventLoggingService eventLoggingService, AuthorisationService authorisationService, DocRefEntity.ClassProvider docRefEntityClassSupplier)
-
-
Method Detail
-
getAll
public javax.ws.rs.core.Response getAll(ServiceUser user)
Description copied from interface:DocRefResourceRetrieve the full config for the given DocRef- Specified by:
getAllin 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:DocRefResourceRetrieve the full config for the given DocRef- Specified by:
getin 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:DocRefResourceRetrieve the full config for the given DocRef- Specified by:
getInfoin 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:DocRefResourceA new document has been created in Stroom- Specified by:
createDocumentin 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, java.lang.String updatedConfigJson)
Description copied from interface:DocRefResourceUpdate the document- Specified by:
updatein interfaceDocRefResource- Parameters:
user- Authenticated user passed in from web frameworkuuid- The UUID of the document as created by stroomupdatedConfigJson- 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:DocRefResourceA 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:
copyDocumentin 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:DocRefResourceA Notification from Stroom that the document has been 'moved'. In most cases the external system will not care about this.- Specified by:
moveDocumentin 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:DocRefResourceA 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:
renameDocumentin 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:DocRefResourceThe document with this UUID is being deleted in Stroom.- Specified by:
deleteDocumentin 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:DocRefResourceImport the data as a new document.- Specified by:
importDocumentin 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:DocRefResourceExport the given document- Specified by:
exportDocumentin 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.
-
-