mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Purge tests cover more now. Moved purging queries into mapping file.
Added call to AVMService to get Versions by creation date. GetRepositoryVersions methods now return Lists of VersionDescriptors, value objects with the attributes of a version. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3131 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -20,10 +20,10 @@ package org.alfresco.repo.avm;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.hibernate.LockMode;
|
||||
import org.hibernate.Query;
|
||||
@@ -553,17 +553,32 @@ class SuperRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all version ids for a given repository.
|
||||
* Get all version for a given repository.
|
||||
* @param name The name of the repository.
|
||||
* @return A Set will all the version ids.
|
||||
*/
|
||||
public Set<Integer> getRepositoryVersions(String name)
|
||||
public List<VersionDescriptor> getRepositoryVersions(String name)
|
||||
{
|
||||
Repository rep = getRepositoryByName(name);
|
||||
fSession.get().lock(rep, LockMode.READ);
|
||||
return rep.getVersions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the set of versions between (inclusive) of the given dates.
|
||||
* From or to may be null but not both.
|
||||
* @param name The name of the repository.
|
||||
* @param from The earliest date.
|
||||
* @param to The latest date.
|
||||
* @return The Set of version IDs.
|
||||
*/
|
||||
public List<VersionDescriptor> getRepositoryVersions(String name, Date from, Date to)
|
||||
{
|
||||
Repository rep = getRepositoryByName(name);
|
||||
fSession.get().lock(rep, LockMode.READ);
|
||||
return rep.getVersions(from, to);
|
||||
}
|
||||
|
||||
/**
|
||||
* Issue a node id.
|
||||
* @return The new id.
|
||||
|
Reference in New Issue
Block a user