com.sap.tc.webdynpro.services.sal.datatransport.api
Interface IWDResource
- All Known Subinterfaces:
- IWDCachedResource, IWDCachedWebResource, IWDOutputMassDatasource, IWDWebResource
- public interface IWDResource
Type Classification:
This interface represents a general resource with the properties name and type of the resource.
Its binary representation is the inputstream, which can be read. Each resource is available by a specific
url connection. The url is returned in the toString method.
This type is bindable to the resource property of fileup- and download-UIElement. Therefore a context attribute of type
resource of the uielement definitions must be created.
For a detailed explanation of API classification see the Web Dynpro Compatibility Guide
read
public InputStream read(boolean readMultiple)
throws IOException
- Parameters:
readMultiple - - true if the stream will be read serveral times, false if it is read exacly one time.
- Returns:
- the inputStream, which can be read. If this inputStream is read several times (more than once),
some inpustreams have to be copied first, because it is not possible to reset them. For this, specify the
doCopy parameter.
- Throws:
IOException
getResourceName
public String getResourceName()
- Returns:
- the resource name
getResourceType
public WDWebResourceType getResourceType()
- Returns:
- the resourcetype of the stream
toString
public String toString()
- Returns:
- url based string representation. It returns the url by which the resource is available.
getUrl
public String getUrl(int fileDownloadBehaviour)
- Parameters:
fileDownloadBehaviour - - specifies additionaly, how the download behaviour is. This is specified by the
the ordinal number of the enumeration described by the class com.sap.tc.webdynpro.clientserver.uielib.standard.api.WDFileDownloadBehaviour.
Allowed values are:
AUTO - the default behaviour of the mimetype is used
ALLOW_SAVE - a filedownload popup is shown, where one can confirm to save or to open
OPEN_INPLACE - the file is shown by the mimetype-specific editor inplace of the browser.
Please do specify this value by using enumeration.
- Returns:
- the url to access the instance of IWDResource.
Copyright 2006 SAP AG Complete Copyright Notice