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.vocabulary.nuxeo;
26 import org.collectionspace.services.common.document.DocumentWrapper;
28 import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl;
29 import org.nuxeo.ecm.core.api.DocumentModel;
32 * AuthorityDocumentModelHandler
34 * $LastChangedRevision: $
37 public abstract class AuthorityDocumentModelHandler<AuthCommon, AuthCommonList>
38 extends RemoteDocumentModelHandlerImpl<AuthCommon, AuthCommonList> {
41 * authority is used to stash JAXB object to use when handle is called
42 * for Action.CREATE, Action.UPDATE or Action.GET
44 private AuthCommon authority;
46 * authorityList is stashed when handle is called
49 private AuthCommonList authorityList;
53 * getCommonPart get associated authority
57 public AuthCommon getCommonPart() {
62 * setCommonPart set associated authority
66 public void setCommonPart(AuthCommon authority) {
67 this.authority = authority;
71 * getCommonPartList get associated authority (for index/GET_ALL)
75 public AuthCommonList getCommonPartList() {
80 * @see org.collectionspace.services.nuxeo.client.java.DocumentModelHandler#setCommonPartList(java.lang.Object)
83 public void setCommonPartList(AuthCommonList authorityList) {
84 this.authorityList = authorityList;
88 * @see org.collectionspace.services.nuxeo.client.java.DocumentModelHandler#extractCommonPart(org.collectionspace.services.common.document.DocumentWrapper)
91 public AuthCommon extractCommonPart(DocumentWrapper<DocumentModel> wrapDoc)
93 throw new UnsupportedOperationException();
97 * @see org.collectionspace.services.nuxeo.client.java.DocumentModelHandler#fillCommonPart(java.lang.Object, org.collectionspace.services.common.document.DocumentWrapper)
100 public void fillCommonPart(AuthCommon vocabularyObject, DocumentWrapper<DocumentModel> wrapDoc) throws Exception {
101 throw new UnsupportedOperationException();