Class ArchiveUnitUpdateUtils
java.lang.Object
fr.gouv.vitam.functional.administration.common.utils.ArchiveUnitUpdateUtils
ArchiveUnitUpdateUtils in order to deal with common update operations for units
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.JsonNode
computeEndDate
(com.fasterxml.jackson.databind.node.ObjectNode updatingRule, com.fasterxml.jackson.databind.JsonNode ruleModel) static String
getDiffMessageFor
(com.fasterxml.jackson.databind.JsonNode diff, String unitId) Common method to get the diff messagestatic boolean
updateCategoryRules
(com.fasterxml.jackson.databind.JsonNode rulesForCategory, List<com.fasterxml.jackson.databind.JsonNode> listRulesByType, UpdateMultiQuery query, String key) Method used to get update query for an archive unit
-
Field Details
-
UNLIMITED_RULE_DURATION
- See Also:
-
-
Constructor Details
-
ArchiveUnitUpdateUtils
public ArchiveUnitUpdateUtils()
-
-
Method Details
-
updateCategoryRules
public static boolean updateCategoryRules(com.fasterxml.jackson.databind.JsonNode rulesForCategory, List<com.fasterxml.jackson.databind.JsonNode> listRulesByType, UpdateMultiQuery query, String key) throws InvalidCreateOperationException Method used to get update query for an archive unit- Parameters:
rulesForCategory
-listRulesByType
-query
-key
-- Returns:
- Throws:
InvalidCreateOperationException
-
computeEndDate
@Nonnull public static com.fasterxml.jackson.databind.JsonNode computeEndDate(@Nonnull com.fasterxml.jackson.databind.node.ObjectNode updatingRule, com.fasterxml.jackson.databind.JsonNode ruleModel) -
getDiffMessageFor
public static String getDiffMessageFor(com.fasterxml.jackson.databind.JsonNode diff, String unitId) throws InvalidParseOperationException Common method to get the diff message- Parameters:
diff
-unitId
-- Returns:
- Throws:
InvalidParseOperationException
-