Class SystemMetadataDeltaLogger
java.lang.Object
edu.ucsb.nceas.metacat.systemmetadata.log.SystemMetadataDeltaLogger
A class can log the delta change of the system metadata when the updateSystemMetadata method
is called.
- Author:
- Tao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static Stringcompare(String user, org.dataone.service.types.v2.SystemMetadata oldSys, org.dataone.service.types.v2.SystemMetadata newSys) Compare the oldSys and newSys and return the delta in the Json format.voidlog(String user, org.dataone.service.types.v2.SystemMetadata oldSys, org.dataone.service.types.v2.SystemMetadata newSys) Log the system metadata difference in another thread only when it set the trace debug levelvoidlog(org.dataone.service.types.v1.Session session, org.dataone.service.types.v2.SystemMetadata oldSys, org.dataone.service.types.v2.SystemMetadata newSys) Log the system metadata difference in another thread only when it set the trace debug level
-
Constructor Details
-
SystemMetadataDeltaLogger
public SystemMetadataDeltaLogger()Default constructor
-
-
Method Details
-
log
public void log(org.dataone.service.types.v1.Session session, org.dataone.service.types.v2.SystemMetadata oldSys, org.dataone.service.types.v2.SystemMetadata newSys) Log the system metadata difference in another thread only when it set the trace debug level- Parameters:
session- the session who requests the changeoldSys- the old version of the system metadatanewSys- the new version of the system metadata
-
log
public void log(String user, org.dataone.service.types.v2.SystemMetadata oldSys, org.dataone.service.types.v2.SystemMetadata newSys) Log the system metadata difference in another thread only when it set the trace debug level- Parameters:
user- the user who requests the changeoldSys- the old version of the system metadatanewSys- the new version of the system metadata
-
compare
protected static String compare(String user, org.dataone.service.types.v2.SystemMetadata oldSys, org.dataone.service.types.v2.SystemMetadata newSys) throws com.fasterxml.jackson.core.JsonProcessingException, InvocationTargetException, IllegalAccessException Compare the oldSys and newSys and return the delta in the Json format. The order changes don't count.- Parameters:
oldSys- the previous version of system metadatanewSys- the new version of system metadata- Returns:
- the delta change in the Json format
- Throws:
com.fasterxml.jackson.core.JsonProcessingExceptionInvocationTargetExceptionIllegalAccessException
-