stefan 2004/07/07 09:05:07
Modified: proposals/jcrri/src/org/apache/slide/jcr/core/state
NodeState.java NoSuchItemStateException.java
PropertyState.java
Log:
jcrri
Revision Changes Path
1.5 +21 -2
jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/state/NodeState.java
Index: NodeState.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/state/NodeState.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NodeState.java 29 Jun 2004 17:11:48 -0000 1.4
+++ NodeState.java 7 Jul 2004 16:05:07 -0000 1.5
@@ -25,6 +25,7 @@
import org.apache.slide.jcr.core.NodeId;
import org.apache.slide.jcr.core.QName;
+import org.apache.slide.jcr.core.nodetype.NodeDefId;
import java.io.IOException;
import java.io.ObjectInputStream;
@@ -55,6 +56,7 @@
protected String uuid;
protected QName nodeTypeName;
+ protected NodeDefId defId;
// insertion-ordered collection of ChildNodeEntry objects
protected ChildNodeEntries childNodeEntries = new ChildNodeEntries();
@@ -70,6 +72,7 @@
NodeState(NodeState overlayedState, int initialStatus) {
super(overlayedState, initialStatus);
nodeTypeName = overlayedState.getNodeTypeName();
+ defId = overlayedState.getDefinitionId();
uuid = overlayedState.getUUID();
parentUUIDs.addAll(overlayedState.getParentUUIDs());
propertyEntries.addAll(overlayedState.getPropertyEntries());
@@ -111,6 +114,22 @@
*/
public QName getNodeTypeName() {
return nodeTypeName;
+ }
+
+ /**
+ * Returns the id of the definition applicable to this node state.
+ * @return the id of the definition
+ */
+ public NodeDefId getDefinitionId() {
+ return defId;
+ }
+
+ /**
+ * Sets the id of the definition applicable to this node state.
+ * @param defId the id of the definition
+ */
+ public void setDefinitionId(NodeDefId defId) {
+ this.defId = defId;
}
/**
1.4 +4 -4
jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/state/NoSuchItemStateException.java
Index: NoSuchItemStateException.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/state/NoSuchItemStateException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NoSuchItemStateException.java 22 Jun 2004 18:02:18 -0000 1.3
+++ NoSuchItemStateException.java 7 Jul 2004 16:05:07 -0000 1.4
@@ -23,7 +23,7 @@
*/
package org.apache.slide.jcr.core.state;
-import org.apache.slide.jcr.core.BaseException;
+
/**
* The <code>NoSuchItemStateException</code> ...
@@ -31,7 +31,7 @@
* @author Stefan Guggisberg
* @version $Revision$, $Date$
*/
-public class NoSuchItemStateException extends BaseException {
+public class NoSuchItemStateException extends ItemStateException {
/**
* Constructs a new instance of this class.
*/
1.4 +22 -2
jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/state/PropertyState.java
Index: PropertyState.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/state/PropertyState.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PropertyState.java 22 Jun 2004 18:02:33 -0000 1.3
+++ PropertyState.java 7 Jul 2004 16:05:07 -0000 1.4
@@ -27,6 +27,7 @@
import org.apache.slide.jcr.core.InternalValue;
import org.apache.slide.jcr.core.PropertyId;
import org.apache.slide.jcr.core.QName;
+import org.apache.slide.jcr.core.nodetype.PropDefId;
import org.apache.slide.jcr.util.Base64;
import javax.jcr.PropertyType;
@@ -47,6 +48,8 @@
protected InternalValue[] values;
protected int type;
+ protected PropDefId defId;
+
/**
* Package private constructor
*
@@ -57,6 +60,7 @@
super(overlayedState, initialStatus);
name = overlayedState.getName();
type = overlayedState.getType();
+ defId = overlayedState.getDefinitionId();
values = overlayedState.getValues();
}
@@ -112,6 +116,22 @@
*/
public int getType() {
return type;
+ }
+
+ /**
+ * Returns the id of the definition applicable to this property state.
+ * @return the id of the definition
+ */
+ public PropDefId getDefinitionId() {
+ return defId;
+ }
+
+ /**
+ * Sets the id of the definition applicable to this property state.
+ * @param defId the id of the definition
+ */
+ public void setDefinitionId(PropDefId defId) {
+ this.defId = defId;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]