Class ArchiveUnitUpdateUtils


  • public class ArchiveUnitUpdateUtils
    extends java.lang.Object
    ArchiveUnitUpdateUtils in order to deal with common update operations for units
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.fasterxml.jackson.databind.JsonNode computeEndDate​(com.fasterxml.jackson.databind.node.ObjectNode updatingRule, com.fasterxml.jackson.databind.JsonNode ruleModel)  
      static java.lang.String getDiffMessageFor​(com.fasterxml.jackson.databind.JsonNode diff, java.lang.String unitId)
      Common method to get the diff message
      static boolean updateCategoryRules​(com.fasterxml.jackson.databind.JsonNode rulesForCategory, java.util.List<com.fasterxml.jackson.databind.JsonNode> listRulesByType, UpdateMultiQuery query, java.lang.String key)
      Method used to get update query for an archive unit
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • UNLIMITED_RULE_DURATION

        public static final java.lang.String UNLIMITED_RULE_DURATION
        See Also:
        Constant Field Values
    • Constructor Detail

      • ArchiveUnitUpdateUtils

        public ArchiveUnitUpdateUtils()
    • Method Detail

      • updateCategoryRules

        public static boolean updateCategoryRules​(com.fasterxml.jackson.databind.JsonNode rulesForCategory,
                                                  java.util.List<com.fasterxml.jackson.databind.JsonNode> listRulesByType,
                                                  UpdateMultiQuery query,
                                                  java.lang.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)