001/**
002 * Copyright 2005-2016 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.kew.documentlink.service.impl;
017
018import java.util.List;
019
020import org.kuali.rice.kew.documentlink.DocumentLink;
021import org.kuali.rice.kew.documentlink.dao.DocumentLinkDAO;
022import org.kuali.rice.kew.documentlink.service.DocumentLinkService;
023
024/**
025 * This is a description of what this class does - g1zhang don't forget to fill this in. 
026 * 
027 * @author Kuali Rice Team (kuali-rice@googlegroups.com)
028 *
029 */
030public class DocumentLinkServiceImpl implements DocumentLinkService {
031
032        private DocumentLinkDAO docLinkDao;
033
034    @Override
035    public void deleteDocumentLink(DocumentLink link) {
036                getDocumentLinkDAO().deleteDocumentLink(link);
037        }
038
039    @Override
040        public DocumentLink saveDocumentLink(DocumentLink link) {
041                return getDocumentLinkDAO().saveDocumentLink(link);
042        }
043
044    @Override
045        public List<DocumentLink> getLinkedDocumentsByDocId(String docId) {
046                return getDocumentLinkDAO().getLinkedDocumentsByDocId(docId);
047        }
048
049    @Override
050        public List<DocumentLink> getOutgoingLinkedDocumentsByDocId(String docId) {
051                return getDocumentLinkDAO().getOutgoingLinkedDocumentsByDocId(docId);
052        }
053
054    @Override
055        public DocumentLink getDocumentLink(String documentLinkId) {
056                return getDocumentLinkDAO().getDocumentLink(documentLinkId);
057        }
058
059    /**
060     * @return the docLinkDao
061     */
062    public DocumentLinkDAO getDocumentLinkDAO() {
063        return this.docLinkDao;
064    }
065
066    /**
067     * @param docLinkDao the docLinkDao to set
068     */
069    public void setDocumentLinkDAO(DocumentLinkDAO docLinkDao) {
070        this.docLinkDao = docLinkDao;
071    }
072
073}