Package org.cyclos.impl.utils
Class InputOutputProcessingHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseNetworkedHandlerImpl
-
- org.cyclos.impl.utils.InputOutputProcessingHandlerImpl
-
- All Implemented Interfaces:
InputOutputProcessingHandler
@Component public class InputOutputProcessingHandlerImpl extends BaseNetworkedHandlerImpl implements InputOutputProcessingHandler
Implementation forInputOutputProcessingHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classInputOutputProcessingHandlerImpl.Context
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
Fields inherited from interface org.cyclos.impl.utils.InputOutputProcessingHandler
FROM_CLIENT_BEAN_ATTR
-
-
Constructor Summary
Constructors Constructor Description InputOutputProcessingHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Pair<T,com.fasterxml.jackson.databind.JsonNode>processFromClient(T object, boolean logJson)Recursively processes the object received from a clientPair<Object[],com.fasterxml.jackson.databind.JsonNode>processMethodParameters(Method method, Object[] parameterValues, boolean logJson)Recursively processes the parameters of the given method call from a client<T> Pair<T,com.fasterxml.jackson.databind.JsonNode>processMethodResult(Method method, T result, boolean logJson)Recursively processes the result of the given method callcom.fasterxml.jackson.databind.JsonNodeprocessSensitiveMethodParameters(Method method, com.fasterxml.jackson.databind.JsonNode jsonNode)Masks any sensitive parameter value present in the given JsonNode only if it's an instance ofArrayNode.<T> Pair<T,com.fasterxml.jackson.databind.JsonNode>processToClient(T object, boolean logJson)Recursively processes the given object to send to a clientvoidrestore(Object... values)Restores each bean to the original state.-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
processFromClient
public <T> Pair<T,com.fasterxml.jackson.databind.JsonNode> processFromClient(T object, boolean logJson)
Description copied from interface:InputOutputProcessingHandlerRecursively processes the object received from a client- Specified by:
processFromClientin interfaceInputOutputProcessingHandler- Parameters:
object- The object to processlogJson- If true, the second pair value will be a JsonNode to show in the log as parameter
-
processMethodParameters
public Pair<Object[],com.fasterxml.jackson.databind.JsonNode> processMethodParameters(Method method, Object[] parameterValues, boolean logJson)
Description copied from interface:InputOutputProcessingHandlerRecursively processes the parameters of the given method call from a client- Specified by:
processMethodParametersin interfaceInputOutputProcessingHandlerlogJson- If true, the second pair value will be a JsonNode to show in the log as result
-
processMethodResult
public <T> Pair<T,com.fasterxml.jackson.databind.JsonNode> processMethodResult(Method method, T result, boolean logJson)
Description copied from interface:InputOutputProcessingHandlerRecursively processes the result of the given method call- Specified by:
processMethodResultin interfaceInputOutputProcessingHandlerresult- The method resultlogJson- If true, the second pair value will be a JsonNode to show in the log as result
-
processSensitiveMethodParameters
public com.fasterxml.jackson.databind.JsonNode processSensitiveMethodParameters(Method method, com.fasterxml.jackson.databind.JsonNode jsonNode)
Description copied from interface:InputOutputProcessingHandlerMasks any sensitive parameter value present in the given JsonNode only if it's an instance ofArrayNode. Any parameter annotated withMaskValueInLogis considered a sensitive one.
The same (but modified)JsonNodeinstance is returned.- Specified by:
processSensitiveMethodParametersin interfaceInputOutputProcessingHandler
-
processToClient
public <T> Pair<T,com.fasterxml.jackson.databind.JsonNode> processToClient(T object, boolean logJson)
Description copied from interface:InputOutputProcessingHandlerRecursively processes the given object to send to a client- Specified by:
processToClientin interfaceInputOutputProcessingHandler- Parameters:
object- The object to processlogJson- If true, the second pair value will be a JsonNode to show in the log as result
-
restore
public void restore(Object... values)
Description copied from interface:InputOutputProcessingHandlerRestores each bean to the original state. This is called in case of retrying the operation.- Specified by:
restorein interfaceInputOutputProcessingHandler
-
-