This project has retired. For details please refer to its
Attic page.
RelationshipService xref
1/*2 * Licensed to the Apache Software Foundation (ASF) under one3 * or more contributor license agreements. See the NOTICE file4 * distributed with this work for additional information5 * regarding copyright ownership. The ASF licenses this file6 * to you under the Apache License, Version 2.0 (the7 * "License"); you may not use this file except in compliance8 * with the License. You may obtain a copy of the License at9 *10 * http://www.apache.org/licenses/LICENSE-2.011 *12 * Unless required by applicable law or agreed to in writing,13 * software distributed under the License is distributed on an14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY15 * KIND, either express or implied. See the License for the16 * specific language governing permissions and limitations17 * under the License.18 */19package org.apache.chemistry.opencmis.server.impl.webservices;
2021importstatic org.apache.chemistry.opencmis.commons.impl.Converter.convert;
2223import java.math.BigInteger;
2425import javax.annotation.Resource;
26import javax.jws.WebService;
27import javax.xml.ws.WebServiceContext;
28import javax.xml.ws.soap.MTOM;
2930import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
31import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisException;
32import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType;
33import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectListType;
34import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumRelationshipDirection;
35import org.apache.chemistry.opencmis.commons.impl.jaxb.RelationshipServicePort;
36import org.apache.chemistry.opencmis.commons.server.CmisService;
3738/**39 * CMIS Relationship Service.40 */41 @MTOM
42 @WebService(endpointInterface = "org.apache.chemistry.opencmis.commons.impl.jaxb.RelationshipServicePort")
43publicclassRelationshipServiceextendsAbstractService implements RelationshipServicePort {
44 @Resource
45public WebServiceContext wsContext;
4647public CmisObjectListType getObjectRelationships(String repositoryId, String objectId,
48 Boolean includeSubRelationshipTypes, EnumRelationshipDirection relationshipDirection, String typeId,
49 String filter, Boolean includeAllowableActions, BigInteger maxItems, BigInteger skipCount,
50 CmisExtensionType extension) throws CmisException {
51 CmisService service = null;
52try {
53 service = getService(wsContext, repositoryId);
5455return convert(service.getObjectRelationships(repositoryId, objectId, includeSubRelationshipTypes,
56 convert(RelationshipDirection.class, relationshipDirection), typeId, filter,
57 includeAllowableActions, maxItems, skipCount, convert(extension)));
58 } catch (Exception e) {
59throw convertException(e);
60 } finally {
61 closeService(service);
62 }
63 }
64 }