]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
2a84a045ffed55c7300ce2552c28d7acb69fa130
[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 package org.collectionspace.services.common.document;
19
20 /**
21  * MultipartDocumentHandler is a DocumentHandler provides document processing
22  * methods for entities using schema extension that are mapped to multipart
23  * request and response.
24  * @author
25  * @param <T>
26  * @param <TL>
27  * @param <WT>
28  * @param <WTL>
29  */
30 public interface MultipartDocumentHandler<T, TL, WT, WTL>
31         extends DocumentHandler<T, TL, WT, WTL> {
32
33     /**
34      * extractAllParts extracts all parts of a CS object from given document.
35      * this is usually called AFTER the get operation is invoked on the repository
36      * Called in handle GET/GET_ALL actions.
37      * @param docWrap document
38      * @throws Exception
39      */
40     public void extractAllParts(DocumentWrapper<WT> docWrap) throws Exception;
41
42     /**
43      * fillAllParts sets parts of CS object into given document
44      * this is usually called BEFORE create/update operations are invoked on the
45      * repository. Called in handle CREATE/UPDATE actions.
46      * @param obj input object
47      * @param docWrap target document
48      * @throws Exception
49      */
50     public void fillAllParts(DocumentWrapper<WT> docWrap) throws Exception;
51 }