Author: rhauch
Date: 2008-10-23 14:48:23 -0400 (Thu, 23 Oct 2008)
New Revision: 573
Removed:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsAsUpdate.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsOnPath.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsOnProperties.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CompositeCommand.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CopyBranchCommand.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CopyNodeCommand.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CreateNodeCommand.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/DeleteBranchCommand.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetChildrenCommand.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetNodeCommand.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetPropertiesCommand.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GraphCommand.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/MoveBranchCommand.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/NodeConflictBehavior.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/RecordBranchCommand.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/SetPropertiesCommand.java
Log:
DNA-213 - Review the graph SPI commands to add missing commands and better handle node
identification (e.g., when getting children)
http://jira.jboss.com/jira/browse/DNA-213
Removed the old GraphCommand classes.
Deleted: trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsAsUpdate.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsAsUpdate.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsAsUpdate.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-/**
- * Marker interface that signals that a command may update or modify information in a
repository.
- * @author Randall Hauch
- */
-public interface ActsAsUpdate {
-
-}
Deleted: trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsOnPath.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsOnPath.java 2008-10-23
18:46:32 UTC (rev 572)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsOnPath.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-import org.jboss.dna.graph.properties.Path;
-import org.jboss.dna.graph.properties.PathNotFoundException;
-
-/**
- * Aspect interface for any repository command that acts upon a specific path. This
aspect adds a method that can be used by the
- * recipient to obtain the path that the command applies to.
- *
- * @author Randall Hauch
- */
-public interface ActsOnPath {
-
- /**
- * Get the path to which this command applies. If the path does not exist, an {@link
PathNotFoundException} exception should
- * be recorded as an {@link GraphCommand#setError(Throwable) error}.
- *
- * @return the path; never null
- */
- Path getPath();
-}
Deleted: trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsOnProperties.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsOnProperties.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/ActsOnProperties.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-import java.util.Collection;
-import org.jboss.dna.graph.cache.Cacheable;
-import org.jboss.dna.graph.properties.Property;
-
-/**
- * Aspect interface for any repository command that acts upon or updates properties on a
given node. This aspect also allows for
- * the recipient to {@link
Cacheable#setCachePolicy(org.jboss.dna.graph.cache.CachePolicy) update the cache policy}
for the
- * updated information.
- *
- * @author Randall Hauch
- */
-public interface ActsOnProperties extends ActsOnPath {
-
- /**
- * Get the properties. Any property with no values will be removed.
- *
- * @return the properties
- */
- Collection<Property> getProperties();
-
-}
Deleted: trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CompositeCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CompositeCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CompositeCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-/**
- * A command that is a composition of other commands.
- *
- * @author Randall Hauch
- */
-public interface CompositeCommand extends GraphCommand, Iterable<GraphCommand> {
-}
Deleted:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CopyBranchCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CopyBranchCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CopyBranchCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-/**
- * Command that copies a branch from one path to another. In other words, this is a deep
version of {@link CopyNodeCommand}.
- *
- * @author Randall Hauch
- */
-public interface CopyBranchCommand extends CopyNodeCommand {
-
-}
Deleted: trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CopyNodeCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CopyNodeCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CopyNodeCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-import org.jboss.dna.graph.properties.Path;
-
-/**
- * Command that makes a copy of a single node at another location.
- *
- * @author Randall Hauch
- */
-public interface CopyNodeCommand extends GraphCommand, ActsOnPath, ActsAsUpdate {
-
- /**
- * Get the new path to which the copy is to be made.
- *
- * @return the new path; never null
- */
- Path getNewPath();
-}
Deleted:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CreateNodeCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CreateNodeCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/CreateNodeCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-import java.util.Collection;
-import java.util.Iterator;
-import org.jboss.dna.graph.properties.Property;
-
-/**
- * A command to get the children of a single node given its path.
- *
- * @author Randall Hauch
- */
-public interface CreateNodeCommand
- extends GraphCommand, ActsOnPath, ActsOnProperties, ActsAsUpdate,
Comparable<CreateNodeCommand> {
-
- /**
- * Get the properties for this new node. The recipient of the command should {@link
Iterator#remove() remove} any property
- * that will not be stored.
- *
- * @return the property iterator; never null, but possibly empty
- */
- Collection<Property> getProperties();
-
- /**
- * Get the desired behavior when a node at the target {@link ActsOnPath#getPath()
path} already exists.
- *
- * @return the desired behavior; never null
- */
- NodeConflictBehavior getConflictBehavior();
-}
Deleted:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/DeleteBranchCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/DeleteBranchCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/DeleteBranchCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-/**
- * Command that deletes a branch given by a specified path.
- * @author Randall Hauch
- */
-public interface DeleteBranchCommand extends GraphCommand, ActsOnPath, ActsAsUpdate {
-}
Deleted:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetChildrenCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetChildrenCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetChildrenCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-import org.jboss.dna.graph.cache.Cacheable;
-import org.jboss.dna.graph.properties.Path;
-import org.jboss.dna.graph.properties.Property;
-
-/**
- * A command to get the children of a single node given its path.
- *
- * @author Randall Hauch
- */
-public interface GetChildrenCommand extends GraphCommand, ActsOnPath, Cacheable {
-
- /**
- * Add the child to this node. This method does not affect existing children, so
callers of this method should not add a child
- * with the same segment as an existing child (this is not checked by this method).
- *
- * @param nameOfChild the name of the child; should not be the same as an existing
child (not checked)
- * @param identityProperties the property/properties that are considered identity
properties (other than the name) for the
- * child
- */
- void addChild( Path.Segment nameOfChild,
- Property... identityProperties );
-
- /**
- * Set that this node has no children. Any existing child references already set on
this command will be removed.
- */
- void setNoChildren();
-}
Deleted: trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetNodeCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetNodeCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetNodeCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-/**
- * A command to get the properties and children for a single node given its path.
- * @author Randall Hauch
- */
-public interface GetNodeCommand extends GetChildrenCommand, GetPropertiesCommand {
-
-}
Deleted:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetPropertiesCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetPropertiesCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GetPropertiesCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-import org.jboss.dna.graph.cache.Cacheable;
-import org.jboss.dna.graph.properties.Property;
-
-/**
- * A command to obtain from the source the properties for a single node given its path.
- *
- * @author Randall Hauch
- */
-public interface GetPropertiesCommand extends GraphCommand, ActsOnPath, Cacheable {
-
- /**
- * Set the values for the named property. Any existing property values, if previously
set, will be overwritten. If there are
- * no property vlaues or if all of the property values are null, the property will be
removed.
- *
- * @param property the property
- */
- void setProperty( Property property );
-
-}
Deleted: trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GraphCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GraphCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/GraphCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-/**
- * The base interface for all repository commands
- *
- * @author Randall Hauch
- */
-public interface GraphCommand {
-
- /**
- * Return whether this command has been cancelled.
- *
- * @return true if this command has been cancelled, or false otherwise.
- */
- boolean isCancelled();
-
- /**
- * Set the error for this command.
- *
- * @param error the exception
- * @see #getError()
- * @see #hasError()
- * @see #hasNoError()
- */
- void setError( Throwable error );
-
- /**
- * Get the error for this command.
- *
- * @return the error, or null if there is no error
- * @see #setError(Throwable)
- * @see #hasError()
- * @see #hasNoError()
- */
- Throwable getError();
-
- /**
- * Return true if this command has an {@link #getError() error}.
- *
- * @return true if the command has an error, or false otherwise
- * @see #getError()
- * @see #setError(Throwable)
- * @see #hasNoError()
- */
- boolean hasError();
-
- /**
- * Convenience method that is equivalent to <code>!hasError()</code>.
- *
- * @return true if the command has no error, or false otherwise
- * @see #getError()
- * @see #setError(Throwable)
- * @see #hasError()
- */
- boolean hasNoError();
-
-}
Deleted:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/MoveBranchCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/MoveBranchCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/MoveBranchCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-import org.jboss.dna.graph.properties.Path;
-
-/**
- * Command that moves a branch from one path to another.
- *
- * @author Randall Hauch
- */
-public interface MoveBranchCommand extends GraphCommand, ActsOnPath, ActsAsUpdate {
-
- /**
- * Get the new path to which the branch is to be moved.
- *
- * @return the new path; never null
- */
- Path getNewPath();
-
- /**
- * Get the desired behavior when a node at the target {@link ActsOnPath#getPath()
path} already exists.
- *
- * @return the desired behavior; never null
- */
- NodeConflictBehavior getConflictBehavior();
-}
Deleted:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/NodeConflictBehavior.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/NodeConflictBehavior.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/NodeConflictBehavior.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-/**
- * An enumeration used by several commands for the choice of handling duplicate nodes,
such as when a node is to be copied to
- * another location where a node already exists.
- *
- * @author Randall Hauch
- */
-public enum NodeConflictBehavior {
-
- DO_NOT_REPLACE,
- APPEND,
- REPLACE,
- UPDATE;
-
-}
Deleted:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/RecordBranchCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/RecordBranchCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/RecordBranchCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-import java.util.Iterator;
-import org.jboss.dna.graph.properties.Path;
-import org.jboss.dna.graph.properties.Property;
-
-/**
- * Command that records the structure of a branch. To process this command, the recipient
should walk the branch rooted at
- * {@link ActsOnPath#getPath()} and, for each node in the branch, {@link #record(Path,
Iterable)} the node's information. If
- * {@link #record(Path, Iterable)} returns true, then the children of that node should
also be recorded; if false, then the
- * recording the children of that node can be ignored.
- *
- * @author Randall Hauch
- */
-public interface RecordBranchCommand extends GraphCommand, ActsOnPath {
-
- /**
- * Sets the properties of the supplied node.
- * <p>
- * If the supplied path is a relative path, it is assumed to be relative to the
{@link ActsOnPath#getPath() branch root}. If
- * the supplied path is an absolute path, it must be a {@link
Path#isDecendantOf(Path) decendant} of the
- * {@link ActsOnPath#getPath() branch root}; if not, this method returns false and
ignores the call.
- * </p>
- * <p>
- * This method should not be called multiple times with the same path. The behavior
for such cases is not defined.
- * </p>
- *
- * @param path the path for the node; may not be null
- * @param properties the properties for the node; may be null if there are no
properties
- * @return true if the children of the node should be recorded, or false if this new
node is as deep as the recording should
- * go
- */
- boolean record( Path path,
- Iterable<Property> properties );
-
- /**
- * Sets the properties of the supplied node.
- * <p>
- * If the supplied path is a relative path, it is assumed to be relative to the
{@link ActsOnPath#getPath() branch root}. If
- * the supplied path is an absolute path, it must be a {@link
Path#isDecendantOf(Path) decendant} of the
- * {@link ActsOnPath#getPath() branch root}; if not, this method returns false and
ignores the call.
- * </p>
- * <p>
- * This method should not be called multiple times with the same path. The behavior
for such cases is not defined.
- * </p>
- *
- * @param path the path for the node; may not be null
- * @param properties the properties for the node; may be null if there are no
properties
- * @return true if the children of the node should be recorded, or false if this new
node is as deep as the recording should
- * go
- */
- boolean record( Path path,
- Iterator<Property> properties );
-
- /**
- * Sets the properties of the supplied node.
- * <p>
- * If the supplied path is a relative path, it is assumed to be relative to the
{@link ActsOnPath#getPath() branch root}. If
- * the supplied path is an absolute path, it must be a {@link
Path#isDecendantOf(Path) decendant} of the
- * {@link ActsOnPath#getPath() branch root}; if not, this method returns false and
ignores the call.
- * </p>
- * <p>
- * This method should not be called multiple times with the same path. The behavior
for such cases is not defined.
- * </p>
- *
- * @param path the path for the node; may not be null
- * @param properties the properties for the node; may be null if there are no
properties
- * @return true if the children of the node should be recorded, or false if this new
node is as deep as the recording should
- * go
- */
- boolean record( Path path,
- Property... properties );
-
-}
Deleted:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/SetPropertiesCommand.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/SetPropertiesCommand.java 2008-10-23
18:46:32 UTC (rev 572)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/commands/SetPropertiesCommand.java 2008-10-23
18:48:23 UTC (rev 573)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.graph.commands;
-
-/**
- * A command to obtain from the source the properties for a single node given its path.
- * @author Randall Hauch
- */
-public interface SetPropertiesCommand extends GraphCommand, ActsOnPath, ActsOnProperties
{
-
-}