Author: pnedonosko
Date: 2010-02-10 12:21:58 -0500 (Wed, 10 Feb 2010)
New Revision: 1757
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
Log:
EXOJCR-305 NodeImpl cleanup
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2010-02-10
17:19:14 UTC (rev 1756)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2010-02-10
17:21:58 UTC (rev 1757)
@@ -1355,43 +1355,10 @@
{
checkValid();
- //TODO return isLocked((NodeData)this.getData());
return session.getLockManager().isLocked((NodeData)this.getData());
}
/**
- * Checks if a given node is locked only if the node is not new otherwise, we check
the first
- * ancestor that is not new
- * @param data the data of the node to check
- * @return <code>true</code> if the node is locked,
<code>false</code> otherwise
- * @throws RepositoryException if an error occurs
- */
- // TODO
- private boolean isLocked(NodeData data) throws RepositoryException
- {
- if (dataManager.isNew(data.getIdentifier()))
- {
- // The node is new, so we will check directly its parent instead
- NodeData parentData =
(NodeData)dataManager.getItemData(data.getParentIdentifier());
- if (parentData == null)
- {
- // The node is the root node and is new, so we consider it as unlocked
- return false;
- }
- else
- {
- // the node has a parent that we need to test
- return isLocked(parentData);
- }
- }
- else
- {
- // The node already exists so we need to check if it is locked
- return session.getLockManager().isLocked(data);
- }
- }
-
- /**
* {@inheritDoc}
*/
public boolean isNode()