com.sapportals.wcm.util.urlcontentaccess

Interface IURLContentAccess

All Known Implementing Classes:
URLContentAccess

public interface IURLContentAccess

This interface provides access to resources that are identified by URLs. In particular it is used to access the SAP content server via HTTP.


Method Summary
 IURLContent readContent(String url, boolean useCache)
          Read the content for a URL resource.
 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
 

Method Detail

readContent

IURLContent readContent(String url,
                        boolean useCache)
                        throws URLContentAccessException
Read the content for a URL resource.

Parameters:
url - A full URL
useCache - If the cache must be used
Returns:
Reference to a content object
Throws:
URLContentAccessException - Exception raised in failure situation

readContent

IURLContent readContent(String cacheID,
                        String url,
                        boolean useCache)
                        throws URLContentAccessException
Read the content for a URL resource. Note: Content from plug-ins is not cached (parameter useCache has no effect).

Parameters:
cacheID - The key to store/access the content in the cache
url - A full URL
useCache - If the cache must be used
Returns:
Reference to a content object
Throws:
URLContentAccessException - Exception raised in failure situation

storeContent

void storeContent(String url,
                  InputStream data,
                  String mimeType,
                  long contentLength,
                  String fileName,
                  Properties httpHeaders,
                  Properties fileHeaders,
                  boolean useMimeMultipart,
                  String user,
                  String pass)
                  throws URLContentAccessException
Store content on a HTTP Server

Parameters:
url - The URL
data - The data to send
mimeType - The content type
contentLength - The content length
fileName - The file name, can be null
httpHeaders - Additional HTTP header, can be null
fileHeaders - File header lines, can be null
useMimeMultipart - true: send a mime multipart POST, false: PUT request
user - Username for HTTP BASIC authentication, can be null
pass - PAssword for HTTP BASIC authentication, can be null
Throws:
URLContentAccessException - Exception raised in failure situation
Access Rights

This class can be accessed from:


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 2014 SAP AG Complete Copyright Notice