com.ibm.portal.state.accessors.url
Interface ResourceURLAccessor

All Superinterfaces:
Accessor, Disposable

public interface ResourceURLAccessor
extends Accessor

Create a URL object that points to a portal resource. Resources can either be icons or generic resources. The resources need to reside inside of the portal web application.

Since:
5.1

Method Summary
 URL getIconURL(java.lang.String aliasname, PortalResources.State type)
          Creates a URL object that points to an icon resource.
 URL getResourceURL(java.lang.String name, Decoration decoration, PortalResources.Type type)
          Creates a URL object that points to a generic resource.
 URL getResourceURL(java.lang.String name, Decoration decoration, PortalResources.Type type, PortalResources.State state)
          Creates a URL object that points to a generic resource.
 URL getResourceURL(java.lang.String name, Decoration decoration, PortalResources.Type type, PortalResources.State state, URLContext urlContext)
          Creates a URL object that points to a generic resource.
 URL getResourceURL(java.lang.String name, Decoration decoration, PortalResources.Type type, URLContext urlContext)
          Creates a URL object that points to a generic resource.
 URL getResourceURL(java.lang.String name, PortalResources.Type type)
          Creates a URL object that points to a generic resource.
 URL getResourceURL(java.lang.String name, PortalResources.Type type, PortalResources.State state)
          Creates a URL object that points to a generic resource.
 URL getResourceURL(java.lang.String name, Theme theme, PortalResources.Type type)
          Deprecated. Use getResourceURL(String, Decoration, com.ibm.portal.state.accessors.url.PortalResources.Type)
 URL getResourceURL(java.lang.String name, Theme theme, PortalResources.Type type, PortalResources.State state)
          Deprecated. Use getResourceURL(String, Decoration, com.ibm.portal.state.accessors.url.PortalResources.Type, com.ibm.portal.state.accessors.url.PortalResources.State)
 
Methods inherited from interface com.ibm.portal.Disposable
dispose
 

Method Detail

getIconURL

URL getIconURL(java.lang.String aliasname,
               PortalResources.State type)
               throws IconNotFoundException
Creates a URL object that points to an icon resource. The icon is identified by its file name and the state it is in.

The resouce lookup takes additional information of the request into account. This is the current locale, the client device, markup chosen for the client, and the theme name.

This method is a convenience method for geResourceURL called with type PortalResources.TYPE_ICONS.

Parameters:
aliasname - Name (without path) of the icon
type - State of the icon
Returns:
URL object that can be serialized to a stream
Throws:
IconNotFoundException - - if the icon was unknown

getResourceURL

URL getResourceURL(java.lang.String name,
                   Theme theme,
                   PortalResources.Type type)
                   throws ResourceNotFoundException,
                          InvalidResourceTypeException,
                          ModelException
Deprecated. Use getResourceURL(String, Decoration, com.ibm.portal.state.accessors.url.PortalResources.Type)

Creates a URL object that points to a generic resource. The resource is identified by its relative pathname, theme and resource type.

The resouce lookup takes additional information of the request into account. This is the current locale, the client device, markup chosen for the client. The theme is passed in as a parameter.

This method is a convenience method for geResourceURL called with state PortalResources.NO_STATE.

Parameters:
name - Name (potentially the relative path) of the resource
theme - theme of the resource
type - Portal resource type
Returns:
URL object that can be serialized to a stream
Throws:
ResourceNotFoundException - - if the resource could not be located
InvalidResourceTypeException - - if the resource type is unknown
ModelException
Since:
6.1.0

getResourceURL

URL getResourceURL(java.lang.String name,
                   Decoration decoration,
                   PortalResources.Type type)
                   throws ResourceNotFoundException,
                          InvalidResourceTypeException,
                          ModelException
Creates a URL object that points to a generic resource. The resource is identified by its relative pathname, decoration and resource type.

The resouce lookup takes additional information of the request into account. This is the current locale, the client device, markup chosen for the client. The Decoration is passed in as a parameter.

This method is a convenience method for geResourceURL called with state PortalResources.NO_STATE.

Parameters:
name - Name (potentially the relative path) of the resource. Path names ending with / indicate a directory and do only make sense with PortalResources.TYPE_FILES
decoration - Decoration of the resource
type - Portal resource type
Returns:
URL object that can be serialized to a stream
Throws:
ResourceNotFoundException - - if the resource could not be located
InvalidResourceTypeException - - if the resource type is unknown
ModelException
Since:
6.1.0.3

getResourceURL

URL getResourceURL(java.lang.String name,
                   Decoration decoration,
                   PortalResources.Type type,
                   URLContext urlContext)
                   throws ResourceNotFoundException,
                          InvalidResourceTypeException,
                          ModelException
Creates a URL object that points to a generic resource. The resource is identified by its relative pathname, decoration and resource type.

The resouce lookup takes additional information of the request into account. This is the current locale, the client device, markup chosen for the client. The Decoration is passed in as a parameter.

This method is a convenience method for geResourceURL called with state PortalResources.NO_STATE.

Parameters:
name - Name (potentially the relative path) of the resource. Path names ending with / indicate a directory and do only make sense with PortalResources.TYPE_FILES
decoration - Decoration of the resource
type - Portal resource type
urlContext - The UrlContext object specifies what kind of URL gets generated
Returns:
URL object that can be serialized to a stream
Throws:
ResourceNotFoundException - - if the resource could not be located
InvalidResourceTypeException - - if the resource type is unknown
ModelException
Since:
7.0

getResourceURL

URL getResourceURL(java.lang.String name,
                   PortalResources.Type type)
                   throws ResourceNotFoundException,
                          InvalidResourceTypeException
Creates a URL object that points to a generic resource. The resource is identified by its filename and resource type.

The resouce lookup takes additional information of the request into account. This is the current locale, the client device, markup chosen for the client, and the theme name.

This method is a convenience method for geResourceURL called with state PortalResources.NO_STATE.

Parameters:
name - File name (without path) of the resource
type - Portal resource type
Returns:
URL object that can be serialized to a stream
Throws:
ResourceNotFoundException - - if the resource could not be located
InvalidResourceTypeException - - if the resource type is unknown

getResourceURL

URL getResourceURL(java.lang.String name,
                   PortalResources.Type type,
                   PortalResources.State state)
                   throws ResourceNotFoundException,
                          InvalidResourceTypeException
Creates a URL object that points to a generic resource. The resource is identified by its filename and resource type. It could also can contain resource state that is used to further distinguish the lookup of the resource.

The resouce lookup takes additional information of the request into account. This is the current locale, the client device, markup chosen for the client, and the theme name.

Parameters:
name - Name (without path) of the resource
type - Portal resource type
state - Additional resource state
Returns:
URL object that can be serialized to a stream
Throws:
ResourceNotFoundException - - if the resource could not be located
InvalidResourceTypeException - - if the resource type is unknown

getResourceURL

URL getResourceURL(java.lang.String name,
                   Theme theme,
                   PortalResources.Type type,
                   PortalResources.State state)
                   throws ResourceNotFoundException,
                          InvalidResourceTypeException,
                          ModelException
Deprecated. Use getResourceURL(String, Decoration, com.ibm.portal.state.accessors.url.PortalResources.Type, com.ibm.portal.state.accessors.url.PortalResources.State)

Creates a URL object that points to a generic resource. The resource is identified by its filename and resource type. It could also can contain resource state that is used to further distinguish the lookup of the resource.

The resouce lookup takes additional information of the request into account. This is the current locale, the client device, markup chosen for the client. The theme is passed in as a parameter.

Parameters:
name - Name (potentially the relative path) of the resource
theme - theme of the resource, not null
type - Portal resource type
state - Additional resource state
Returns:
URL object that can be serialized to a stream
Throws:
ResourceNotFoundException - - if the resource could not be located
InvalidResourceTypeException - - if the resource type is unknown
ModelException
Since:
6.1.0

getResourceURL

URL getResourceURL(java.lang.String name,
                   Decoration decoration,
                   PortalResources.Type type,
                   PortalResources.State state)
                   throws ResourceNotFoundException,
                          InvalidResourceTypeException,
                          ModelException
Creates a URL object that points to a generic resource. The resource is identified by its filename and resource type. It could also can contain resource state that is used to further distinguish the lookup of the resource.

The resouce lookup takes additional information of the request into account. This is the current locale, the client device, markup chosen for the client. The decoration is passed in as a parameter.

Parameters:
name - Name (potentially the relative path) of the resource. Path names ending with / indicate a directory and do only make sense with PortalResources.TYPE_FILES
decoration - Decoration of the resource, not null
type - Portal resource type
state - Additional resource state
Returns:
URL object that can be serialized to a stream
Throws:
ResourceNotFoundException - - if the resource could not be located
InvalidResourceTypeException - - if the resource type is unknown
ModelException
Since:
6.1.0.3

getResourceURL

URL getResourceURL(java.lang.String name,
                   Decoration decoration,
                   PortalResources.Type type,
                   PortalResources.State state,
                   URLContext urlContext)
                   throws ResourceNotFoundException,
                          InvalidResourceTypeException,
                          ModelException
Creates a URL object that points to a generic resource. The resource is identified by its filename and resource type. It could also can contain resource state that is used to further distinguish the lookup of the resource.

The resouce lookup takes additional information of the request into account. This is the current locale, the client device, markup chosen for the client. The decoration is passed in as a parameter.

Parameters:
name - Name (potentially the relative path) of the resource. Path names ending with / indicate a directory and do only make sense with PortalResources.TYPE_FILES
decoration - Decoration of the resource, not null
type - Portal resource type
state - Additional resource state
urlContext - The UrlContext object specifies what kind of URL gets generated
Returns:
URL object that can be serialized to a stream
Throws:
ResourceNotFoundException - - if the resource could not be located
InvalidResourceTypeException - - if the resource type is unknown
ModelException
Since:
7.0