TrashService is used to move documents to *trash* foder or restore.

|| *Method* || *Return* || *Prototype* || *Desription* ||
| *moveToTrash* | {{void}} | moveToTrash(Node node, String trashPath, String trashWorkspace, String repository, SessionProvider sessionProvider) throws Exception; | Move node to trash location{example}{example}@param node: Node will be moved to trash{example}{example}@param trashPath: The trash node path{example}{example}@param trashWorkspace: The trash workspace{example}{example}@param repository: The repository name{example}{example}@param sessionProvider: User session provider which will be used to get session{example}{example}@throws Exception |
| *restoreFromTrash* | {{void}} | restoreFromTrash(Node trashHomeNode, String trashNodePath, String repository, SessionProvider sessionProvider) throws Exception; | Restore node from trash{example}{example}@param trashHomeNode: trash home node{example}{example}@param restorePath Restore path which will be used to restore{example}{example}@param restoreWorkspace The workspace name of node which moved to trash{example}{example}@param repository The repository name{example}{example}@param sessionProvider User session provider which will be used to get session{example}{example}@throws Exception |
| *getAllNodeInTrash* | {{List<Node>}} | getAllNodeInTrash(String trashWorkspace, String repository, SessionProvider sessionProvider) throws Exception; | Get all nodes in trash location{example}{example}@param trashWorkspace{example}{example}@param repository{example}{example}@param sessionProvider{example}{example}@return List<Node>: All nodes in trash{example}{example}@throws Exception |
| *getAllNodeInTrashByUser* | {{List<Node>}} | getAllNodeInTrashByUser(String trashWorkspace, String repository, SessionProvider sessionProvider, String userName) throws Exception; | Get all nodes by user in trash location{example}{example}@param trashWorkspace{example}{example}@param repository{example}{example}@param sessionProvider{example}{example}@param userName{example}{example}@return List<Node>: all nodes in *trash* are moved by user{example}{example}@throws Exception |
| *removeRelations* | {{List<Node>}} | removeRelations(Node node, SessionProvider sessionProvider, String repository) throws Exception;| Removes all *relationable* property of nodes that have relation to this node{example}{example}@param node {example}{example}@param sessionProvider{example}{example}@param repository{example}{example}@return remaining nodes in trash {example}{example}@throws Exception |
