Class ConfTrackerManager

java.lang.Object
com.jalios.jcms.ChannelListener
com.jalios.jcms.conftracker.ConfTrackerManager
All Implemented Interfaces:
PluginComponent, JPropertiesListener, Comparable

public class ConfTrackerManager extends ChannelListener implements JPropertiesListener
  • Field Details

  • Constructor Details

    • ConfTrackerManager

      public ConfTrackerManager()
  • Method Details

    • getInstance

      public static ConfTrackerManager getInstance()
    • init

      public void init()
    • propertiesChange

      public void propertiesChange(JProperties properties)
      Description copied from interface: JPropertiesListener
      Invoked after properties have been modified in JCMS and save on disk.

      You cannot alter the value received in parameters.

      Note that properties parameter may be null, a limited set of site properties, or all site properties.

      To check that a property has been modified, reload the "current" property instead using channel.getProperties or channel.getProperty.

      Specified by:
      propertiesChange in interface JPropertiesListener
      Parameters:
      properties - the properties which have been submitted to change
    • initAfterStartup

      public void initAfterStartup()
      Description copied from class: ChannelListener
      Called at the end of JPlatform startup.
      Overrides:
      initAfterStartup in class ChannelListener
    • track

      public void track(ConfTrackerManager.TrackerActions op)
    • getTrackerInfoList

      public List<TrackerInfo> getTrackerInfoList(Date startDateFilter, Date endDateFilter)
    • writeTrackerInfo

      public TrackerInfo writeTrackerInfo(List<TrackerDiffDto> propertyChanges, Set<String> statusChanges, ConfTrackerManager.TrackerActions action)
    • getPropertyChange

      public List<TrackerDiffDto> getPropertyChange(ConfTrackerManager.TrackerActions action)
    • getPropertyChange

      public List<TrackerDiffDto> getPropertyChange(List<TrackerInfo> trackerInfoList) throws IOException
      Throws:
      IOException
    • getStatusChange

      public List<TrackerDiffDto> getStatusChange(List<TrackerInfo> trackerInfoList) throws IOException
      Throws:
      IOException
    • isFirstTracking

      public boolean isFirstTracking()
    • isTrackingActivated

      public boolean isTrackingActivated()
    • getMapper

      public com.fasterxml.jackson.databind.ObjectMapper getMapper()
      Get Jackson object Mapper for Theme class
      Returns:
      ObjectMapper for Theme
      Since:
      sitesettings-1.2.0
    • getTrackerDiff

      public TrackerDiffDto getTrackerDiff(String key, Object oldValue, Object newValue)
    • compare

      public List<TrackerDiffDto> compare(TrackerInfo lastestTrackerInfo, TrackerInfo oldestTrackerInfo) throws IOException
      Throws:
      IOException
    • canAccessTracker

      public boolean canAccessTracker(Member mbr)
    • getPropLink

      public String getPropLink(boolean isProperty, String propKey)
    • getPropLabel

      public String getPropLabel(String propKey)
    • getPropDescription

      public String getPropDescription(String propKey)
    • getPropComponent

      public String getPropComponent(String propKey)
    • createPropRefFile

      public void createPropRefFile()
      Creates a properties reference file based on all properties in memory, except the language property.

      The method performs the following steps:

      1. Attempts to delete the existing custom reference file, if it exists.
      2. Initializes a PropertiesEditorHandler to handle properties editing.
      3. Creates a properties file and populates it with the filtered properties.
      4. Saves the properties file at the specified custom reference file path.

      If any exception occurs during the process, appropriate warnings are logged, and the method gracefully returns.

    • createStatusRefFile

      public void createStatusRefFile()
    • hasStatusRefFile

      public boolean hasStatusRefFile()
    • summarizeDiff

      public List<TrackerDiffDto> summarizeDiff(List<TrackerDiffDto> differences)
    • getAllUrid

      public List<String> getAllUrid()
    • getUridCount

      public int getUridCount()