com.sapportals.portal.pb.contentservice
Interface IPackageInformation


public interface IPackageInformation

Used by the IContentFetchingService as a container for all of the required properties for openning the connection and requesting the content


Method Summary
 void addRequestParameter(javax.naming.directory.Attribute requestParameter)
          add a url parameter to the request
 void collectCookies(com.sapportals.portal.prt.component.IPortalComponentRequest request)
          Use to request the IPackageInformation to collect the cookies from the request
 void collectHeaders(com.sapportals.portal.prt.component.IPortalComponentRequest request)
          Use this method to colelct all of the request headers from the Portal Request, and let the package to manipulate the headers to fit the service needs This method overrides any prior setHeader() calls, so if need, it should be called before the setHeader()
 void forceReload(boolean forceReload)
          not supported at this stage
 void setAutoRefresh(boolean enable, long refreshInterval)
          control automatic refresh of the iView.
 void setCacheExpirationTimeout(long timeout)
          Set the cache expiration timeout of the content in the cache
 void setCachingLevel(java.lang.String cachingLevel)
          set the caching level of the package
 void setConnectionTimeout(long timeout)
          Set the amount of time the server should wait for the connection to finish
 void setContextName(java.lang.String contextName)
          set the context name of the component that uses the service.
 void setCookie(javax.servlet.http.Cookie cookie)
          Set a cookie to use in the request.
 void setCookieAuthentication(javax.servlet.http.Cookie authCookie)
          Deprecated. Please use the setCookie(Cookie cookie) method instead for setting the cookie
and use the setSimpleAuthenticationMode with Authentication Mode SAP_COOKIE
 void setEnableClientSideCaching(boolean enable)
          Enable or disable the use of client side caching.
 void setFullProxyMode(boolean fullProxyMode, boolean tunnelActivationRequired)
          Notify the fething service that this request should be made in a full proxy mode - all consequent request must also pass through the fetching service.
 void setHeader(java.lang.String name, java.lang.String value)
          Set a request header.
 void setIHTMLProcessor(IHTMLProcessor htmlProcessor, boolean recursiveProcessing)
          This method is used to set a processor for HTML pages.
 void setLocale(java.util.Locale locale)
          Set the Locale for this request
 void setOverrideBackEndCacheControl(boolean override)
          Set whether the content fetching service should overrider the client-side (browser) cache control directive or not.
 void setParseContent(boolean parse)
          This method is used to indicate to the service whether to parse the response.
 void setPortalDomain(java.lang.String portalDomain)
          Use to configure the Portal domain, if the request is not used for fetching the data.
 void setPortalUserId(java.lang.String portalUserId)
          Set the current portal user Id.
 void setPostBody(java.lang.String postBody)
          Set the POST body for the request if required.
 void setRequestParameters(javax.naming.directory.Attribute[] requestParameters)
          Set an array of Attribute objects that represent the request parameters that should be forwarded to the server.
 void setRequestParameters(javax.naming.directory.Attributes requestParameters)
          Set a full collection of url paramerters that will be added to the request.
 void setSimpleAuthenticationMode(AuthenticationMode authenticationMode, java.lang.String userId, java.lang.String password)
          Set the authentication mode to use for this request.
 void setUMAuthentication(AuthenticationMode authenticationMode, java.lang.String systemId, java.lang.Object userObj)
          Not supported at this stage
 void setURL(java.lang.String method, java.lang.String URL)
          Set the method of the request (GET, POST) and the URL that should be requested
 void setUserAgent(java.lang.String useragent)
          Set the user agent (browser type) used for the request
 

Method Detail

setURL

public void setURL(java.lang.String method,
                   java.lang.String URL)
Set the method of the request (GET, POST) and the URL that should be requested
Parameters:
method -  
URL -  

setPostBody

public void setPostBody(java.lang.String postBody)
Set the POST body for the request if required.
Parameters:
postBody -  

setHeader

public void setHeader(java.lang.String name,
                      java.lang.String value)
Set a request header. Can be used as required
Parameters:
name - The name of the header to set
value -  

collectHeaders

public void collectHeaders(com.sapportals.portal.prt.component.IPortalComponentRequest request)
Use this method to colelct all of the request headers from the Portal Request, and let the package to manipulate the headers to fit the service needs This method overrides any prior setHeader() calls, so if need, it should be called before the setHeader()
Parameters:
request - the Portal request

setUserAgent

public void setUserAgent(java.lang.String useragent)
Set the user agent (browser type) used for the request
Parameters:
useragent -  

setConnectionTimeout

public void setConnectionTimeout(long timeout)
Set the amount of time the server should wait for the connection to finish
Parameters:
timeout -  

setCacheExpirationTimeout

public void setCacheExpirationTimeout(long timeout)
Set the cache expiration timeout of the content in the cache
Parameters:
timeout -  

setLocale

public void setLocale(java.util.Locale locale)
Set the Locale for this request
Parameters:
locale -  

setSimpleAuthenticationMode

public void setSimpleAuthenticationMode(AuthenticationMode authenticationMode,
                                        java.lang.String userId,
                                        java.lang.String password)
Set the authentication mode to use for this request. Use the AuthenticationMode obect to set the authentication/
If basic authentication is used, set the user ID and paswword that should be used.
Parameters:
authenticationMode -  
userId -  
password -  

setUMAuthentication

public void setUMAuthentication(AuthenticationMode authenticationMode,
                                java.lang.String systemId,
                                java.lang.Object userObj)
Not supported at this stage
Parameters:
authenticationMode -  
systemId -  
userObj -  

setCookieAuthentication

public void setCookieAuthentication(javax.servlet.http.Cookie authCookie)
Deprecated. Please use the setCookie(Cookie cookie) method instead for setting the cookie
and use the setSimpleAuthenticationMode with Authentication Mode SAP_COOKIE

Set to use a specific cookie for authentication.
Parameters:
authCookie -  

setCookie

public void setCookie(javax.servlet.http.Cookie cookie)
Set a cookie to use in the request. Could be used as required Manually add cookies to the request
Parameters:
cookie - the cookie to add

collectCookies

public void collectCookies(com.sapportals.portal.prt.component.IPortalComponentRequest request)
Use to request the IPackageInformation to collect the cookies from the request
Parameters:
request -  

setPortalDomain

public void setPortalDomain(java.lang.String portalDomain)
Use to configure the Portal domain, if the request is not used for fetching the data. Otherwise the service will use the request to obtain the information
Parameters:
portalDomain -  

forceReload

public void forceReload(boolean forceReload)
not supported at this stage
Parameters:
forceReload -  

setContextName

public void setContextName(java.lang.String contextName)
set the context name of the component that uses the service. If the request is used, the service will obtain the information by itself.
Parameters:
contextName -  

addRequestParameter

public void addRequestParameter(javax.naming.directory.Attribute requestParameter)
add a url parameter to the request
Parameters:
requestParameter -  

setRequestParameters

public void setRequestParameters(javax.naming.directory.Attribute[] requestParameters)
Set an array of Attribute objects that represent the request parameters that should be forwarded to the server. This method ensures that the order of the parameters in the query string will be the same as passed to the method. This method replaces all of the request parameters currently assigned, if any, with the new array that is passed
Parameters:
requestParameters - Array of Attribute objects, each representing a parameter which will be added to the request

setRequestParameters

public void setRequestParameters(javax.naming.directory.Attributes requestParameters)
Set a full collection of url paramerters that will be added to the request. Using this method will not ensure the order of the request parameters in the query string
Parameters:
requestParameters -  

setCachingLevel

public void setCachingLevel(java.lang.String cachingLevel)
set the caching level of the package
Parameters:
cachingLevel - possible values: NONE, Shared, User and so on

setParseContent

public void setParseContent(boolean parse)
This method is used to indicate to the service whether to parse the response. Parsing the response means that the service is looking for sub-elements that should be fetched and be cached. When the content is not parsed, it meanse that it is passed to the browser as is, and no sub-elements are searched. For example, URL iViews should not parse the content because it is not likely that sub-contnet parts will be cached, only the outer HTML. By default the service assumes that it needs to parse the content. (default value is true)
Parameters:
parse - a boolean value indicating whether to parse the content or not.

setEnableClientSideCaching

public void setEnableClientSideCaching(boolean enable)
Enable or disable the use of client side caching. Client side caching means that the browser cache the response. Using the browser cache can speed up the response time. The default value of the property is false - disable the client side caching
Parameters:
enable -  

setOverrideBackEndCacheControl

public void setOverrideBackEndCacheControl(boolean override)
Set whether the content fetching service should overrider the client-side (browser) cache control directive or not. If set to true, the content fetching service will decide whether to use the browser cache or not according to the SetEnableClientSideCaching definition. and will set the cache control to all sub-elements If set to false, the content fetching service will only manage the cache expirtaion times of elements, and will leave the control of enabling the browser cache to the headers received from the backend system. In this case the backend system can define that some elements will be stored in the browser cache and some will not. The default value for this property if true - Override the backend client side caching control
Parameters:
override -  

setIHTMLProcessor

public void setIHTMLProcessor(IHTMLProcessor htmlProcessor,
                              boolean recursiveProcessing)
This method is used to set a processor for HTML pages. It enabled clients of the service to have a way to do transformations on the respose HTML before it is written to the browser
Parameters:
htmlProcessor - The IHTMLProcessor implementation
recursiveProcessing - boolean to indicate if the HTML processing should run also on sub content (if available).

setFullProxyMode

public void setFullProxyMode(boolean fullProxyMode,
                             boolean tunnelActivationRequired)
Notify the fething service that this request should be made in a full proxy mode - all consequent request must also pass through the fetching service. This mode will required some parsing of the content
Parameters:
fullProxyMode -  
tunnelActivationRequired -  

setAutoRefresh

public void setAutoRefresh(boolean enable,
                           long refreshInterval)
control automatic refresh of the iView. If enabled, the service will add a meta tag that will automatically refresh the iView after the interval is finished. The refresh does not invalidate the cache. It performse a simple reload of the iView. The content that is returned is the most updated content in the cache
Parameters:
enable - boolean value to set if the automatic refrehs is enabled or not
refreshInterval - interval in seconds between each refresh

setPortalUserId

public void setPortalUserId(java.lang.String portalUserId)
Set the current portal user Id. The portal user ID is used in order to create a User cache instead of a shared cache
Parameters:
portalUserId -