jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r555265 - in /jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi: ChildInfo.java IdFactory.java QNodeTypeDefinition.java RepositoryService.java
Date Wed, 11 Jul 2007 13:19:48 GMT
Author: angela
Date: Wed Jul 11 06:19:45 2007
New Revision: 555265

URL: http://svn.apache.org/viewvc?view=rev&rev=555265
Log:
javadoc

Modified:
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
    jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java?view=diff&rev=555265&r1=555264&r2=555265
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java
Wed Jul 11 06:19:45 2007
@@ -24,20 +24,29 @@
 public interface ChildInfo {
 
     /**
+     * Returns the name of the child <code>Node</code>.
      *
-     * @return
+     * @return The name of the child <code>Node</code>.
      */
     public QName getName();
 
     /**
+     * Returns the uniqueID of the child <code>Node</code> or <code>null</code>
+     * if the Node is not identified by a uniqueID.
      *
-     * @return
+     * @return The uniqueID of the child <code>Node</code> or <code>null</code>.
+     * @see ItemId ItemId for a description of the uniqueID defined by the SPI
+     * item identifiers.
      */
     public String getUniqueID();
 
     /**
-     * 
-     * @return
+     * Returns the index of the child <code>Node</code>. Note, that the index
+     * is 1-based. In other words: the <code>Node</code> represented
+     * by this <code>ChildInfo</code> has same name siblings this method will
+     * always return the default value (1).
+     *
+     * @return Returns the index of the child <code>Node</code>.
      */
     public int getIndex();
 }

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java?view=diff&rev=555265&r1=555264&r2=555265
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java
Wed Jul 11 06:19:45 2007
@@ -20,38 +20,49 @@
 import org.apache.jackrabbit.name.Path;
 
 /**
- * <code>IdFactory</code>...
+ * <code>IdFactory</code> defines methods to construct new <code>ItemId</code>s.
  */
 public interface IdFactory {
 
     /**
+     * Creates a new <code>PropertyId</code> from the given parent id and
+     * qualified property name.
      *
      * @param parentId
      * @param propertyName
-     * @return
+     * @return a new <code>PropertyId</code>.
      */
     public PropertyId createPropertyId(NodeId parentId, QName propertyName);
 
     /**
+     * Creates a new <code>NodeId</code> from the given parent id and
+     * the given <code>Path</code> object.
      *
      * @param parentId
      * @param path
-     * @return
+     * @return a new <code>NodeId</code>.
      */
     public NodeId createNodeId(NodeId parentId, Path path);
 
     /**
+     * Creates a new <code>NodeId</code> from the given unique id (which identifies
+     * an ancestor <code>Node</code>) and the given <code>Path</code>
object.
      *
      * @param uniqueID
      * @param path
-     * @return
+     * @return a new <code>NodeId</code>.
+     * @see ItemId ItemId for a description of the uniqueID defined by the SPI
+     * item identifiers.
      */
     public NodeId createNodeId(String uniqueID, Path path);
 
     /**
-     * 
+     * Creates a new <code>NodeId</code> from the given unique id.
+     *
      * @param uniqueID
-     * @return
+     * @return a new <code>NodeId</code>.
+     * @see ItemId ItemId for a description of the uniqueID defined by the SPI
+     * item identifiers.
      */
     public NodeId createNodeId(String uniqueID);
 }

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java?view=diff&rev=555265&r1=555264&r2=555265
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
Wed Jul 11 06:19:45 2007
@@ -21,7 +21,11 @@
 import java.util.Collection;
 
 /**
- * <code>QNodeTypeDefinition</code>...
+ * <code>QNodeTypeDefinition</code> is the qualified SPI representation of
+ * a {@link NodeDefinition node definition}. It refers to qualified names only
+ * and is therefore independant of session-specific namespace mappings.
+ *
+ * @see javax.jcr.nodetype.NodeDefinition
  */
 public interface QNodeTypeDefinition {
 

Modified: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java?view=diff&rev=555265&r1=555264&r2=555265
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
Wed Jul 11 06:19:45 2007
@@ -39,6 +39,7 @@
 import javax.jcr.Node;
 import javax.jcr.LoginException;
 import javax.jcr.ReferentialIntegrityException;
+import javax.jcr.Item;
 import javax.jcr.query.InvalidQueryException;
 import java.util.Map;
 import java.util.Iterator;
@@ -52,19 +53,23 @@
     /**
      * Return the <code>IdFactory</code>.
      *
-     * @return
+     * @return The <code>IdFactory</code>.
      */
     public IdFactory getIdFactory();
 
     /**
      * Return the <code>QValueFactory</code> defined with this SPI implementation.
      *
-     * @return
+     * @return The <code>QValueFactory</code>.
      */
     public QValueFactory getQValueFactory();
 
     //--------------------------------------------------------------------------
     /**
+     * Returns all property descriptors that can be exposed with the
+     * {@link javax.jcr.Repository Repository} implementation built on top of
+     * this <code>RepositoryService</code>.
+     *
      * @return key-value pairs for repository descriptor keys and values.
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Repository#getDescriptorKeys()
@@ -132,7 +137,7 @@
     //--------------------------------------------------------------------------
     /**
      * @param sessionInfo
-     * @return an array of workspace ids
+     * @return An array of workspace ids.
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Workspace#getAccessibleWorkspaceNames()
      * @see javax.jcr.Workspace#getName()
@@ -161,42 +166,63 @@
      * to "/".
      *
      * @param sessionInfo
-     * @return
+     * @return The <code>NodeId</code> of the root <code>Node</code>.
      * @throws RepositoryException
      */
     public NodeId getRootId(SessionInfo sessionInfo) throws RepositoryException;
 
     /**
+     * Returns the <code>QNodeDefinition</code> for the <code>Node</code>
+     * identified by the given id. This method should only be used if the
+     * caller is not able to unambiguously determine the applicable definition
+     * from the parent node type definition or if no parent exists (i.e. for
+     * the root).
      *
      * @param sessionInfo
      * @param nodeId
-     * @return
+     * @return The node definition applicable to the <code>Node</code> identified
+     * by the given id.
      * @throws RepositoryException
      */
     public QNodeDefinition getNodeDefinition(SessionInfo sessionInfo, NodeId nodeId) throws
RepositoryException;
 
     /**
+     * Returns the <code>QPropertyDefinition</code> for the <code>Property</code>
+     * identified by the given id. This method should only be used if the
+     * caller is not able to unambiguously determine the applicable definition
+     * from the parent node type definition.
      *
      * @param sessionInfo
      * @param propertyId
-     * @return
+     * @return The property definition applicable for the <code>Property</code>
+     * identified by the given id.
      * @throws RepositoryException
      */
     public QPropertyDefinition getPropertyDefinition(SessionInfo sessionInfo, PropertyId
propertyId) throws RepositoryException;
 
     /**
+     * Returns <code>true</code> if an <code>Item</code> with the
given
+     * <code>ItemId</code> exists. Note, that the implementation must be able
to
+     * deal with the various formats of an <code>ItemId</code>. The caller might
+     * not be aware of the uniqueID part the ItemId may have.
+     *
      * @param sessionInfo
      * @param itemId
-     * @return true if the item with the given id exists
+     * @return true if the item with the given id exists.
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Session#itemExists(String)
      */
     public boolean exists(SessionInfo sessionInfo, ItemId itemId) throws RepositoryException;
 
     /**
+     * Retrieve the <code>NodeInfo</code> for the node identified by the given
+     * <code>NodeId</code>. See {@link #getItemInfos(SessionInfo, NodeId)} for
+     * a similar method that in addition may return <code>ItemInfo</code>s of
+     * children <code>Item</code>s.
+     *
      * @param sessionInfo
      * @param nodeId
-     * @return
+     * @return The <code>NodeInfo</code> for the node identified by the given
id.
      * @throws javax.jcr.ItemNotFoundException
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Session#getItem(String)
@@ -246,16 +272,21 @@
      *
      * @param sessionInfo
      * @param parentId
-     * @return
+     * @return An Iterator of <code>ChildInfo</code>s present on the
+     * Node represented by the given parentId.
      * @throws ItemNotFoundException
      * @throws RepositoryException
      */
     public Iterator getChildInfos(SessionInfo sessionInfo, NodeId parentId) throws ItemNotFoundException,
RepositoryException;
 
     /**
+     * Returns the <code>PropertyInfo</code> for the <code>Property</code>
+     * identified by the given id.
+     *
      * @param sessionInfo
      * @param propertyId
-     * @return
+     * @return The <code>PropertyInfo</code> for the <code>Property</code>
+     * identified by the given id.
      * @throws javax.jcr.ItemNotFoundException
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Session#getItem(String)
@@ -267,12 +298,18 @@
     /**
      * Indicates the start of a set of operations that cause modifications
      * on the underlying persistence layer. All modification called on the
-     * Batch must be executed at once or non must be executed.
+     * Batch must be executed at once or non must be executed upon calling
+     * {@link #submit(Batch)}.
      *
-     * @param itemId
+     * @param itemId Id of the Item that is a common ancestor of all
+     * <code>Item</code>s affected upon batch execution. This <code>Item</code>
+     * might itself be modified within the scope of the <code>Batch</code>.
      * @param sessionInfo
-     * @return
+     * @return A Batch indicating the start of a set of transient modifications
+     * that will be execute at once upon {@link #submit(Batch)}.
      * @throws RepositoryException
+     * @see Item#save()
+     * @see Session#save()
      */
     public Batch createBatch(ItemId itemId, SessionInfo sessionInfo) throws RepositoryException;
 
@@ -295,6 +332,10 @@
 
     //-------------------------------------------------------------< Import >---
     /**
+     * Imports the data present in the given <code>InputStream</code> into the
+     * persistent layer. Note, that the implemenation is responsible for
+     * validating the data presented and for the integrity of the repository
+     * upon completion.
      *
      * @param sessionInfo
      * @param parentId
@@ -385,7 +426,6 @@
     public void clone(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId,
NodeId destParentNodeId, QName destName, boolean removeExisting) throws NoSuchWorkspaceException,
ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException,
ItemExistsException, LockException, UnsupportedRepositoryOperationException, RepositoryException;
 
     //------------------------------------------------------------< Locking >---
-
     /**
      * Retrieve available lock information for the given <code>NodeId</code>.
      *
@@ -399,6 +439,8 @@
     public LockInfo getLockInfo(SessionInfo sessionInfo, NodeId nodeId) throws LockException,
RepositoryException;
 
     /**
+     * Create a lock on the <code>Node</code> identified by the given id.
+     * 
      * @param sessionInfo
      * @param nodeId
      * @param deep
@@ -426,7 +468,8 @@
     public void refreshLock(SessionInfo sessionInfo, NodeId nodeId) throws LockException,
RepositoryException;
 
     /**
-     * Releases the lock on the given node.<p/>
+     * Releases the lock on the <code>Node</code> identified by the given
+     * <code>NodeId</code>.<p/>
      * Please note, that on {@link javax.jcr.Session#logout() logout} all
      * session-scoped locks must be released by calling unlock.
      *
@@ -443,6 +486,9 @@
 
     //---------------------------------------------------------< Versioning >---
     /**
+     * Performs a checkin for the <code>Node</code> identified by the given
+     * <code>NodeId</code>.
+     *
      * @param sessionInfo
      * @param nodeId
      * @throws javax.jcr.version.VersionException
@@ -455,6 +501,9 @@
     public void checkin(SessionInfo sessionInfo, NodeId nodeId) throws VersionException,
UnsupportedRepositoryOperationException, InvalidItemStateException, LockException, RepositoryException;
 
     /**
+     * Performs a checkout for the <code>Node</code> identified by the given
+     * <code>NodeId</code>.
+     *
      * @param sessionInfo
      * @param nodeId
      * @throws javax.jcr.UnsupportedRepositoryOperationException
@@ -571,8 +620,12 @@
 
     //----------------------------------------------------------< Searching >---
     /**
+     * Returns a String array identifying all query languages supported by this
+     * SPI implementation.
+     *
      * @param sessionInfo
-     * @return
+     * @return String array identifying all query languages supported by this
+     * SPI implementation.
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.query.QueryManager#getSupportedQueryLanguages()
      */
@@ -608,7 +661,6 @@
     public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
Map namespaces) throws RepositoryException;
 
     //--------------------------------------------------------< Observation >---
-
     /**
      * Creates an event filter. If the repository supportes observation, the
      * filter created is based on the parameters available in {@link



Mime
View raw message