]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3332
authorLaramie Crocker <laramie@berkeley.edu>
Wed, 15 Dec 2010 21:24:27 +0000 (21:24 +0000)
committerLaramie Crocker <laramie@berkeley.edu>
Wed, 15 Dec 2010 21:24:27 +0000 (21:24 +0000)
services/IntegrationTests/src/test/java/org/collectionspace/services/IntegrationTests/test/XmlReplayDevTest.java
services/common/src/main/java/org/collectionspace/services/common/DocHandlerBase.java [deleted file]

index 98876f0b4199fcd3dcbde4f8c5ff06f217eba28f..b4fae5c87daeed62a1ed93e0eef0311d2c3b449c 100755 (executable)
@@ -1,7 +1,6 @@
 package org.collectionspace.services.IntegrationTests.test;
 
 import org.collectionspace.services.IntegrationTests.xmlreplay.ServiceResult;
-import org.collectionspace.services.IntegrationTests.xmlreplay.Tools;
 import org.collectionspace.services.IntegrationTests.xmlreplay.XmlReplay;
 import org.collectionspace.services.IntegrationTests.xmlreplay.XmlReplayTest;
 import org.testng.annotations.Test;
diff --git a/services/common/src/main/java/org/collectionspace/services/common/DocHandlerBase.java b/services/common/src/main/java/org/collectionspace/services/common/DocHandlerBase.java
deleted file mode 100755 (executable)
index e2afaef..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/**\r
- *  This document is a part of the source code and related artifacts\r
- *  for CollectionSpace, an open source collections management system\r
- *  for museums and related institutions:\r
-\r
- *  http://www.collectionspace.org\r
- *  http://wiki.collectionspace.org\r
-\r
- *  Copyright 2009 University of California at Berkeley\r
-\r
- *  Licensed under the Educational Community License (ECL), Version 2.0.\r
- *  You may not use this file except in compliance with this License.\r
-\r
- *  You may obtain a copy of the ECL 2.0 License at\r
-\r
- *  https://source.collectionspace.org/collection-space/LICENSE.txt\r
-\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- */\r
-package org.collectionspace.services.common;\r
-\r
-import java.util.Iterator;\r
-import java.util.List;\r
-\r
-import org.collectionspace.services.common.document.DocumentWrapper;\r
-import org.collectionspace.services.jaxb.AbstractCommonList;\r
-import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl;\r
-import org.collectionspace.services.nuxeo.util.NuxeoUtils;\r
-import org.nuxeo.ecm.core.api.DocumentModel;\r
-import org.nuxeo.ecm.core.api.DocumentModelList;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-/**\r
- * User: laramie\r
- * $LastChangedRevision:  $\r
- * $LastChangedDate:  $\r
- */\r
-public abstract class DocHandlerBase<T, TL>\r
-        extends RemoteDocumentModelHandlerImpl<T, TL> {\r
-\r
-    /** The logger. */\r
-    private final Logger logger = LoggerFactory.getLogger(this.getClass());\r
-\r
-    private AbstractCommonList commonList;\r
-\r
-    @Override\r
-    public TL getCommonPartList() {\r
-        return (TL)commonList;\r
-    }\r
-\r
-    public void setCommonPartList(AbstractCommonList aCommonList) {\r
-        this.commonList = aCommonList;\r
-    }\r
-\r
-    private T commonPart;\r
-\r
-    @Override\r
-    public T getCommonPart() {\r
-        return (T)commonPart;\r
-    }\r
-\r
-    public void setCommonPart(T commonPart) {\r
-        this.commonPart = commonPart;\r
-    }\r
-\r
-    public abstract String getNuxeoSchemaName();\r
-\r
-    public abstract String getSummaryFields(AbstractCommonList commonList);\r
-\r
-    public abstract AbstractCommonList createAbstractCommonListImpl();\r
-\r
-    public abstract List createItemsList(AbstractCommonList commonList );\r
-    \r
-    /** DocHandlerBase calls this method with the CSID as id */\r
-    public abstract Object createItemForCommonList(DocumentModel docModel, String label, String id) throws Exception;\r
-\r
-    @Override\r
-    public T extractCommonPart(DocumentWrapper<DocumentModel> wrapDoc) throws Exception {\r
-        throw new UnsupportedOperationException();\r
-    }\r
-\r
-    public void fillCommonPart(T objectexitObject, DocumentWrapper<DocumentModel> wrapDoc) throws Exception {\r
-        throw new UnsupportedOperationException();\r
-    }\r
-\r
-    @Override\r
-    public TL extractCommonPartList(DocumentWrapper<DocumentModelList> wrapDoc) throws Exception {\r
-        String label = getServiceContext().getCommonPartLabel();\r
-\r
-        AbstractCommonList commonList = createAbstractCommonListImpl();\r
-        //ObjectexitCommonList oeList = (ObjectexitCommonList)extractPagingInfo(commonList, wrapDoc);\r
-        extractPagingInfo(((TL)commonList), wrapDoc);\r
-        commonList.setFieldsReturned(getSummaryFields(commonList));\r
-        List list = createItemsList(commonList);\r
-        Iterator<DocumentModel> iter = wrapDoc.getWrappedObject().iterator();\r
-        while(iter.hasNext()){\r
-            DocumentModel docModel = iter.next();\r
-            String id = NuxeoUtils.extractId(docModel.getPathAsString());\r
-            Object item = createItemForCommonList(docModel, label, id);\r
-            list.add(item);\r
-        }\r
-        return (TL)commonList;\r
-    }\r
-\r
-    @Override\r
-    public String getQProperty(String prop) {\r
-        return getNuxeoSchemaName() + ":" + prop;\r
-    }\r
-\r
-\r
-\r
-}\r
-\r