public class TrashServiceImpl extends Object implements TrashService
| Modifier and Type | Field and Description |
|---|---|
static String |
EXO_TARGETPATH |
static String |
EXO_TARGETWS |
static String |
EXO_TOTAL |
static String |
EXO_WORKSPACE |
static String |
MIX_REFERENCEABLE |
static String |
SYMLINK |
static String |
TAXONOMY_LINK |
static String |
UUID |
EXO_RESTORE_LOCATION, RESTORE_PATH, RESTORE_WORKSPACE, TRASH_ID| Constructor and Description |
|---|
TrashServiceImpl(org.exoplatform.services.jcr.RepositoryService repositoryService,
LinkManager linkManager,
TaxonomyService taxonomyService,
org.exoplatform.container.xml.InitParams initParams) |
| Modifier and Type | Method and Description |
|---|---|
List<javax.jcr.Node> |
getAllNodeInTrash(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
Get all nodes in trash location
|
List<javax.jcr.Node> |
getAllNodeInTrashByUser(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
String userName)
Get all nodes by user in trash location
|
javax.jcr.Node |
getNodeByTrashId(String trashId)
Get
Node in trash folder by trashId |
javax.jcr.Node |
getTrashHomeNode()
Get the trash hone's node
|
boolean |
isInTrash(javax.jcr.Node node)
Check whether a given node is in Trash or not
|
String |
moveToTrash(javax.jcr.Node node,
org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
Move node to trash location
|
String |
moveToTrash(javax.jcr.Node node,
org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
int deep)
Move node to trash location with deep
|
void |
removeRelations(javax.jcr.Node node,
org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
Removes all 'relationable' property of nodes that have relation to this node
|
void |
restoreFromTrash(String trashNodePath,
org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
Restore node from trash
|
public static final String EXO_TOTAL
public static final String MIX_REFERENCEABLE
public static final String TAXONOMY_LINK
public static final String UUID
public static final String SYMLINK
public static final String EXO_WORKSPACE
public static final String EXO_TARGETWS
public static final String EXO_TARGETPATH
public TrashServiceImpl(org.exoplatform.services.jcr.RepositoryService repositoryService,
LinkManager linkManager,
TaxonomyService taxonomyService,
org.exoplatform.container.xml.InitParams initParams)
throws Exception
Exceptionpublic String moveToTrash(javax.jcr.Node node, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider) throws Exception
moveToTrash in interface TrashServicenode - Node will be moved to trashsessionProvider - User session provider which will be used to get sessionExceptionpublic String moveToTrash(javax.jcr.Node node, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, int deep) throws Exception
moveToTrash in interface TrashServiceExceptionpublic void restoreFromTrash(String trashNodePath, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider) throws Exception
restoreFromTrash in interface TrashServicetrashNodePath - The path.sessionProvider - The session provider.Exceptionpublic List<javax.jcr.Node> getAllNodeInTrash(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider) throws Exception
getAllNodeInTrash in interface TrashServiceExceptionpublic List<javax.jcr.Node> getAllNodeInTrashByUser(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, String userName) throws Exception
getAllNodeInTrashByUser in interface TrashServiceExceptionpublic void removeRelations(javax.jcr.Node node,
org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
throws Exception
TrashServiceremoveRelations in interface TrashServiceExceptionpublic boolean isInTrash(javax.jcr.Node node)
throws javax.jcr.RepositoryException
isInTrash in interface TrashServicenode - a specify nodetrue if node is in Trash, false otherwise.javax.jcr.RepositoryExceptionpublic javax.jcr.Node getTrashHomeNode()
getTrashHomeNode in interface TrashServiceNode the node of trash homepublic javax.jcr.Node getNodeByTrashId(String trashId) throws javax.jcr.RepositoryException
TrashServiceNode in trash folder by trashIdgetNodeByTrashId in interface TrashServicetrashId - ID of node will returnNode in trash folder with thrashId, null if thrashId doesn't exist in trash folderjavax.jcr.query.InvalidQueryExceptionjavax.jcr.RepositoryExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.