com.sapportals.portal.prt.resource

Interface IResource

All Known Subinterfaces:
IPropertiesResource

public interface IResource

The IResource interface is an abstract view of resources. These resources can either be basic resources like applets, scripts, images, static pages or more complex resources like xml files or java properties file. The main purpose of the IResource interface is to provide a uniform way to access to component and service resources. The component can fetch a resource from the IPortalComponentRequest interface and add it to the response calling the IPortalComponentResponse.addResource(IResource) method.

See Also:
IPropertiesResource, IResourceInformation, IPortalComponentRequest.getResource(String, String, String), IPortalComponentResponse.addResource(IResource)

Field Summary
static String APPLET
          The applet resource type Default scope: public
Default extension: none
static String CSS
          The CSS resource type Default scope: public
Default extension: .css
static String IMAGE
          The IMAGE resource type Default scope: public
Default extension: .gif
static String JSP
          The JSP resource types Default scope: private
Default extension: .jsp
static String PAGELET
           
static String PRIVATE_SCOPE
          private scope constant
static String PROFILE
          The PROFILE resource type Default scope: private
Default extension: .properties
static String PROPERTY
          The PROPERTY resource type for java property files Default scope: private
Default extension: .properties
static String PUBLIC_SCOPE
          public scope constant
static String SCOPE_SEPARATOR
          scope separator
static String SCRIPT
          The SCRIPT resource type for javascript code Default scope: public
Default extension: .js
static String STATIC_PAGE
          The STATIC PAGE resource type for static HTML pages Default scope: public
Default extension: .html
static String SYSTEM_RESOURCE
          Internal constant for system resources.
static String XML
          The XML resource type Default scope: private
Default extension: .xml
 
Method Summary
 IResourceInformation getResourceInformation()
          Returns the IResourceInformation object attached to this resource
 void init(IResourceInformation resourceInformation)
          All resources have to provide an init method which is called by the ResourceManager just after the creation of new instance of the resource.
 boolean isAvailable()
          Checks whether the resource exists or not.
 

Field Detail

SYSTEM_RESOURCE

static final String SYSTEM_RESOURCE
Internal constant for system resources.

See Also:
Constant Field Values

PUBLIC_SCOPE

static final String PUBLIC_SCOPE
public scope constant

See Also:
Constant Field Values

PRIVATE_SCOPE

static final String PRIVATE_SCOPE
private scope constant

See Also:
Constant Field Values

SCOPE_SEPARATOR

static final String SCOPE_SEPARATOR
scope separator

See Also:
Constant Field Values

APPLET

static final String APPLET
The applet resource type

Default scope: public
Default extension: none

See Also:
Constant Field Values

CSS

static final String CSS
The CSS resource type

Default scope: public
Default extension: .css

See Also:
Constant Field Values

IMAGE

static final String IMAGE
The IMAGE resource type

Default scope: public
Default extension: .gif

See Also:
Constant Field Values

JSP

static final String JSP
The JSP resource types

Default scope: private
Default extension: .jsp

See Also:
Constant Field Values

PAGELET

static final String PAGELET
See Also:
Constant Field Values

STATIC_PAGE

static final String STATIC_PAGE
The STATIC PAGE resource type for static HTML pages

Default scope: public
Default extension: .html

See Also:
Constant Field Values

SCRIPT

static final String SCRIPT
The SCRIPT resource type for javascript code

Default scope: public
Default extension: .js

See Also:
Constant Field Values

PROFILE

static final String PROFILE
The PROFILE resource type

Default scope: private
Default extension: .properties

See Also:
Constant Field Values

PROPERTY

static final String PROPERTY
The PROPERTY resource type for java property files

Default scope: private
Default extension: .properties

See Also:
Constant Field Values

XML

static final String XML
The XML resource type

Default scope: private
Default extension: .xml

See Also:
Constant Field Values
Method Detail

getResourceInformation

IResourceInformation getResourceInformation()
Returns the IResourceInformation object attached to this resource

Returns:
the IResourceInformation object attached to this resource.

init

void init(IResourceInformation resourceInformation)
All resources have to provide an init method which is called by the ResourceManager just after the creation of new instance of the resource.

Parameters:
resourceInformation - the IResourceInformation object attached to this resource.

isAvailable

boolean isAvailable()
Checks whether the resource exists or not.

Returns:
true if the resource exists.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN
[sap.com] EP-BASIS-API [sap.com] epbc.prtapi._apideprecated default EP-PIN-PRT


Copyright 2011 SAP AG Complete Copyright Notice