diff --git a/pom.xml b/pom.xml index 8a1d8aae9a..97fe25e857 100644 --- a/pom.xml +++ b/pom.xml @@ -69,6 +69,7 @@ scm-plugins scm-samples scm-dao-xml + scm-dao-orientdb scm-webapp scm-server scm-plugin-backend @@ -456,4 +457,4 @@ SCM-BSD - + \ No newline at end of file diff --git a/scm-dao-orientdb/pom.xml b/scm-dao-orientdb/pom.xml new file mode 100644 index 0000000000..546a3cadfd --- /dev/null +++ b/scm-dao-orientdb/pom.xml @@ -0,0 +1,44 @@ + + + + 4.0.0 + + + sonia.scm + scm + 1.14-SNAPSHOT + + + sonia.scm + scm-dao-orientdb + 1.0-SNAPSHOT + scm-dao-orientdb + + + + + javax.servlet + servlet-api + ${servlet.version} + provided + + + + sonia.scm + scm-core + 1.14-SNAPSHOT + + + + + + sonia.scm + scm-test + 1.14-SNAPSHOT + test + + + + + diff --git a/scm-dao-orientdb/src/main/java/sonia/scm/group/orientdb/OrientDBGroupDAO.java b/scm-dao-orientdb/src/main/java/sonia/scm/group/orientdb/OrientDBGroupDAO.java new file mode 100644 index 0000000000..2870f68481 --- /dev/null +++ b/scm-dao-orientdb/src/main/java/sonia/scm/group/orientdb/OrientDBGroupDAO.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2010, Sebastian Sdorra All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. 2. Redistributions in + * binary form must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. 3. Neither the name of SCM-Manager; + * nor the names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * http://bitbucket.org/sdorra/scm-manager + * + */ + + + +package sonia.scm.group.orientdb; + +//~--- non-JDK imports -------------------------------------------------------- + +import sonia.scm.group.Group; +import sonia.scm.group.GroupDAO; + +//~--- JDK imports ------------------------------------------------------------ + +import java.util.Collection; + +/** + * + * @author Sebastian Sdorra + */ +public class OrientDBGroupDAO implements GroupDAO +{ + + /** + * Method description + * + * + * @param item + */ + @Override + public void add(Group item) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param item + * + * @return + */ + @Override + public boolean contains(Group item) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param id + * + * @return + */ + @Override + public boolean contains(String id) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param item + */ + @Override + public void delete(Group item) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param item + */ + @Override + public void modify(Group item) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + //~--- get methods ---------------------------------------------------------- + + /** + * Method description + * + * + * @param id + * + * @return + */ + @Override + public Group get(String id) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public Collection getAll() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public Long getCreationTime() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public Long getLastModified() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public String getType() + { + throw new UnsupportedOperationException("Not supported yet."); + } +} diff --git a/scm-dao-orientdb/src/main/java/sonia/scm/repository/orientdb/OrientDBRepositoryManager.java b/scm-dao-orientdb/src/main/java/sonia/scm/repository/orientdb/OrientDBRepositoryManager.java new file mode 100644 index 0000000000..c1fa12f207 --- /dev/null +++ b/scm-dao-orientdb/src/main/java/sonia/scm/repository/orientdb/OrientDBRepositoryManager.java @@ -0,0 +1,534 @@ +/** + * Copyright (c) 2010, Sebastian Sdorra All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. 2. Redistributions in + * binary form must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. 3. Neither the name of SCM-Manager; + * nor the names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * http://bitbucket.org/sdorra/scm-manager + * + */ + + + +package sonia.scm.repository.orientdb; + +//~--- non-JDK imports -------------------------------------------------------- + +import sonia.scm.SCMContextProvider; +import sonia.scm.Type; +import sonia.scm.repository.BlameViewer; +import sonia.scm.repository.ChangesetViewer; +import sonia.scm.repository.DiffViewer; +import sonia.scm.repository.Repository; +import sonia.scm.repository.RepositoryBrowser; +import sonia.scm.repository.RepositoryException; +import sonia.scm.repository.RepositoryHandler; +import sonia.scm.repository.RepositoryHook; +import sonia.scm.repository.RepositoryHookEvent; +import sonia.scm.repository.RepositoryListener; +import sonia.scm.repository.RepositoryManager; +import sonia.scm.repository.RepositoryNotFoundException; + +//~--- JDK imports ------------------------------------------------------------ + +import java.io.IOException; + +import java.util.Collection; +import java.util.Comparator; + +import javax.servlet.http.HttpServletRequest; + +/** + * + * @author Sebastian Sdorra + */ +public class OrientDBRepositoryManager implements RepositoryManager +{ + + /** + * Method description + * + * + * @param hook + */ + @Override + public void addHook(RepositoryHook hook) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param hooks + */ + @Override + public void addHooks(Collection hooks) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param listener + */ + @Override + public void addListener(RepositoryListener listener) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param listeners + */ + @Override + public void addListeners(Collection listeners) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @throws IOException + */ + @Override + public void close() throws IOException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param object + * + * @throws IOException + * @throws RepositoryException + */ + @Override + public void create(Repository object) throws RepositoryException, IOException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param object + * + * @throws IOException + * @throws RepositoryException + */ + @Override + public void delete(Repository object) throws RepositoryException, IOException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param repository + * @param event + */ + @Override + public void fireHookEvent(Repository repository, RepositoryHookEvent event) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param type + * @param name + * @param event + * + * @throws RepositoryNotFoundException + */ + @Override + public void fireHookEvent(String type, String name, RepositoryHookEvent event) + throws RepositoryNotFoundException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param id + * @param event + * + * @throws RepositoryNotFoundException + */ + @Override + public void fireHookEvent(String id, RepositoryHookEvent event) + throws RepositoryNotFoundException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param repository + * + * @throws IOException + * @throws RepositoryException + */ + @Override + public void importRepository(Repository repository) + throws IOException, RepositoryException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param context + */ + @Override + public void init(SCMContextProvider context) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param object + * + * @throws IOException + * @throws RepositoryException + */ + @Override + public void modify(Repository object) throws RepositoryException, IOException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param object + * + * @throws IOException + * @throws RepositoryException + */ + @Override + public void refresh(Repository object) throws RepositoryException, IOException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param hook + */ + @Override + public void removeHook(RepositoryHook hook) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param listener + */ + @Override + public void removeListener(RepositoryListener listener) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + //~--- get methods ---------------------------------------------------------- + + /** + * Method description + * + * + * @param type + * @param name + * + * @return + */ + @Override + public Repository get(String type, String name) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param id + * + * @return + */ + @Override + public Repository get(String id) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public Collection getAll() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param comparator + * + * @return + */ + @Override + public Collection getAll(Comparator comparator) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param start + * @param limit + * + * @return + */ + @Override + public Collection getAll(int start, int limit) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param comparator + * @param start + * @param limit + * + * @return + */ + @Override + public Collection getAll(Comparator comparator, + int start, int limit) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param repository + * + * @return + * + * @throws RepositoryException + */ + @Override + public BlameViewer getBlameViewer(Repository repository) + throws RepositoryException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param repository + * + * @return + * + * @throws RepositoryException + */ + @Override + public ChangesetViewer getChangesetViewer(Repository repository) + throws RepositoryException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public Collection getConfiguredTypes() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param repository + * + * @return + * + * @throws RepositoryException + */ + @Override + public DiffViewer getDiffViewer(Repository repository) + throws RepositoryException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param request + * + * @return + */ + @Override + public Repository getFromRequest(HttpServletRequest request) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param type + * @param uri + * + * @return + */ + @Override + public Repository getFromTypeAndUri(String type, String uri) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param uri + * + * @return + */ + @Override + public Repository getFromUri(String uri) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param type + * + * @return + */ + @Override + public RepositoryHandler getHandler(String type) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public Long getLastModified() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param repository + * + * @return + * + * @throws RepositoryException + */ + @Override + public RepositoryBrowser getRepositoryBrowser(Repository repository) + throws RepositoryException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public Collection getTypes() + { + throw new UnsupportedOperationException("Not supported yet."); + } +} diff --git a/scm-dao-orientdb/src/main/java/sonia/scm/store/orientdb/OrientDBStoreFactory.java b/scm-dao-orientdb/src/main/java/sonia/scm/store/orientdb/OrientDBStoreFactory.java new file mode 100644 index 0000000000..6f96648816 --- /dev/null +++ b/scm-dao-orientdb/src/main/java/sonia/scm/store/orientdb/OrientDBStoreFactory.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2010, Sebastian Sdorra All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. 2. Redistributions in + * binary form must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. 3. Neither the name of SCM-Manager; + * nor the names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * http://bitbucket.org/sdorra/scm-manager + * + */ + + + +package sonia.scm.store.orientdb; + +//~--- non-JDK imports -------------------------------------------------------- + +import sonia.scm.SCMContextProvider; +import sonia.scm.store.Store; +import sonia.scm.store.StoreFactory; + +//~--- JDK imports ------------------------------------------------------------ + +import java.io.IOException; + +/** + * + * @author Sebastian Sdorra + */ +public class OrientDBStoreFactory implements StoreFactory +{ + + /** + * Method description + * + * + * @throws IOException + */ + @Override + public void close() throws IOException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param context + */ + @Override + public void init(SCMContextProvider context) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + //~--- get methods ---------------------------------------------------------- + + /** + * Method description + * + * + * @param type + * @param name + * @param + * + * @return + */ + @Override + public Store getStore(Class type, String name) + { + throw new UnsupportedOperationException("Not supported yet."); + } +} diff --git a/scm-dao-orientdb/src/main/java/sonia/scm/user/orientdb/OrientDBUserDAO.java b/scm-dao-orientdb/src/main/java/sonia/scm/user/orientdb/OrientDBUserDAO.java new file mode 100644 index 0000000000..2476b5fb3c --- /dev/null +++ b/scm-dao-orientdb/src/main/java/sonia/scm/user/orientdb/OrientDBUserDAO.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2010, Sebastian Sdorra All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. 2. Redistributions in + * binary form must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. 3. Neither the name of SCM-Manager; + * nor the names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * http://bitbucket.org/sdorra/scm-manager + * + */ + + + +package sonia.scm.user.orientdb; + +//~--- non-JDK imports -------------------------------------------------------- + +import sonia.scm.user.User; +import sonia.scm.user.UserDAO; + +//~--- JDK imports ------------------------------------------------------------ + +import java.util.Collection; + +/** + * + * @author Sebastian Sdorra + */ +public class OrientDBUserDAO implements UserDAO +{ + + /** + * Method description + * + * + * @param item + */ + @Override + public void add(User item) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param item + * + * @return + */ + @Override + public boolean contains(User item) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param id + * + * @return + */ + @Override + public boolean contains(String id) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param item + */ + @Override + public void delete(User item) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @param item + */ + @Override + public void modify(User item) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + //~--- get methods ---------------------------------------------------------- + + /** + * Method description + * + * + * @param id + * + * @return + */ + @Override + public User get(String id) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public Collection getAll() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public Long getCreationTime() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public Long getLastModified() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * Method description + * + * + * @return + */ + @Override + public String getType() + { + throw new UnsupportedOperationException("Not supported yet."); + } +} diff --git a/scm-dao-orientdb/src/main/resources/META-INF/scm/override.xml b/scm-dao-orientdb/src/main/resources/META-INF/scm/override.xml new file mode 100644 index 0000000000..3e60cc6e0b --- /dev/null +++ b/scm-dao-orientdb/src/main/resources/META-INF/scm/override.xml @@ -0,0 +1,55 @@ + + + + + + + sonia.scm.user.UserDAO + sonia.scm.user.orientdb.OrientDBUserDAO + + + + sonia.scm.group.GroupDAO + sonia.scm.group.orientdb.OrientDBGroupDAO + + + + sonia.scm.repository.RepositoryDAO + sonia.scm.repository.orientdb.OrientDBRepositoryManager + + + + sonia.scm.store.StoreFactory + sonia.scm.store.orientdb.OrientDBStoreFactory + + + \ No newline at end of file