public final class URLContentAccess extends Object implements IURLContentAccess
Constructor and Description |
---|
URLContentAccess() |
Modifier and Type | Method and Description |
---|---|
static IURLContentAccess |
getInstance()
Returns a reference to the single instance.
|
IURLContent |
readContent(String url,
boolean useCache)
Read content
|
IURLContent |
readContent(String cacheID,
String url,
boolean useCache)
Read the content for a URL resource.
|
void |
storeContent(String url,
InputStream data,
String mimeType,
long contentLength,
String fileName,
Properties httpHeaders,
Properties fileHeaders,
boolean useMimeMultipart,
String user,
String pass)
Store content on a HTTP Server
|
public IURLContent readContent(String url, boolean useCache) throws URLContentAccessException
readContent
in interface IURLContentAccess
url
- TBD: Description of the incoming method parameteruseCache
- TBD: Description of the incoming method parameterURLContentAccessException
- Exception raised in failure situationpublic IURLContent readContent(String cacheID, String url, boolean useCache) throws URLContentAccessException
useCache
has no effect).readContent
in interface IURLContentAccess
cacheID
- The key to store/access the content in the cacheurl
- A full URLuseCache
- If the cache must be usedURLContentAccessException
- Exception raised in failure situationpublic void storeContent(String url, InputStream data, String mimeType, long contentLength, String fileName, Properties httpHeaders, Properties fileHeaders, boolean useMimeMultipart, String user, String pass) throws URLContentAccessException
storeContent
in interface IURLContentAccess
url
- The URLdata
- The data to sendmimeType
- The content typecontentLength
- The content lengthfileName
- The file name, can be nullhttpHeaders
- Additional HTTP header, can be nullfileHeaders
- File header lines, can be nulluseMimeMultipart
- true: send a mime multipart POST, false: PUT
requestuser
- Username for HTTP BASIC authentication, can be nullpass
- PAssword for HTTP BASIC authentication, can be nullURLContentAccessException
- Exception raised in failure situationpublic static IURLContentAccess getInstance() throws URLContentAccessException
URLContentAccessException
Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice