コード例 #1
0
ファイル: MdsExtractor.java プロジェクト: stetro/MDS-Viewer
 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();
   }
 }
コード例 #2
0
ファイル: MdsExtractor.java プロジェクト: stetro/MDS-Viewer
 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;
 }