From acc8ff4891c51a4141951acf132505b6e7973156 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Fri, 7 Aug 2009 23:35:18 +0000 Subject: [PATCH] NOJIRA: Undoing move/rename. --- .../nuxeo/RelationHandlerFactory.java | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationHandlerFactory.java diff --git a/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationHandlerFactory.java b/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationHandlerFactory.java new file mode 100644 index 000000000..b2914b8fb --- /dev/null +++ b/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationHandlerFactory.java @@ -0,0 +1,55 @@ +/** + * This document is a part of the source code and related artifacts + * for CollectionSpace, an open source collections management system + * for museums and related institutions: + + * http://www.collectionspace.org + * http://wiki.collectionspace.org + + * Copyright 2009 University of California at Berkeley + + * Licensed under the Educational Community License (ECL), Version 2.0. + * You may not use this file except in compliance with this License. + + * You may obtain a copy of the ECL 2.0 License at + + * https://source.collectionspace.org/collection-space/LICENSE.txt + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.collectionspace.services.relation.nuxeo; + +import org.collectionspace.services.common.NuxeoClientType; +import org.collectionspace.services.common.repository.DocumentHandler; + +/** + * CollectionObjectHandlerFactory creates handlers for collectionobject based + * on type of Nuxeo client used + * + * $LastChangedRevision: $ + * $LastChangedDate: $ + */ +public class RelationHandlerFactory { + + private static final RelationHandlerFactory self = new RelationHandlerFactory(); + + private RelationHandlerFactory() { + } + + public static RelationHandlerFactory getInstance() { + return self; + } + + public DocumentHandler getHandler(String clientType) { + if(NuxeoClientType.JAVA.toString().equals(clientType)){ + return new RelationDocumentModelHandler(); + } else if(NuxeoClientType.REST.toString().equals(clientType)) { +// return new RelationRepresenationHandler(); + } + throw new IllegalArgumentException("Not supported client=" + clientType); + } +} -- 2.47.3