You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by an...@apache.org on 2006/11/09 09:58:02 UTC
svn commit: r472816 -
/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
Author: angela
Date: Thu Nov 9 00:58:02 2006
New Revision: 472816
URL: http://svn.apache.org/viewvc?view=rev&rev=472816
Log:
work in progress
- mk 'checkStatus' protected (usage within version, vh)
- isSame is defined to throw RepositoryException in case of error.
-> add 'checkStatus'
- itemstateListener: don't set state to 'null' when item is removed.
TODO: check if correct
Modified:
jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java?view=diff&rev=472816&r1=472815&r2=472816
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java Thu Nov 9 00:58:02 2006
@@ -174,7 +174,8 @@
/**
* @see javax.jcr.Item#isSame(Item)
*/
- public boolean isSame(Item otherItem) {
+ public boolean isSame(Item otherItem) throws RepositoryException {
+ checkStatus();
if (this == otherItem) {
return true;
}
@@ -243,6 +244,7 @@
checkStatus();
if (keepChanges) {
+ // TODO: TOBEFIXED. make sure item is updated to status present on the server.
return;
}
@@ -315,7 +317,6 @@
case Status.REMOVED:
case Status.STALE_DESTROYED:
state.removeListener(this);
- this.state = null;
notifyDestroyed();
break;
/**
@@ -396,7 +397,7 @@
*
* @throws RepositoryException if this item has been rendered invalid for some reason
*/
- void checkStatus() throws RepositoryException {
+ protected void checkStatus() throws RepositoryException {
// check session status
session.checkIsAlive();
// check status of this item for read operation