class MongoDbInMemory {

    public JsonNode getUpdateJsonForRule(RuleActions ruleActions, Map<String, DurationData> bindRuleToDuration) throws InvalidParseOperationException {
        if(ruleActions != null) {
            final ObjectNode initialMgt = (ObjectNode) getOrCreateEmptyNodeByName(updatedDocument, MANAGEMENT_KEY, false);

            applyAddRuleAction(ruleActions.getAdd(), initialMgt, bindRuleToDuration);
            applyUpdateRuleAction(ruleActions.getUpdate(), initialMgt, bindRuleToDuration);
            applyDeleteRuleAction(ruleActions.getDelete(), initialMgt);

            updateArchiveUnitProfile(ruleActions);

            JsonHandler.setNodeInPath((ObjectNode) updatedDocument, MANAGEMENT_KEY, initialMgt, true);
        }

        return updatedDocument;
    }

    public  MongoDbInMemory(JsonNode originalDocument, DynamicParserTokens parserTokens);

}