|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.platform.repository2.unified.jcr.DefaultDeleteHelper
public class DefaultDeleteHelper
Default implementation of IDeleteHelper
. If user suzy
in tenant acme
deletes a file with id
xyz
and named test
in folder with id abc
then this implementation will move the file to
delete in such a way that the new absolute path to the deleted file will be
/pentaho/acme/home/suzy/.trash/pho:abc/pho:xyz/test
. This provides fast access to the deleted items of a
particular folder plus fast access to all deleted items (aka the recycle bin view).
Assumptions:
By storing deleted files inside the user's home folder, the user's recycle bin is effectively private. This is desirable because a deleted file with confidential information should not be seen by anyone else except the deleting user.
Constructor Summary | |
---|---|
DefaultDeleteHelper(IOwnerLookupHelper ownerLookupHelper,
ILockHelper lockHelper,
IPathConversionHelper pathConversionHelper)
|
Method Summary | |
---|---|
void |
deleteFile(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
Serializable fileId)
Deletes a file in a way that it can be recovered. |
List<RepositoryFile> |
getDeletedFiles(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants)
Lists deleted files for this user. |
List<RepositoryFile> |
getDeletedFiles(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
Serializable folderId,
String filter)
Lists deleted files for this folder and user. |
Serializable |
getOriginalParentFolderId(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
Serializable fileId)
Returns the ID of the original parent folder. |
void |
permanentlyDeleteFile(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
Serializable fileId)
Deletes a file in a way that it cannot be recovered. |
void |
undeleteFile(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
Serializable fileId)
Recovers a deleted file to its original location. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultDeleteHelper(IOwnerLookupHelper ownerLookupHelper, ILockHelper lockHelper, IPathConversionHelper pathConversionHelper)
Method Detail |
---|
public void deleteFile(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId) throws javax.jcr.RepositoryException
Moves file to subfolder of .trash folder in same folder as file.
deleteFile
in interface IDeleteHelper
javax.jcr.RepositoryException
public List<RepositoryFile> getDeletedFiles(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable folderId, String filter) throws javax.jcr.RepositoryException
getDeletedFiles
in interface IDeleteHelper
filter
- filter may be a full name or a partial name with one or more wildcard characters ("*")
javax.jcr.RepositoryException
public List<RepositoryFile> getDeletedFiles(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants) throws javax.jcr.RepositoryException
getDeletedFiles
in interface IDeleteHelper
javax.jcr.RepositoryException
public void permanentlyDeleteFile(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId) throws javax.jcr.RepositoryException
permanentlyDeleteFile
in interface IDeleteHelper
javax.jcr.RepositoryException
public void undeleteFile(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId) throws javax.jcr.RepositoryException
undeleteFile
in interface IDeleteHelper
javax.jcr.RepositoryException
public Serializable getOriginalParentFolderId(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId) throws javax.jcr.RepositoryException
IDeleteHelper.undeleteFile(Session, PentahoJcrConstants, Serializable)
.
getOriginalParentFolderId
in interface IDeleteHelper
fileId
- file id of deleted file
javax.jcr.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |