Class NodeStateTracker
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.workspaces.repository.jcr.NodeStateTracker
-
- All Implemented Interfaces:
Initializable
,Component
,LogEnabled
public class NodeStateTracker extends AbstractLogEnabled implements Component, Initializable
Node state tracker.
-
-
Constructor Summary
Constructors Constructor Description NodeStateTracker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear(String workspaceName)
Clear the node set for a workspace.Set<String>
getNewNodes(String workspaceName)
Get the new nodes in a workspace.void
initialize()
void
nodeAdded(String workspaceName, String path)
A node was added.void
nodeRemoved(String workspaceName, String path)
A node was removed.-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
NodeStateTracker
public NodeStateTracker()
-
-
Method Detail
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
getNewNodes
public Set<String> getNewNodes(String workspaceName)
Get the new nodes in a workspace.- Parameters:
workspaceName
- the workspace name.- Returns:
- the newly created nodes.
-
nodeAdded
public void nodeAdded(String workspaceName, String path) throws RepositoryException
A node was added.- Parameters:
workspaceName
- the workspace name.path
- the added node path.- Throws:
RepositoryException
- if an error occurred
-
nodeRemoved
public void nodeRemoved(String workspaceName, String path) throws RepositoryException
A node was removed.- Parameters:
workspaceName
- the workspace name.path
- the removed node path.- Throws:
RepositoryException
- if an error occurred
-
-