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 java.lang.String APPLET
          The applet resource type Default scope: public
Default extension: none
static java.lang.String CSS
          The CSS resource type Default scope: public
Default extension: .css
static java.lang.String IMAGE
          The IMAGE resource type Default scope: public
Default extension: .gif
static java.lang.String JSP
          The JSP resource types Default scope: private
Default extension: .jsp
static java.lang.String PAGELET
           
static java.lang.String PRIVATE_SCOPE
          private scope constant
static java.lang.String PROFILE
          The PROFILE resource type Default scope: private
Default extension: .properties
static java.lang.String PROPERTY
          The PROPERTY resource type for java property files Default scope: private
Default extension: .properties
static java.lang.String PUBLIC_SCOPE
          public scope constant
static java.lang.String SCOPE_SEPARATOR
          scope separator
static java.lang.String SCRIPT
          The SCRIPT resource type for javascript code Default scope: public
Default extension: .js
static java.lang.String STATIC_PAGE
          The STATIC PAGE resource type for static HTML pages Default scope: public
Default extension: .html
static java.lang.String SYSTEM_RESOURCE
          Internal constant for system resources.
static java.lang.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

public static final java.lang.String SYSTEM_RESOURCE
Internal constant for system resources.

PUBLIC_SCOPE

public static final java.lang.String PUBLIC_SCOPE
public scope constant

PRIVATE_SCOPE

public static final java.lang.String PRIVATE_SCOPE
private scope constant

SCOPE_SEPARATOR

public static final java.lang.String SCOPE_SEPARATOR
scope separator

APPLET

public static final java.lang.String APPLET
The applet resource type

Default scope: public
Default extension: none


CSS

public static final java.lang.String CSS
The CSS resource type

Default scope: public
Default extension: .css


IMAGE

public static final java.lang.String IMAGE
The IMAGE resource type

Default scope: public
Default extension: .gif


JSP

public static final java.lang.String JSP
The JSP resource types

Default scope: private
Default extension: .jsp


PAGELET

public static final java.lang.String PAGELET

STATIC_PAGE

public static final java.lang.String STATIC_PAGE
The STATIC PAGE resource type for static HTML pages

Default scope: public
Default extension: .html


SCRIPT

public static final java.lang.String SCRIPT
The SCRIPT resource type for javascript code

Default scope: public
Default extension: .js


PROFILE

public static final java.lang.String PROFILE
The PROFILE resource type

Default scope: private
Default extension: .properties


PROPERTY

public static final java.lang.String PROPERTY
The PROPERTY resource type for java property files

Default scope: private
Default extension: .properties


XML

public static final java.lang.String XML
The XML resource type

Default scope: private
Default extension: .xml

Method Detail

getResourceInformation

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

Returns:
the IResourceInformation object attached to this resource.

init

public 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

public boolean isAvailable()
Checks whether the resource exists or not.
Returns:
true if the resource exists.