Return-Path: Delivered-To: apmail-incubator-jackrabbit-commits-archive@www.apache.org Received: (qmail 11834 invoked from network); 27 Apr 2005 14:39:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Apr 2005 14:39:03 -0000 Received: (qmail 58028 invoked by uid 500); 27 Apr 2005 14:39:56 -0000 Mailing-List: contact jackrabbit-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-commits@incubator.apache.org Received: (qmail 58014 invoked by uid 500); 27 Apr 2005 14:39:56 -0000 Delivered-To: apmail-incubator-jackrabbit-cvs@incubator.apache.org Received: (qmail 58008 invoked by uid 99); 27 Apr 2005 14:39:55 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 27 Apr 2005 07:39:54 -0700 Received: (qmail 11747 invoked by uid 65534); 27 Apr 2005 14:38:53 -0000 Message-ID: <20050427143853.11746.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: svn commit: r164985 - in /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: nodetype/virtual/VirtualNodeTypeStateProvider.java version/HistoryRootNodeState.java Date: Wed, 27 Apr 2005 14:38:53 -0000 To: jackrabbit-cvs@incubator.apache.org From: tripod@apache.org X-Mailer: svnmailer-1.0.0-dev X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: tripod Date: Wed Apr 27 07:38:52 2005 New Revision: 164985 URL: http://svn.apache.org/viewcvs?rev=3D164985&view=3Drev Log: - fixing nodedefid error for jcr:nodeTypes - removing compile-time flag for exposing version histories Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype= /virtual/VirtualNodeTypeStateProvider.java incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/= HistoryRootNodeState.java Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/no= detype/virtual/VirtualNodeTypeStateProvider.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/= apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java?r= ev=3D164985&r1=3D164984&r2=3D164985&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype= /virtual/VirtualNodeTypeStateProvider.java (original) +++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype= /virtual/VirtualNodeTypeStateProvider.java Wed Apr 27 07:38:52 2005 @@ -25,6 +25,7 @@ import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry; import org.apache.jackrabbit.core.nodetype.PropDef; import org.apache.jackrabbit.core.nodetype.ValueConstraint; +import org.apache.jackrabbit.core.nodetype.NodeDefId; import org.apache.jackrabbit.core.state.ItemStateException; import org.apache.jackrabbit.core.state.NoSuchItemStateException; import org.apache.jackrabbit.core.util.uuid.UUID; @@ -66,6 +67,8 @@ */ protected VirtualNodeState createRootNodeState() throws RepositoryExce= ption { VirtualNodeState root =3D new VirtualNodeState(this, parentId, roo= tNodeId.getUUID(), REP_NODETYPES, null); + NodeDefId id =3D ntReg.getEffectiveNodeType(REP_SYSTEM).getApplica= bleChildNodeDef(JCR_NODETYPES, REP_NODETYPES).getId(); + root.setDefinitionId(id); QName[] ntNames =3D ntReg.getRegisteredNodeTypes(); for (int i =3D 0; i < ntNames.length; i++) { NodeTypeDef ntDef =3D ntReg.getNodeTypeDef(ntNames[i]); Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ve= rsion/HistoryRootNodeState.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/= apache/jackrabbit/core/version/HistoryRootNodeState.java?rev=3D164985&r1=3D= 164984&r2=3D164985&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/= HistoryRootNodeState.java (original) +++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/= HistoryRootNodeState.java Wed Apr 27 07:38:52 2005 @@ -28,20 +28,11 @@ =20 /** * The history root node state represents the root node of all version his= tories. - * the version histories are dynamically exposed. since there could be ver= y many, - * it does not return all the child nodes by the {@link #getChildNodeEntri= es()}} - * method. this implies, that the version storage is not browsable, but the - * nodes are nevertheless correctly exposed (this behaviour can be changed= , by - * modifying the compile-time constant {@link #LIST_ALL_HISTORIES}. + * the version histories are dynamically exposed. */ public class HistoryRootNodeState extends VirtualNodeState { =20 /** - * flag for listing all histories - */ - private static final boolean LIST_ALL_HISTORIES =3D true; - - /** * the version manager */ private final VersionManager vm; @@ -99,19 +90,17 @@ * {@inheritDoc} */ public synchronized List getChildNodeEntries() { - if (LIST_ALL_HISTORIES) { - try { - ArrayList list =3D new ArrayList(vm.getNumVersionHistories= ()); - Iterator iter =3D vm.getVersionHistoryIds(); - while (iter.hasNext()) { - String id =3D (String) iter.next(); - QName name =3D new QName(NS_DEFAULT_URI, id); - list.add(createChildNodeEntry(name, id, 1)); - } - return list; - } catch (RepositoryException e) { - // ignore + try { + ArrayList list =3D new ArrayList(vm.getNumVersionHistories()); + Iterator iter =3D vm.getVersionHistoryIds(); + while (iter.hasNext()) { + String id =3D (String) iter.next(); + QName name =3D new QName(NS_DEFAULT_URI, id); + list.add(createChildNodeEntry(name, id, 1)); } + return list; + } catch (RepositoryException e) { + // ignore } return Collections.EMPTY_LIST; }