From jackrabbit-commits-return-1433-apmail-incubator-jackrabbit-commits-archive=www.apache.org@incubator.apache.org Tue Oct 04 20:55:40 2005 Return-Path: Delivered-To: apmail-incubator-jackrabbit-commits-archive@www.apache.org Received: (qmail 70490 invoked from network); 4 Oct 2005 20:55:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Oct 2005 20:55:39 -0000 Received: (qmail 43880 invoked by uid 500); 4 Oct 2005 20:55:22 -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 43730 invoked by uid 500); 4 Oct 2005 20:55:21 -0000 Delivered-To: apmail-incubator-jackrabbit-cvs@incubator.apache.org Received: (qmail 43715 invoked by uid 99); 4 Oct 2005 20:55:20 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 04 Oct 2005 13:55:13 -0700 Received: (qmail 69660 invoked by uid 65534); 4 Oct 2005 20:54:53 -0000 Message-ID: <20051004205453.69659.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r294914 [6/6] - in /incubator/jackrabbit/trunk/contrib/jcr-commands: ./ applications/test/ applications/test/fs/ benchmarking/ src/cli/ src/java/ src/java/META-INF/ src/java/org/apache/jackrabbit/chain/ src/java/org/apache/jackrabbit/comman... Date: Tue, 04 Oct 2005 20:54:30 -0000 To: jackrabbit-cvs@incubator.apache.org From: edgarpoce@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Added: incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/CommandsTest.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/CommandsTest.java?rev=294914&view=auto ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/CommandsTest.java (added) +++ incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/CommandsTest.java Tue Oct 4 13:51:32 2005 @@ -0,0 +1,423 @@ +/* + * Copyright 2004-2005 The Apache Software Foundation or its licensors, + * as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.jackrabbit.command.cli; + +import java.util.Arrays; +import java.util.Iterator; + +import javax.jcr.Credentials; +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.Session; +import javax.jcr.SimpleCredentials; +import javax.jcr.version.Version; + +import junit.framework.TestCase; + +import org.apache.commons.chain.Catalog; +import org.apache.commons.chain.Command; +import org.apache.commons.chain.Context; +import org.apache.commons.chain.config.ConfigParser; +import org.apache.commons.chain.impl.CatalogFactoryBase; +import org.apache.commons.chain.impl.ContextBase; +import org.apache.commons.collections.IteratorUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.jackrabbit.command.CommandHelper; + +/** + * Commands Test superclass + */ +public class CommandsTest extends TestCase +{ + /** config */ + protected static String CONFIG = "applications/test/repository.xml"; + + /** home */ + protected static String HOME = "applications/test/repository"; + + Log log = LogFactory.getLog(CommandsTest.class); + + static + { + try + { + ConfigParser parser = new ConfigParser(); + parser.parse(JcrClient.class.getResource("command.xml")); + } catch (Exception e) + { + e.printStackTrace(); + } + } + + /** Context */ + protected Context ctx = new ContextBase(); + + /** catalog */ + protected Catalog catalog = CatalogFactoryBase.getInstance().getCatalog(); + + protected void setUp() throws Exception + { + super.setUp(); + + // Start + ctx.put("config", CONFIG); + ctx.put("home", HOME); + catalog.getCommand("startJackrabbitSingleton").execute(ctx); + assertTrue(CommandHelper.getRepository(ctx) != null); + + // Login + ctx.put("user", "u"); + ctx.put("password", "p"); + catalog.getCommand("login").execute(ctx); + assertTrue(CommandHelper.getSession(ctx) != null); + + // clear workspace + catalog.getCommand("clearWorkspace").execute(ctx); + + // add test node + ctx.put("relPath", "test"); + catalog.getCommand("addNode").execute(ctx); + ctx.remove("relPaht"); + + CommandHelper.getSession(ctx).save(); + } + + protected Session createNewSession() throws Exception + { + Credentials c = new SimpleCredentials("ed", "ed".toCharArray()); + return CommandHelper.getRepository(ctx).login(c); + } + + protected void tearDown() throws Exception + { + super.tearDown(); + // clear workspace + catalog.getCommand("clearWorkspace").execute(ctx); + // save + CommandHelper.getSession(ctx).save(); + + // Logout + catalog.getCommand("logout").execute(ctx); + + ctx.clear(); + + } + + protected Node getRoot() throws Exception + { + return CommandHelper.getNode(ctx, "/"); + } + + protected Node getTestNode() throws Exception + { + return CommandHelper.getNode(ctx, "/test"); + } + + public void testOrderBefore() throws Exception + { + CommandHelper.setCurrentNode(ctx, getTestNode()); + Node node1 = getTestNode().addNode("child"); + Node node2 = getTestNode().addNode("child"); + node1.setProperty("pos", 1); + node2.setProperty("pos", 2); + NodeIterator iter = getTestNode().getNodes("child"); + assertTrue(iter.nextNode().isSame(node1)); + assertTrue(iter.nextNode().isSame(node2)); + ctx.put("srcChild", "child[2]"); + ctx.put("destChild", "child[1]"); + catalog.getCommand("orderBefore").execute(ctx); + iter = getTestNode().getNodes("child"); + assertTrue(iter.nextNode().isSame(node2)); + assertTrue(iter.nextNode().isSame(node1)); + } + + public void testMove() throws Exception + { + ctx.put("srcAbsPath", getTestNode().getPath()); + ctx.put("destAbsPath", "/test2"); + catalog.getCommand("move").execute(ctx); + assertTrue(CommandHelper.hasNode(ctx, "/test2")); + } + + public void testReadValue() throws Exception + { + getTestNode().setProperty("prop", "val"); + ctx.put("srcPath", getTestNode().getProperty("prop").getPath()); + ctx.put("dest", "myKey"); + catalog.getCommand("readValue").execute(ctx); + assertTrue(ctx.get("myKey").equals("val")); + } + + public void testCurrentNode() throws Exception + { + ctx.put("path", getTestNode().getPath()); + assertTrue(CommandHelper.getCurrentNode(ctx).getPath().equals("/")); + catalog.getCommand("currentNode").execute(ctx); + assertTrue(CommandHelper.getCurrentNode(ctx).getPath().equals( + getTestNode().getPath())); + } + + public void testCopy() throws Exception + { + ctx.put("srcAbsPath", getTestNode().getPath()); + ctx.put("destAbsPath", "/copy"); + assertFalse(CommandHelper.hasNode(ctx, "/copy")); + catalog.getCommand("copy").execute(ctx); + assertTrue(CommandHelper.hasNode(ctx, "/copy")); + } + + public void testCollect() throws Exception + { + Command items = catalog.getCommand("collectItems"); + + ctx.put("srcPath", "/"); + ctx.put("depth", "1"); + ctx.put("namePattern", "*"); + + assertTrue(ctx.get("collected") == null); + items.execute(ctx); + assertTrue(IteratorUtils.toList((Iterator) ctx.get("collected")).size() == 3); + + ctx.put("scrPath", null); + items.execute(ctx); + assertTrue(IteratorUtils.toList((Iterator) ctx.get("collected")).size() == 3); + + ctx.put("depth", "2"); + items.execute(ctx); + assertTrue(IteratorUtils.toList((Iterator) ctx.get("collected")).size() == 7); + + ctx.put("namePattern", null); + items.execute(ctx); + assertTrue(IteratorUtils.toList((Iterator) ctx.get("collected")).size() == 7); + + ctx.put("namePattern", "jcr:primaryType"); + items.execute(ctx); + assertTrue(IteratorUtils.toList((Iterator) ctx.get("collected")).size() == 3); + + } + + public void testRefresh() throws Exception + { + Node n = getTestNode(); + assertFalse(n.hasNode("newNode")); + Session s = createNewSession(); + s.getRootNode().getNode(getTestNode().getName()).addNode("newNode"); + s.save(); + s.logout(); + ctx.put("keepChanges", Boolean.TRUE.toString()); + catalog.getCommand("refresh").execute(ctx); + assertTrue(n.hasNode("newNode")); + } + + public void testRemoveItem() throws Exception + { + Node n = getTestNode(); + n.addNode("newNode"); + assertTrue(n.hasNode("newNode")); + ctx.put("path", getTestNode().getPath() + "/newNode"); + catalog.getCommand("removeItem").execute(ctx); + assertFalse(n.hasNode("newNode")); + } + + public void testRemoveItems() throws Exception + { + Node n = getTestNode(); + n.addNode("newNode1"); + n.addNode("newNode2"); + assertTrue(n.getNodes().getSize() == 2); + ctx.put("path", getTestNode().getPath()); + ctx.put("pattern", "new*"); + catalog.getCommand("removeItems").execute(ctx); + assertTrue(n.getNodes().getSize() == 0); + } + + public void testRename() throws Exception + { + Node n = getTestNode(); + CommandHelper.setCurrentNode(ctx, n); + n.addNode("name1"); + ctx.put("srcPath", "name1"); + ctx.put("destPath", "name2"); + catalog.getCommand("rename").execute(ctx); + assertTrue(n.hasNode("name2")); + } + + public void testSaveNode() throws Exception + { + Node n = getTestNode(); + CommandHelper.setCurrentNode(ctx, n); + n.addNode("newNode"); + ctx.put("path", n.getPath()); + catalog.getCommand("save").execute(ctx); + CommandHelper.getSession(ctx).refresh(false); + assertTrue(n.hasNode("newNode")); + } + + public void testSetMultiValueProperty() throws Exception + { + Node n = getTestNode(); + CommandHelper.setCurrentNode(ctx, n); + ctx.put("name", "myprop"); + ctx.put("value", "1,2"); + ctx.put("regExp", ","); + catalog.getCommand("setMultiValueProperty").execute(ctx); + assertTrue(n.hasProperty("myprop")); + assertTrue(n.getProperty("myprop").getValues()[0].getString().equals( + "1")); + assertTrue(n.getProperty("myprop").getValues()[1].getString().equals( + "2")); + } + + public void testSetProperty() throws Exception + { + Node n = getTestNode(); + CommandHelper.setCurrentNode(ctx, n); + ctx.put("name", "myprop"); + ctx.put("value", "myvalue"); + catalog.getCommand("setProperty").execute(ctx); + assertTrue(n.hasProperty("myprop")); + assertTrue(n.getProperty("myprop").getValue().getString().equals( + "myvalue")); + } + + public void testAddMixin() throws Exception + { + ctx.put("mixin", "mix:referenceable"); + ctx.put("path", getTestNode().getPath()); + catalog.getCommand("addMixin").execute(ctx); + assertTrue(getTestNode().isNodeType("mix:referenceable")); + } + + public void testRemoveMixin() throws Exception + { + getTestNode().addMixin("mix:referenceable"); + ctx.put("mixin", "mix:referenceable"); + ctx.put("path", getTestNode().getPath()); + catalog.getCommand("removeMixin").execute(ctx); + assertFalse(getTestNode().isNodeType("mix:referenceable")); + } + + public void testNamespace() throws Exception + { + // ctx.put("prefix", "mycomp"); + // ctx.put("uri", "http://mycomp"); + // catalog.getCommand("registerNamespace").execute(ctx); + // assertTrue(getTestNode().getSession().getWorkspace() + // .getNamespaceRegistry().getURI("mycomp") + // .equals("http://mycomp")); + } + + public void testCheckin() throws Exception + { + Node n = getTestNode(); + n.addMixin("mix:versionable"); + n.setProperty("prop", "value"); + n.getSession().save(); + ctx.put("path", n.getPath()); + catalog.getCommand("checkin").execute(ctx); + // root version + checked in + assertFalse(n.isCheckedOut()); + } + + public void testCheckout() throws Exception + { + Node n = getTestNode(); + n.addMixin("mix:versionable"); + n.getSession().save(); + n.checkin(); + ctx.put("path", n.getPath()); + catalog.getCommand("checkout").execute(ctx); + assertTrue(n.isCheckedOut()); + } + + public void testRemoveVersion() throws Exception + { + // Node n = getTestNode(); + // n.addMixin("mix:versionable"); + // n.getSession().save(); + // n.checkin(); + // ctx.put("path", n.getPath()); + // ctx.put("name", "1.0"); + // catalog.getCommand("removeVersion").execute(ctx); + // assertTrue(n.getVersionHistory().getAllVersions().getSize() == 1); + } + + public void testAddVersionLabel() throws Exception + { + Node n = getTestNode(); + n.addMixin("mix:versionable"); + n.getSession().save(); + n.checkin(); + ctx.put("path", n.getPath()); + ctx.put("version", "1.0"); + ctx.put("label", "myversion"); + ctx.put("moveLabel", Boolean.TRUE.toString()); + catalog.getCommand("addVersionLabel").execute(ctx); + assertTrue(Arrays.asList(n.getVersionHistory().getVersionLabels()) + .contains("myversion")); + } + + public void testRemoveVersionLabel() throws Exception + { + Node n = getTestNode(); + n.addMixin("mix:versionable"); + n.getSession().save(); + Version v = n.checkin(); + n.getVersionHistory().addVersionLabel(v.getName(), "myversion", true); + ctx.put("path", n.getPath()); + ctx.put("label", "myversion"); + catalog.getCommand("removeVersionLabel").execute(ctx); + assertTrue(n.getVersionHistory().getVersionLabels().length == 0); + } + + public void testRestore() throws Exception + { + Node n = getTestNode(); + n.addMixin("mix:versionable"); + n.getSession().save(); + Version v = n.checkin(); + n.checkout(); + n.setProperty("newprop", "newval"); + n.save(); + ctx.put("path", n.getPath()); + ctx.put("version", v.getName()); + ctx.put("removeExisting", Boolean.TRUE.toString()); + catalog.getCommand("restore").execute(ctx); + assertFalse(n.hasProperty("newprop")); + } + + public void testRestoreByLabel() throws Exception + { + Node n = getTestNode(); + n.addMixin("mix:versionable"); + n.getSession().save(); + Version v = n.checkin(); + n.getVersionHistory().addVersionLabel(v.getName(), "myversion", true); + n.checkout(); + n.setProperty("newprop", "newval"); + n.save(); + ctx.put("path", n.getPath()); + ctx.put("label", "myversion"); + ctx.put("removeExisting", Boolean.TRUE.toString()); + catalog.getCommand("restoreByLabel").execute(ctx); + assertFalse(n.hasProperty("newprop")); + } + + // TODO: add ext, fs, lock, query, versioning(only Merge), export test cases + +} Propchange: incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/CommandsTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/I18nTest.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/I18nTest.java?rev=294914&view=auto ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/I18nTest.java (added) +++ incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/I18nTest.java Tue Oct 4 13:51:32 2005 @@ -0,0 +1,83 @@ +/* + * Copyright 2004-2005 The Apache Software Foundation or its licensors, + * as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.jackrabbit.command.cli; + +import java.util.Iterator; +import java.util.MissingResourceException; + +import org.apache.jackrabbit.command.CommandException; + +import junit.framework.TestCase; + +/** + * I18n tests + */ +public class I18nTest extends TestCase +{ + + public void testCommandLabels() throws CommandException + { + Iterator iter = CommandLineFactory.getInstance().getCommandLines() + .iterator(); + while (iter.hasNext()) + { + CommandLine cl = (CommandLine) iter.next(); + + Iterator params = cl.getAllParameters(); + while (params.hasNext()) + { + AbstractParameter param = (AbstractParameter) params.next(); + try + { + param.getLocalizedArgName(); + } catch (MissingResourceException e) + { + fail("no arg name for command " + cl.getName() + ". " + + param.getName() + ". " + e.getMessage()); + } + try + { + param.getLocalizedDescription(); + } catch (MissingResourceException e) + { + fail("no description for argument " + param.getName() + + " in command " + cl.getName() + "." + + e.getMessage()); + } + } + } + } + + public void testCommandNames() throws CommandException + { + Iterator iter = CommandLineFactory.getInstance().getCommandLines() + .iterator(); + while (iter.hasNext()) + { + CommandLine cl = (CommandLine) iter.next(); + try + { + cl.getLocalizedDescription(); + } catch (MissingResourceException e) + { + fail("no description for command " + cl.getName() + ". " + + e.getMessage()); + } + } + } + +} Propchange: incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/I18nTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/JcrRmiServer.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/JcrRmiServer.java?rev=294914&view=auto ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/JcrRmiServer.java (added) +++ incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/JcrRmiServer.java Tue Oct 4 13:51:32 2005 @@ -0,0 +1,57 @@ +/* + * Copyright 2004-2005 The Apache Software Foundation or its licensors, + * as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.jackrabbit.command.cli; + +import java.net.MalformedURLException; +import java.rmi.AlreadyBoundException; +import java.rmi.Naming; +import java.rmi.RemoteException; + +import javax.jcr.Repository; +import javax.jcr.RepositoryException; + +import org.apache.jackrabbit.core.RepositoryImpl; +import org.apache.jackrabbit.core.config.RepositoryConfig; +import org.apache.jackrabbit.rmi.remote.RemoteRepository; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.ServerAdapterFactory; + +/** + * 16/08/2005 + */ +public class JcrRmiServer +{ + /** config */ + private static String CONFIG = "applications/test/repository.xml"; + + /** home */ + private static String HOME = "applications/test/repository"; + + /** rmi url */ + private static String URL = "jcr/repository"; + + public static void main(String[] args) throws RepositoryException, MalformedURLException, RemoteException, AlreadyBoundException + { + RepositoryConfig conf = RepositoryConfig.create(CONFIG, HOME); + Repository repo = RepositoryImpl.create(conf); + + RemoteAdapterFactory factory = new ServerAdapterFactory(); + RemoteRepository remote = factory.getRemoteRepository(repo); + Naming.bind(URL, remote); + + } +} Propchange: incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/JcrRmiServer.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/TestAll.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/TestAll.java?rev=294914&view=auto ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/TestAll.java (added) +++ incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/TestAll.java Tue Oct 4 13:51:32 2005 @@ -0,0 +1,37 @@ +/* + * Copyright 2004-2005 The Apache Software Foundation or its licensors, + * as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.jackrabbit.command.cli; + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class TestAll +{ + + public static Test suite() + { + TestSuite suite = new TestSuite( + "Test for org.apache.jackrabbit.command.cli"); + //$JUnit-BEGIN$ + suite.addTestSuite(I18nTest.class); + suite.addTestSuite(CommandsTest.class); + suite.addTestSuite(CliTest.class); + //$JUnit-END$ + return suite; + } + +} Propchange: incubator/jackrabbit/trunk/contrib/jcr-commands/src/test/org/apache/jackrabbit/command/cli/TestAll.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/benchmarking.jmx URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/benchmarking.jmx?rev=294914&view=auto ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/benchmarking.jmx (added) +++ incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/benchmarking.jmx Tue Oct 4 13:51:32 2005 @@ -0,0 +1,698 @@ + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + User Defined Variables + true + + org.apache.jmeter.control.gui.TestPlanGui + false + org.apache.jmeter.testelement.TestPlan + Jackrabbit test plan + false + true + + + + + 1120257177000 + org.apache.jmeter.threads.ThreadGroup + + + true + 1 + false + org.apache.jmeter.threads.gui.ThreadGroupGui + + org.apache.jmeter.control.gui.LoopControlPanel + -1 + org.apache.jmeter.control.LoopController + Loop Controller + true + false + + User writting + 1120257177000 + stoptest + 1 + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + /temp/repository/repository.xml + config + + + = + /temp/repository + home + + + + true + + org.apache.jackrabbit.chain.command.StartOrGetJackrabbitSingleton + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + startup + true + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + + workspaceKey + + + = + pwd + password + + + = + usr + user + + + = + + passwordKey + + + = + + workspace + + + = + + userKey + + + + true + + org.apache.jackrabbit.chain.command.Login + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + login + true + + + + org.apache.jmeter.control.gui.OnceOnlyControllerGui + org.apache.jmeter.control.OnceOnlyController + Once Only Controller + true + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + true + + org.apache.jackrabbit.chain.command.ClearWorkspace + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + clear workspace + true + + + + + ${__jexl(vars.getObject("jcr.current").hasNode("test")==false)} + org.apache.jmeter.control.gui.IfControllerPanel + org.apache.jmeter.control.IfController + If !hasNode() + true + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + + nodeTypeKey + + + = + + nodeNameKey + + + = + test + nodeName + + + = + + nodeType + + + + true + + org.apache.jackrabbit.chain.command.AddNode + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + Add test node + true + + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + + pathKey + + + = + /test + path + + + + true + + org.apache.jackrabbit.chain.command.CurrentNode + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + cd test + true + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + my property value + value + + + = + + propertyTypeKey + + + = + myprop + propertyName + + + = + String + propertyType + + + = + + propertyNameKey + + + = + + valueKey + + + + true + + org.apache.jackrabbit.chain.command.SetProperty + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + add property + true + + + + org.apache.jmeter.control.gui.LogicControllerGui + org.apache.jmeter.control.GenericController + Add 10 nodes + true + + + + 0 + org.apache.jmeter.modifiers.gui.CounterConfigGui + 1 + counter + org.apache.jmeter.modifiers.CounterConfig + counter + true + + true + + + + org.apache.jmeter.control.gui.LoopControlPanel + 10 + org.apache.jmeter.control.LoopController + do 10 times + true + true + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + + nodeTypeKey + + + = + + nodeNameKey + + + = + testnode${counter} + nodeName + + + = + + nodeType + + + + true + + org.apache.jackrabbit.chain.command.AddNode + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + add node + true + + + + + + org.apache.jmeter.timers.gui.ConstantTimerGui + org.apache.jmeter.timers.ConstantTimer + pause + true + 200 + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + true + + org.apache.jackrabbit.chain.command.SaveSession + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + save + true + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + true + + org.apache.jackrabbit.chain.command.Logout + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + logout + true + + + + org.apache.jmeter.visualizers.StatVisualizer + org.apache.jmeter.reporters.ResultCollector + Aggregate Report + + + + true + true + true + + true + true + true + true + false + true + true + false + false + true + false + false + false + false + false + 0 + , + true + + saveConfig + + true + + false + + + + + 1120257177000 + org.apache.jmeter.threads.ThreadGroup + + + true + 2 + false + org.apache.jmeter.threads.gui.ThreadGroupGui + + org.apache.jmeter.control.gui.LoopControlPanel + -1 + org.apache.jmeter.control.LoopController + Loop Controller + true + false + + 2 Users reading + 1120257177000 + continue + 2 + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + /temp/repository/repository.xml + config + + + = + /temp/repository + home + + + + true + + org.apache.jackrabbit.chain.command.StartOrGetJackrabbitSingleton + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + startup + true + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + + workspaceKey + + + = + user1 + password + + + = + psw1 + user + + + = + + passwordKey + + + = + + workspace + + + = + + userKey + + + + true + + org.apache.jackrabbit.chain.command.Login + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + login + true + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + + pathKey + + + = + /test + path + + + + true + + org.apache.jackrabbit.chain.command.CurrentNode + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + cd test + true + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + + depthKey + + + = + + namePatternKey + + + = + * + namePattern + + + = + 1 + depth + + + = + children + toKey + + + + true + + org.apache.jackrabbit.chain.command.CollectNodes + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + collect nodes + true + + + + org.apache.jmeter.control.gui.WhileControllerGui + org.apache.jmeter.control.WhileController + While has next child + true + ${__jexl(vars.getObject("children").hasNext())} + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + + pathKey + + + = + ${__jexl(vars.getObject("children").next().getPath())} + path + + + + true + + org.apache.jackrabbit.chain.command.CurrentNode + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + cd next child + true + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + = + + index + + + = + + pathKey + + + = + jcr:primaryType + path + + + = + + indexKey + + + = + nodetype + toKey + + + + true + + org.apache.jackrabbit.chain.command.ReadValue + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + read primary type + true + + + + + org.apache.jmeter.timers.gui.ConstantTimerGui + org.apache.jmeter.timers.ConstantTimer + pause + true + 500 + + + + + org.apache.jmeter.config.gui.ArgumentsPanel + org.apache.jmeter.config.Arguments + + + true + + org.apache.jackrabbit.chain.command.Logout + org.apache.jmeter.protocol.java.control.gui.ChainTestSamplerGui + org.apache.jmeter.protocol.java.sampler.ChainSampler + logout + true + + + + org.apache.jmeter.visualizers.StatVisualizer + org.apache.jmeter.reporters.ResultCollector + Aggregate Report + + + + true + true + true + + true + true + true + true + false + true + true + false + false + true + false + false + false + false + false + 0 + , + true + + saveConfig + + true + + false + + + + + + Added: incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/devguide.xml URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/devguide.xml?rev=294914&view=auto ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/devguide.xml (added) +++ incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/devguide.xml Tue Oct 4 13:51:32 2005 @@ -0,0 +1,36 @@ + + + + + Developer guide + + +
+

TODO

+
+
+

TODO

+
+
+

TODO

+
+
+

TODO

+
+ +
\ No newline at end of file Propchange: incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/devguide.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/index.xml URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/index.xml?rev=294914&view=auto ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/index.xml (added) +++ incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/index.xml Tue Oct 4 13:51:32 2005 @@ -0,0 +1,39 @@ + + + + + Overview + + +
+

JCR-commands contains a jcr command line client. It's backed by a set of + Apache Commons Chain commands that perform operations on any JCR compliant + repository. Moreover it includes a few commands jackrabbit specific to + cover some use cases that were not included in the specification. +
For more information about using Commons Chain please refer to + http://jakarta.apache.org/commons/chain/

+
+
+

Perform any jcr operation either in interactive or batch mode.

+

Reuse the commands in applications through the Jakarta Commons Chains + library

+

Benchmarck any jcr compliant repository with jmeter by using + jmeter-command plugin.

+
+ +
Propchange: incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/index.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/navigation.xml URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/navigation.xml?rev=294914&view=auto ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/navigation.xml (added) +++ incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/navigation.xml Tue Oct 4 13:51:32 2005 @@ -0,0 +1,27 @@ + + + + Jackrabbit - jcr-commands + + + + + + + + \ No newline at end of file Propchange: incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/navigation.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/userguide.xml URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/userguide.xml?rev=294914&view=auto ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/userguide.xml (added) +++ incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/userguide.xml Tue Oct 4 13:51:32 2005 @@ -0,0 +1,33 @@ + + + + + User guide + + +
+

+
+
+

+
+
+

+
+ +
\ No newline at end of file Propchange: incubator/jackrabbit/trunk/contrib/jcr-commands/xdocs/userguide.xml ------------------------------------------------------------------------------ svn:eol-style = native