use of com.helger.xml.microdom.IMicroComment in project ph-commons by phax.
the class AbstractSimpleDAO method modifyWriteData.
/**
* Modify the created document by e.g. adding some comment or digital
* signature or whatsoever.
*
* @param aDoc
* The created non-<code>null</code> document.
*/
@OverrideOnDemand
@MustBeLocked(ELockType.WRITE)
protected void modifyWriteData(@Nonnull final IMicroDocument aDoc) {
final IMicroComment aComment = new MicroComment("This file was generated automatically - do NOT modify!\n" + "Written at " + PDTToString.getAsString(ZonedDateTime.now(Clock.systemUTC()), Locale.US));
final IMicroElement eRoot = aDoc.getDocumentElement();
// Add a small comment
if (eRoot != null)
aDoc.insertBefore(aComment, eRoot);
else
aDoc.appendChild(aComment);
}
use of com.helger.xml.microdom.IMicroComment in project ph-commons by phax.
the class AbstractWALDAO method modifyWriteData.
/**
* Modify the created document by e.g. adding some comment or digital
* signature or whatsoever.
*
* @param aDoc
* The created non-<code>null</code> document.
*/
@OverrideOnDemand
@MustBeLocked(ELockType.WRITE)
protected void modifyWriteData(@Nonnull final IMicroDocument aDoc) {
final IMicroComment aComment = new MicroComment("This file was generated automatically - do NOT modify!\n" + "Written at " + PDTToString.getAsString(ZonedDateTime.now(Clock.systemUTC()), Locale.US));
final IMicroElement eRoot = aDoc.getDocumentElement();
// Add a small comment
if (eRoot != null)
aDoc.insertBefore(aComment, eRoot);
else
aDoc.appendChild(aComment);
}
Aggregations