svn keyword property "Id" added
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / lsid / LSIDDataService.java
1 // $Id$
2 /**
3 * Copyright (C) 2009 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.cdm.api.service.lsid;
12 import java.io.InputStream;
13 import com.ibm.lsid.server.LSIDServerException;
14 import com.ibm.lsid.server.LSIDService;
15
16 import eu.etaxonomy.cdm.model.common.LSID;
17 /** * 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. *
18 * @author Ben Szekely (<a href="mailto:bhszekel@us.ibm.com">bhszekel@us.ibm.com</a>)
19 * @author ben * * @see com.ibm.lsid.server.LSIDDataService * @see com.ibm.lsid.server.LSIDRequestContext
20 */
21 public interface LSIDDataService extends LSIDService {
22 /**
23 * Get the data associated with the LSID
24 * @param LSIDContext lsid
25 * @return InputStream an input stream to the data, null if no data exists
26 */
27 public InputStream getData(LSID lsid) throws LSIDServerException;
28 /**
29 * Get the data range associated with the LSID
30 * @param LSIDContext lsid
31 * @param int start the 0 offset of the first byte to retrieve
32 * @param int length the number of bytes to retrieve
33 * @return InputStream an input stream to the data, null if no data exists
34 */
35 public InputStream getDataByRange(LSID lsid, Integer start, Integer length) throws LSIDServerException;
36 }