Interface IDeleteHelper
-
- All Known Implementing Classes:
DefaultDeleteHelper
public interface IDeleteHelper
Handles delete, undelete, and permanent delete. Handles listing deleted files and purging some or all deleted files.- Author:
- mlowery
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deleteFile(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId)
Deletes a file in a way that it can be recovered.List<org.pentaho.platform.api.repository2.unified.RepositoryFile>
getAllDeletedFiles(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants)
Lists deleted files for all users.List<org.pentaho.platform.api.repository2.unified.RepositoryFile>
getDeletedFiles(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants)
Lists deleted files for this user.List<org.pentaho.platform.api.repository2.unified.RepositoryFile>
getDeletedFiles(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, String origParentFolderPath, String filter)
Lists deleted files for this folder and user.String
getOriginalParentFolderPath(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId)
Returns the absolute path 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.
-
-
-
Method Detail
-
deleteFile
void deleteFile(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId) throws javax.jcr.RepositoryException
Deletes a file in a way that it can be recovered.- Parameters:
fileId
-- Throws:
javax.jcr.RepositoryException
-
undeleteFile
void undeleteFile(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId) throws javax.jcr.RepositoryException
Recovers a deleted file to its original location.- Parameters:
fileId
-- Throws:
javax.jcr.RepositoryException
-
permanentlyDeleteFile
void permanentlyDeleteFile(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId) throws javax.jcr.RepositoryException
Deletes a file in a way that it cannot be recovered. (Note that "cannot be recovered" doesn't mean "shred"--it means that the file cannot be recovered using this API.)- Parameters:
fileId
-- Throws:
javax.jcr.RepositoryException
-
getDeletedFiles
List<org.pentaho.platform.api.repository2.unified.RepositoryFile> getDeletedFiles(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, String origParentFolderPath, String filter) throws javax.jcr.RepositoryException
Lists deleted files for this folder and user.- Parameters:
origParentFolderPath
- path to original parent folderfilter
- filter may be a full name or a partial name with one or more wildcard characters ("*")- Returns:
- list of deleted files IDs for this folder and user
- Throws:
javax.jcr.RepositoryException
-
getDeletedFiles
List<org.pentaho.platform.api.repository2.unified.RepositoryFile> getDeletedFiles(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants) throws javax.jcr.RepositoryException
Lists deleted files for this user. In this case, the path field of each file is the original path where it was located prior to deletion. This is the "recycle bin" view.- Returns:
- list of deleted files for this user
- Throws:
javax.jcr.RepositoryException
-
getAllDeletedFiles
List<org.pentaho.platform.api.repository2.unified.RepositoryFile> getAllDeletedFiles(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants) throws javax.jcr.RepositoryException
Lists deleted files for all users. In this case, the path field of each file is the original path where it was located prior to deletion. This is the administrator "recycle bin" view.- Returns:
- list of deleted files for all users
- Throws:
javax.jcr.RepositoryException
-
getOriginalParentFolderPath
String getOriginalParentFolderPath(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId) throws javax.jcr.RepositoryException
Returns the absolute path of the original parent folder. Can be used by caller to checkout parent folder before callingundeleteFile(Session, PentahoJcrConstants, Serializable)
.- Parameters:
fileId
- file id of deleted file- Throws:
javax.jcr.RepositoryException
-
-