View Javadoc

1   /**
2    * Copyright 2005-2012 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kew.documentlink.service.impl;
17  
18  import java.util.List;
19  
20  import org.kuali.rice.kew.documentlink.DocumentLink;
21  import org.kuali.rice.kew.documentlink.dao.DocumentLinkDAO;
22  import org.kuali.rice.kew.documentlink.service.DocumentLinkService;
23  
24  /**
25   * This is a description of what this class does - g1zhang don't forget to fill this in. 
26   * 
27   * @author Kuali Rice Team (kuali-rice@googlegroups.com)
28   *
29   */
30  public class DocumentLinkServiceImpl implements DocumentLinkService {
31  
32  	private DocumentLinkDAO docLinkDao;
33  	/**
34  	 * @return the docLinkDao
35  	 */
36  	public DocumentLinkDAO getDocumentLinkDAO() {
37  		return this.docLinkDao;
38  	}
39  
40  	/**
41  	 * @param docLinkDao the docLinkDao to set
42  	 */
43  	public void setDocumentLinkDAO(DocumentLinkDAO docLinkDao) {
44  		this.docLinkDao = docLinkDao;
45  	}
46  
47  	/**
48  	 * This overridden method ...
49  	 * 
50  	 * @see org.kuali.rice.kew.documentlink.service.DocumentLinkService#deleteDocumentLink(org.kuali.rice.kew.documentlink.DocumentLink)
51  	 */
52  	public void deleteDocumentLink(DocumentLink link) {
53  		getDocumentLinkDAO().deleteDocumentLink(link);
54  	}
55  
56  	
57  	/**
58  	 * This overridden method ...
59  	 * 
60  	 * @see org.kuali.rice.kew.documentlink.service.DocumentLinkService#saveDocumentLink(org.kuali.rice.kew.documentlink.DocumentLink)
61  	 */
62  	public void saveDocumentLink(DocumentLink link) {
63  		getDocumentLinkDAO().saveDocumentLink(link);
64  
65  	}
66  	/**
67  	 * This overridden method ...
68  	 * 
69  	 * @see org.kuali.rice.kew.documentlink.service.DocumentLinkService#getLinkedDocumentByDocId(java.lang.Long)
70  	 */
71  	public List<DocumentLink> getLinkedDocumentsByDocId(String docId) {
72  		return getDocumentLinkDAO().getLinkedDocumentsByDocId(docId);
73  	}
74  	
75  	public List<DocumentLink> getOutgoingLinkedDocumentsByDocId(String docId) {
76  		return getDocumentLinkDAO().getOutgoingLinkedDocumentsByDocId(docId);
77  	}
78  
79  	/**
80  	 * This overridden method ...
81  	 * 
82  	 * @see org.kuali.rice.kew.documentlink.service.DocumentLinkService#deleteDocumentLinksByDocId(java.lang.Long)
83  	 */
84  	public void deleteDocumentLinksByDocId(String docId) {
85  		getDocumentLinkDAO().deleteDocmentLinksByDocId(docId);
86  		
87  	}
88  
89  	/**
90  	 * This overridden method ...
91  	 * 
92  	 * @see org.kuali.rice.kew.documentlink.service.DocumentLinkService#getLinkedDocument(org.kuali.rice.kew.documentlink.DocumentLink)
93  	 */
94  	public DocumentLink getLinkedDocument(DocumentLink link) {
95  		return getDocumentLinkDAO().getLinkedDocument(link);
96  	}
97  	
98  	public DocumentLink getDocumentLink(Long documentLinkId) {
99  		return getDocumentLinkDAO().getDocumentLink(documentLinkId);
100 	}
101 
102 
103 }