Class MacroCountStore


  • public class MacroCountStore
    extends Object
    Persists the number of each type of macro present on the page, and calculates the number of newly added macros by comparing current macro counts with those from the previous version of the page.
    Since:
    5.6
    • Constructor Detail

      • MacroCountStore

        public MacroCountStore()
    • Method Detail

      • updateAndGetNewCounts

        public List<MacroCount> updateAndGetNewCounts​(MacroCounter counter,
                                                      ContentEntityObject entity,
                                                      int entityVersion)
        Calculates the number of newly added macros by comparing results from the supplied MacroCounter with the counts stored in the ContentProperties of the entity, and updates those counts after the difference has been calculated.
        Returns:
        a list of MacroCount objects for each type of newly added macro, with counts indicating how many instances of that macro were added