2 * This document is a part of the source code and related artifacts
3 * for CollectionSpace, an open source collections management system
4 * for museums and related institutions:
6 * http://www.collectionspace.org
7 * http://wiki.collectionspace.org
9 * Copyright 2009 University of California at Berkeley
11 * Licensed under the Educational Community License (ECL), Version 2.0.
12 * You may not use this file except in compliance with this License.
14 * You may obtain a copy of the ECL 2.0 License at
16 * https://source.collectionspace.org/collection-space/LICENSE.txt
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
24 package org.collectionspace.services.common.document;
28 import org.nuxeo.ecm.core.api.DocumentModelList;
29 import org.slf4j.Logger;
30 import org.slf4j.LoggerFactory;
33 * AbstractMultipartDocumentHandler
35 * $LastChangedRevision: $
42 public abstract class AbstractMultipartDocumentHandlerImpl<T, TL, WT, WTL>
43 extends AbstractDocumentHandlerImpl<T, TL, WT, WTL>
44 implements MultipartDocumentHandler<T, TL, WT, WTL> {
46 private final Logger logger = LoggerFactory.getLogger(AbstractMultipartDocumentHandlerImpl.class);
48 public AbstractMultipartDocumentHandlerImpl() {
53 * By default we won't support object hierarchy
55 public boolean supportsHierarchy() {
60 * By default we won't support object versioning
62 public boolean supportsVersioning() {
67 * @see org.collectionspace.services.common.document.AbstractDocumentHandlerImpl#handleCreate(org.collectionspace.services.common.document.DocumentWrapper)
70 public abstract void handleCreate(DocumentWrapper<WT> wrapDoc) throws Exception;
73 public abstract void handleUpdate(DocumentWrapper<WT> wrapDoc) throws Exception;
76 public abstract void handleGet(DocumentWrapper<WT> wrapDoc) throws Exception;
79 public abstract void handleGetAll(DocumentWrapper<WTL> wrapDoc) throws Exception;
82 public abstract void extractAllParts(DocumentWrapper<WT> wrapDoc)
86 public abstract void fillAllParts(DocumentWrapper<WT> wrapDoc, Action action)
90 public abstract T extractCommonPart(DocumentWrapper<WT> wrapDoc)
94 public abstract void fillCommonPart(T obj, DocumentWrapper<WT> wrapDoc)
98 public abstract TL extractCommonPartList(DocumentWrapper<WTL> wrapDoc)
102 public abstract TL extractPagingInfo(TL theCommonList, DocumentWrapper<WTL> wrapDoc)
106 public abstract T getCommonPart();
109 public abstract void setCommonPart(T obj);
112 public abstract TL getCommonPartList();
115 public abstract void setCommonPartList(TL obj);
118 public abstract String getQProperty(String prop) throws DocumentException;