@Test public void testSetDocumentCreationDate() { logger.debug(c32); Element e1 = null; Element e2 = null; try { final Document c32DocumentTemp = documentXmlConverter .loadDocument(documentEditor.setDocumentCreationDate(c32)); e1 = documentAccessor.getElement(c32Document, xPathDate); e2 = documentAccessor.getElement(c32DocumentTemp, xPathDate); logger.debug(e1.getAttribute("value")); logger.debug(e2.getAttribute("value")); } catch (final Exception e) { logger.error(e.getMessage(), e); } assertNotNull(e1); assertNotNull(e2); assertNotEquals(e1.getAttribute("value"), e2.getAttribute("value")); }
@Override public String setDocumentCreationDate(String document) throws Exception, XPathExpressionException, XMLEncryptionException { Document xmlDocument; xmlDocument = documentXmlConverter.loadDocument(document); final DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm"); final Date date = new Date(); final String xPathExprEffectiveDate = " final Element dateElement = documentAccessor.getElement(xmlDocument, xPathExprEffectiveDate); dateElement.setAttribute("value", dateFormat.format(date)); document = documentXmlConverter.convertXmlDocToString(xmlDocument); return document; }
DocumentEditorImpl implements DocumentEditor { @Override public String setDocumentCreationDate(String document) throws Exception, XPathExpressionException, XMLEncryptionException { Document xmlDocument; xmlDocument = documentXmlConverter.loadDocument(document); final DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm"); final Date date = new Date(); final String xPathExprEffectiveDate = " final Element dateElement = documentAccessor.getElement(xmlDocument, xPathExprEffectiveDate); dateElement.setAttribute("value", dateFormat.format(date)); document = documentXmlConverter.convertXmlDocToString(xmlDocument); return document; } }
DocumentEditorImpl implements DocumentEditor { @Override public String setDocumentCreationDate(String document) throws Exception, XPathExpressionException, XMLEncryptionException { Document xmlDocument; xmlDocument = documentXmlConverter.loadDocument(document); final DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm"); final Date date = new Date(); final String xPathExprEffectiveDate = " final Element dateElement = documentAccessor.getElement(xmlDocument, xPathExprEffectiveDate); dateElement.setAttribute("value", dateFormat.format(date)); document = documentXmlConverter.convertXmlDocToString(xmlDocument); return document; } DocumentEditorImpl(MetadataGenerator metadataGenerator,
			FileReader fileReader, DocumentXmlConverter documentXmlConverter,
			DocumentAccessor documentAccessor); }
DocumentEditorImpl implements DocumentEditor { @Override public String setDocumentCreationDate(String document) throws Exception, XPathExpressionException, XMLEncryptionException { Document xmlDocument; xmlDocument = documentXmlConverter.loadDocument(document); final DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm"); final Date date = new Date(); final String xPathExprEffectiveDate = " final Element dateElement = documentAccessor.getElement(xmlDocument, xPathExprEffectiveDate); dateElement.setAttribute("value", dateFormat.format(date)); document = documentXmlConverter.convertXmlDocToString(xmlDocument); return document; } DocumentEditorImpl(MetadataGenerator metadataGenerator,
			FileReader fileReader, DocumentXmlConverter documentXmlConverter,
			DocumentAccessor documentAccessor); @Override String setDocumentCreationDate(String document); @Override ByteArrayDataSource setDocumentPayloadRawData(String document,
			boolean packageAsXdm, String senderEmailAddress,
			String recipientEmailAddress, XacmlResult xacmlResult,
			String executionResponseContainer, byte[] maskingKeyBytes,
			byte[] encryptionKeyBytes); }
DocumentEditorImpl implements DocumentEditor { @Override public String setDocumentCreationDate(String document) throws Exception, XPathExpressionException, XMLEncryptionException { Document xmlDocument; xmlDocument = documentXmlConverter.loadDocument(document); final DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm"); final Date date = new Date(); final String xPathExprEffectiveDate = " final Element dateElement = documentAccessor.getElement(xmlDocument, xPathExprEffectiveDate); dateElement.setAttribute("value", dateFormat.format(date)); document = documentXmlConverter.convertXmlDocToString(xmlDocument); return document; } DocumentEditorImpl(MetadataGenerator metadataGenerator,
			FileReader fileReader, DocumentXmlConverter documentXmlConverter,
			DocumentAccessor documentAccessor); @Override String setDocumentCreationDate(String document); @Override ByteArrayDataSource setDocumentPayloadRawData(String document,
			boolean packageAsXdm, String senderEmailAddress,
			String recipientEmailAddress, XacmlResult xacmlResult,
			String executionResponseContainer, byte[] maskingKeyBytes,
			byte[] encryptionKeyBytes);  }