cleanup
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / lsid / LSIDDataService.java
1 /**
2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package eu.etaxonomy.cdm.api.service.lsid;
11 import java.io.InputStream;
12 import com.ibm.lsid.server.LSIDServerException;
13 import com.ibm.lsid.server.LSIDService;
14
15 import eu.etaxonomy.cdm.model.common.LSID;
16 /** * LSIDDataService interface which was altered from com.ibm.lsid.server.LSIDDataService, * replacing the LSIDRequestContext with a simple LSID. My thinking behind this is that provided the * LSIDDataService has no responsibility for security, then there is no need to pass that * information to it (in an LSIDRequestContext). This allows better separation of concerns in that methods * requiring authentication and authorization can be secured transparently within CATE without the need for * the LSIDAuthorityService to know anything about it. I could be wrong, of course. *
17 * @author Ben Szekely (<a href="mailto:bhszekel@us.ibm.com">bhszekel@us.ibm.com</a>)
18 * @author ben * * @see com.ibm.lsid.server.LSIDDataService * @see com.ibm.lsid.server.LSIDRequestContext
19 */
20 public interface LSIDDataService extends LSIDService {
21 /**
22 * Get the data associated with the LSID
23 * @param LSIDContext lsid
24 * @return InputStream an input stream to the data, null if no data exists
25 */
26 public InputStream getData(LSID lsid) throws LSIDServerException;
27 /**
28 * Get the data range associated with the LSID
29 * @param LSIDContext lsid
30 * @param int start the 0 offset of the first byte to retrieve
31 * @param int length the number of bytes to retrieve
32 * @return InputStream an input stream to the data, null if no data exists
33 */
34 public InputStream getDataByRange(LSID lsid, Integer start, Integer length) throws LSIDServerException;
35 }