]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
a30a45eef19d084d0a0d93490213b51477f495d6
[tmp/jakarta-migration.git] /
1 /**
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:
5
6  *  http://www.collectionspace.org
7  *  http://wiki.collectionspace.org
8
9  *  Copyright 2009 University of California at Berkeley
10
11  *  Licensed under the Educational Community License (ECL), Version 2.0.
12  *  You may not use this file except in compliance with this License.
13
14  *  You may obtain a copy of the ECL 2.0 License at
15
16  *  https://source.collectionspace.org/collection-space/LICENSE.txt
17
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.
23  */
24 package org.collectionspace.services.common.document;
25
26
27
28 import org.nuxeo.ecm.core.api.DocumentModelList;
29 import org.slf4j.Logger;
30 import org.slf4j.LoggerFactory;
31
32 /**
33  * AbstractMultipartDocumentHandler
34  *
35  * $LastChangedRevision: $
36  * $LastChangedDate: $
37  * @param <T> 
38  * @param <TL> 
39  * @param <WT> 
40  * @param <WTL> 
41  */
42 public abstract class AbstractMultipartDocumentHandlerImpl<T, TL, WT, WTL>
43         extends AbstractDocumentHandlerImpl<T, TL, WT, WTL>
44         implements MultipartDocumentHandler<T, TL, WT, WTL> {
45
46     private final Logger logger = LoggerFactory.getLogger(AbstractMultipartDocumentHandlerImpl.class);
47
48     public AbstractMultipartDocumentHandlerImpl() {
49         //Empty constructor
50     }
51
52     /*
53      * By default we won't support object hierarchy
54      */
55     public boolean supportsHierarchy() {
56         return false;
57     }
58     
59     /* (non-Javadoc)
60      * @see org.collectionspace.services.common.document.AbstractDocumentHandlerImpl#handleCreate(org.collectionspace.services.common.document.DocumentWrapper)
61      */
62     @Override
63     public abstract void handleCreate(DocumentWrapper<WT> wrapDoc) throws Exception;
64
65     @Override
66     public abstract void handleUpdate(DocumentWrapper<WT> wrapDoc) throws Exception;
67
68     @Override
69     public abstract void handleGet(DocumentWrapper<WT> wrapDoc) throws Exception;
70
71     @Override
72     public abstract void handleGetAll(DocumentWrapper<WTL> wrapDoc) throws Exception;
73
74     @Override
75     public abstract void extractAllParts(DocumentWrapper<WT> wrapDoc)
76             throws Exception;
77
78     @Override
79     public abstract void fillAllParts(DocumentWrapper<WT> wrapDoc, Action action)
80             throws Exception;
81
82     @Override
83     public abstract T extractCommonPart(DocumentWrapper<WT> wrapDoc)
84             throws Exception;
85
86     @Override
87     public abstract void fillCommonPart(T obj, DocumentWrapper<WT> wrapDoc)
88             throws Exception;
89
90     @Override
91     public abstract TL extractCommonPartList(DocumentWrapper<WTL> wrapDoc)
92             throws Exception;
93     
94     @Override
95     public abstract TL extractPagingInfo(TL theCommonList, DocumentWrapper<WTL> wrapDoc)
96                 throws Exception;
97
98     @Override
99     public abstract T getCommonPart();
100
101     @Override
102     public abstract void setCommonPart(T obj);
103
104     @Override
105     public abstract TL getCommonPartList();
106
107     @Override
108     public abstract void setCommonPartList(TL obj);
109
110     @Override
111     public abstract String getQProperty(String prop) throws DocumentException;
112
113 }