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 package org.collectionspace.services.common.document;
21 * MultipartDocumentHandler is a DocumentHandler provides document processing
22 * methods for entities using schema extension that are mapped to multipart
23 * request and response.
30 public interface MultipartDocumentHandler<T, TL, WT, WTL>
31 extends DocumentHandler<T, TL, WT, WTL> {
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
40 public void extractAllParts(DocumentWrapper<WT> docWrap) throws Exception;
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
50 public void fillAllParts(DocumentWrapper<WT> docWrap) throws Exception;