Exemple #1
0
 public Date getLastModified(DocumentName documentName) {
   try {
     PDocument pdocument = getpDocument(documentName);
     PDocumentVersionSupport versionSupport = pdocument.getVersionSupport();
     VersionInfo versionInfo = versionSupport.getVersionInfo();
     Version version = versionInfo.getVersion();
     return new Date(version.getCreationTime());
   } catch (MDSAccessException e) {
     return new Date();
   }
 }
Exemple #2
0
 public HashMap<Long, Date> getVersions(DocumentName documentName) {
   HashMap<Long, Date> hashMap = new HashMap<Long, Date>();
   try {
     PDocument pdocument = getpDocument(documentName);
     for (Version v : pdocument.getVersionSupport().getVersionInfo().listVersions()) {
       hashMap.put(v.getVersionNumber(), new Date(v.getCreationTime()));
     }
   } catch (MDSAccessException e) {
     throw new IllegalArgumentException("Could not list Versions !" + e.getMessage());
   }
   return hashMap;
 }