public class UriResolverReaderParameterForResolverIndex extends Object
Modifier and Type | Class and Description |
---|---|
static class |
UriResolverReaderParameterForResolverIndex.RESOLVER_TYPE
The Enum RESOLVER_TYPE.
|
Modifier and Type | Field and Description |
---|---|
protected static String |
CONTENT_TYPE_PARAMETER |
protected static String |
FILE_NAME_PARAMETER |
static org.apache.log4j.Logger |
logger |
protected static String |
SMP_ID_PARAMETER |
Constructor and Description |
---|
UriResolverReaderParameterForResolverIndex(String scope,
UriResolverReaderParameterForResolverIndex.RESOLVER_TYPE resolverType)
Instantiates a new uri resolver reader parameter for resolver index.
|
Modifier and Type | Method and Description |
---|---|
String |
getBaseUri()
Gets the base uri.
|
String |
getContentTypeParameter()
Gets the content type parameter.
|
String |
getFileNameParameter()
Gets the file name parameter.
|
Map<String,String> |
getHashParameters(String storageID,
String fileName,
String contentType)
Gets the hash parameters.
|
String |
getQuery()
Gets the query.
|
String |
getStorageIDParameter()
Gets the storage id parameter.
|
boolean |
isAvailable()
Checks if is available.
|
InputStream |
resolveAsInputStream(String smp,
String fileName,
String contentType)
Resolve - open stream with http get method.
|
String |
resolveAsStorageIdRequest(String storageID,
boolean encodeParams)
Resolve as storage id request.
|
String |
resolveAsUriRequest(String storageID,
String fileName,
String contentType,
boolean encodeParams)
Resolve as uri request.
|
String |
toString() |
protected static final String CONTENT_TYPE_PARAMETER
protected static final String FILE_NAME_PARAMETER
protected static final String SMP_ID_PARAMETER
public static org.apache.log4j.Logger logger
public UriResolverReaderParameterForResolverIndex(String scope, UriResolverReaderParameterForResolverIndex.RESOLVER_TYPE resolverType) throws Exception
scope
- the scoperesolverType
- the resolver typeException
- the exceptionpublic InputStream resolveAsInputStream(String smp, String fileName, String contentType) throws Exception
smp
- the smpfileName
- the file namecontentType
- the content typeException
- the exceptionpublic String resolveAsUriRequest(String storageID, String fileName, String contentType, boolean encodeParams) throws Exception
storageID
- the storage idfileName
- the file namecontentType
- the content typeencodeParams
- - if true, translates a string into application/x-www-form-urlencoded
format using a specific encoding schemeException
- the exceptionpublic String resolveAsStorageIdRequest(String storageID, boolean encodeParams) throws Exception
storageID
- the storage idencodeParams
- the encode paramsException
- the exceptionpublic Map<String,String> getHashParameters(String storageID, String fileName, String contentType) throws Exception
storageID
- the storage idfileName
- the file namecontentType
- the content typeException
- the exceptionpublic boolean isAvailable()
public String getBaseUri()
public String getStorageIDParameter()
public String getFileNameParameter()
public String getContentTypeParameter()
public String getQuery()
Copyright © 2016. All Rights Reserved.