@Test public void shouldSetIssuedDate() { DocumentModel doc = session.createDocumentModel("/", "file", "File"); Map<String, Object> originalProperties = new HashMap<>(doc.getProperties("dublincore")); Set<String> expectedChangedProperties = Collections.singleton("dc:issued"); Calendar currentDate = Calendar.getInstance(); storageService.setIssuedDate(doc, currentDate); assertDocumentPropertiesChanges(doc, originalProperties, expectedChangedProperties); assertEquals(currentDate, doc.getPropertyValue("dc:issued")); }
@Override public void setIssuedDate(DocumentModel doc, Calendar issuedDate) { doc.setPropertyValue(DUBLINCORE_ISSUED_DATE_PROPERTY, issuedDate); }
DublinCoreStorageServiceImpl extends DefaultComponent implements DublinCoreStorageService { @Override public void setIssuedDate(DocumentModel doc, Calendar issuedDate) { doc.setPropertyValue(DUBLINCORE_ISSUED_DATE_PROPERTY, issuedDate); } }
DublinCoreStorageServiceImpl extends DefaultComponent implements DublinCoreStorageService { @Override public void setIssuedDate(DocumentModel doc, Calendar issuedDate) { doc.setPropertyValue(DUBLINCORE_ISSUED_DATE_PROPERTY, issuedDate); }  }
DublinCoreStorageServiceImpl extends DefaultComponent implements DublinCoreStorageService { @Override public void setIssuedDate(DocumentModel doc, Calendar issuedDate) { doc.setPropertyValue(DUBLINCORE_ISSUED_DATE_PROPERTY, issuedDate); }  @Override void setCreationDate(DocumentModel doc, Calendar creationDate); @Override void setIssuedDate(DocumentModel doc, Calendar issuedDate); @Override void setModificationDate(DocumentModel doc, Calendar modificationDate); @Override void addContributor(DocumentModel doc, Event event); }
DublinCoreStorageServiceImpl extends DefaultComponent implements DublinCoreStorageService { @Override public void setIssuedDate(DocumentModel doc, Calendar issuedDate) { doc.setPropertyValue(DUBLINCORE_ISSUED_DATE_PROPERTY, issuedDate); }  @Override void setCreationDate(DocumentModel doc, Calendar creationDate); @Override void setIssuedDate(DocumentModel doc, Calendar issuedDate); @Override void setModificationDate(DocumentModel doc, Calendar modificationDate); @Override void addContributor(DocumentModel doc, Event event);  }