Package com.jalios.jcms.conftracker
Class ConfTrackerManager
java.lang.Object
com.jalios.jcms.ChannelListener
com.jalios.jcms.conftracker.ConfTrackerManager
- All Implemented Interfaces:
PluginComponent,JPropertiesListener,Comparable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final SimpleDateFormatFields inherited from class com.jalios.jcms.ChannelListener
order -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAccessTracker(Member mbr) compare(TrackerInfo lastestTrackerInfo, TrackerInfo oldestTrackerInfo) voidCreates a properties reference file based on all properties in memory, except the language property.voidstatic ConfTrackerManagercom.fasterxml.jackson.databind.ObjectMapperGet Jackson object Mapper for Theme classgetPropComponent(String propKey) getPropDescription(String propKey) getPropertyChange(List<TrackerInfo> trackerInfoList) getPropLabel(String propKey) getPropLink(boolean isProperty, String propKey) getStatusChange(List<TrackerInfo> trackerInfoList) getTrackerDiff(String key, Object oldValue, Object newValue) getTrackerInfoList(Date startDateFilter, Date endDateFilter) intbooleanvoidinit()voidCalled at the end of JPlatform startup.booleanbooleanvoidpropertiesChange(JProperties properties) Invoked after properties have been modified in JCMS and save on disk.summarizeDiff(List<TrackerDiffDto> differences) voidwriteTrackerInfo(List<TrackerDiffDto> propertyChanges, Set<String> statusChanges, ConfTrackerManager.TrackerActions action) Methods inherited from class com.jalios.jcms.ChannelListener
compareTo, equals, getOrder, handleFinalize, init, initAfterStoreLoad, initBeforeHibernateFactoryBuild, initBeforeStoreLoad
-
Field Details
-
STATUS_FILENAME
- See Also:
-
PROPERTIES_FILENAME
- See Also:
-
TRACKING_ACTIVATED_PROP
- See Also:
-
IGNORED_NODE
-
TRAKING_FILE_DATE_FORMAT
-
-
Constructor Details
-
ConfTrackerManager
public ConfTrackerManager()
-
-
Method Details
-
getInstance
-
init
public void init() -
propertiesChange
Description copied from interface:JPropertiesListenerInvoked 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.getPropertiesorchannel.getProperty.- Specified by:
propertiesChangein interfaceJPropertiesListener- Parameters:
properties- the properties which have been submitted to change
-
initAfterStartup
public void initAfterStartup()Description copied from class:ChannelListenerCalled at the end of JPlatform startup.- Overrides:
initAfterStartupin classChannelListener
-
track
-
getTrackerInfoList
-
writeTrackerInfo
public TrackerInfo writeTrackerInfo(List<TrackerDiffDto> propertyChanges, Set<String> statusChanges, ConfTrackerManager.TrackerActions action) -
getPropertyChange
-
getPropertyChange
- Throws:
IOException
-
getStatusChange
- 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
-
compare
public List<TrackerDiffDto> compare(TrackerInfo lastestTrackerInfo, TrackerInfo oldestTrackerInfo) throws IOException - Throws:
IOException
-
canAccessTracker
-
getPropLink
-
getPropLabel
-
getPropDescription
-
getPropComponent
-
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:
- Attempts to delete the existing custom reference file, if it exists.
- Initializes a
PropertiesEditorHandlerto handle properties editing. - Creates a properties file and populates it with the filtered properties.
- 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
-
getAllUrid
-
getUridCount
public int getUridCount()
-