From e3a64c80327d6cd5c9353be19c1fa2ef5df7bc34 Mon Sep 17 00:00:00 2001 From: pb Date: Mon, 3 Oct 2011 09:46:11 +0000 Subject: [PATCH] DocRepo repariert, man kann jetzt Dokumente hochladen und Ordner anlegen. git-svn-id: https://svn.libreccm.org/ccm/trunk@1137 8810af33-2d31-482b-a856-94f89814c4df --- ccm-docrepo/src/com/arsdigita/docrepo/Folder.java | 7 ++++++- .../src/com/arsdigita/docrepo/Initializer.java | 2 +- ccm-docrepo/src/com/arsdigita/docrepo/Loader.java | 2 +- .../src/com/arsdigita/docrepo/ResourceImpl.java | 14 ++++++++++++-- .../docrepo/ui/RepositoriesSelectionForm.java | 9 +++++++-- 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/Folder.java b/ccm-docrepo/src/com/arsdigita/docrepo/Folder.java index 9b77c19b2..dfc32fce7 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/Folder.java +++ b/ccm-docrepo/src/com/arsdigita/docrepo/Folder.java @@ -334,7 +334,12 @@ public class Folder extends ResourceImpl implements Constants { Session session = SessionManager.getSession(); DataQuery query = session.retrieveQuery - ("com.arsdigita.docs.getDirectChildren"); + ("com.arsdigita.docrepo.getDirectChildren"); + // with byline Version BASE_DATA_OBJECT_TYPE = + // "com.arsdigita.docs.ResourceImpl" + // so all retrieveQueries might have be to corrected. + // ("com.arsdigita.docs.getDirectChildren"); + // remove comment after intensive testing! query.setParameter("parentID", getID()); while (query.next()) { diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/Initializer.java b/ccm-docrepo/src/com/arsdigita/docrepo/Initializer.java index 171296e2e..ea7ab13d9 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/Initializer.java +++ b/ccm-docrepo/src/com/arsdigita/docrepo/Initializer.java @@ -67,7 +67,7 @@ public class Initializer extends CompoundInitializer { } ); - DomainObjectFactory.registerInstantiator + DomainObjectFactory.registerInstantiator (ResourceImpl.BASE_DATA_OBJECT_TYPE, new ACSObjectInstantiator() { @Override diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/Loader.java b/ccm-docrepo/src/com/arsdigita/docrepo/Loader.java index f2c0e05c9..793268dc4 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/Loader.java +++ b/ccm-docrepo/src/com/arsdigita/docrepo/Loader.java @@ -34,7 +34,7 @@ import com.arsdigita.web.ApplicationType; import org.apache.log4j.Logger; /** - * Document RFepository Loader + * Document Repository Loader * * @author pboy <pboy@barkhof.uni-bremen.de> * @version $Id: Loader.java $ diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/ResourceImpl.java b/ccm-docrepo/src/com/arsdigita/docrepo/ResourceImpl.java index da6314d67..a434ab063 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/ResourceImpl.java +++ b/ccm-docrepo/src/com/arsdigita/docrepo/ResourceImpl.java @@ -316,7 +316,12 @@ public abstract class ResourceImpl extends VersionedACSObject // Execute the data operation to update all children Session session = SessionManager.getSession(); DataOperation op = session.retrieveDataOperation - ("com.arsdigita.docs.updateChildren"); + ("com.arsdigita.docrepo.updateChildren"); + // with byline Version BASE_DATA_OBJECT_TYPE = + // "com.arsdigita.docs.ResourceImpl" + // so all retrieveQueries might have be to corrected. + // ("com.arsdigita.docs.updateChildren"); + // remove comment after intensive testing! op.setParameter("rootPath", path); op.setParameter("oldPath", oldPath); op.setParameter("oldRootPathLength", new Integer(oldPath.length()+1)); @@ -574,7 +579,12 @@ public abstract class ResourceImpl extends VersionedACSObject String absPath = getPath() + SEPARATOR + path; Session session = SessionManager.getSession(); DataQuery query = session.retrieveQuery - ("com.arsdigita.docs.getResourceByPath"); + ("com.arsdigita.docrepo.getResourceByPath"); + // with byline Version BASE_DATA_OBJECT_TYPE = + // "com.arsdigita.docs.ResourceImpl" + // so all retrieveQueries might have be to corrected. + // ("com.arsdigita.docs.getResourceByPath"); + // remove comment after intensive testing! query.setParameter("targetPath", absPath); if (query.next()) { diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/ui/RepositoriesSelectionForm.java b/ccm-docrepo/src/com/arsdigita/docrepo/ui/RepositoriesSelectionForm.java index ec301b6cf..8beec8901 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/ui/RepositoriesSelectionForm.java +++ b/ccm-docrepo/src/com/arsdigita/docrepo/ui/RepositoriesSelectionForm.java @@ -126,8 +126,13 @@ class RepositoriesSelectionForm extends Form if(selected.size() > 0 ) { DataOperation operation = SessionManager.getSession() .retrieveDataOperation( - "com.arsdigita.docs.addUserRepositoriesMapping"); - operation.setParameter("userID", subscriber.getID()); + "com.arsdigita.docrepo.addUserRepositoriesMapping"); + // with byline Version BASE_DATA_OBJECT_TYPE = + // "com.arsdigita.docs.ResourceImpl" + // so all retrieveQueries might have be to corrected. + // "com.arsdigita.docs.addUserRepositoriesMapping"); + // remove comment after intensive testing! + operation.setParameter("userID", subscriber.getID()); operation.setParameter("repositoryIDs", selected); operation.execute(); operation.close();