Package com.flower.docs.operation.api
Class OperationHook
- java.lang.Object
-
- com.flower.docs.operation.api.OperationHook
-
- All Implemented Interfaces:
OperationHandler
public abstract class OperationHook extends java.lang.Object implements OperationHandler
AnOperationHandlerwhich can be exposed as a REST service using a SpringRestController. This REST service can be called/notified by Flower Core.
This class wraps JSON deserialization and serialization ofOperationContextusingObjectMapper- Author:
- Christopher Laszczuk
-
-
Constructor Summary
Constructors Constructor Description OperationHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OperationContextdeserialize(org.springframework.http.HttpEntity<java.lang.String> httpEntity)protected OperationContextdeserializeContext(com.fasterxml.jackson.databind.ObjectMapper mapper, java.lang.String json)voidinitialize()java.lang.StringprocessHook(java.lang.String scope, org.springframework.http.HttpEntity<java.lang.String> httpEntity)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.flower.docs.operation.api.OperationHandler
process
-
-
-
-
Method Detail
-
initialize
@PostConstruct public void initialize() throws java.lang.Exception- Throws:
java.lang.Exception
-
processHook
@RequestMapping(value={"/{scope}/documents","/{scope}/tasks","/{scope}/folders","/{scope}/virtual_folders","/{scope}/document_classes","/{scope}/task_classes","/{scope}/folder_classes","/{scope}/virtual_folder_classes","/{scope}/tag_classes","/{scope}/security_objects","/{scope}/workflows","/{scope}/users","/{scope}/teams","/{scope}/groups","/{scope}/scopes","/{scope}/files"}, method=POST) public java.lang.String processHook(@PathVariable java.lang.String scope, org.springframework.http.HttpEntity<java.lang.String> httpEntity) throws com.flower.docs.domain.exception.TechnicalException, com.flower.docs.domain.exception.FunctionalException- Throws:
com.flower.docs.domain.exception.TechnicalExceptioncom.flower.docs.domain.exception.FunctionalException
-
deserialize
protected OperationContext deserialize(org.springframework.http.HttpEntity<java.lang.String> httpEntity) throws com.flower.docs.domain.exception.TechnicalException
- Throws:
com.flower.docs.domain.exception.TechnicalException
-
deserializeContext
protected OperationContext deserializeContext(com.fasterxml.jackson.databind.ObjectMapper mapper, java.lang.String json) throws com.flower.docs.domain.exception.TechnicalException
- Throws:
com.flower.docs.domain.exception.TechnicalException
-
-