public interface IResourceLocator
The default file locator is
.
DefaultResourceLocator
The customized file search must be installed before opening designs. Set the
file locator using
SessionHandleImpl.setResourceLocator(IResourceLocator)
method.
Modifier and Type | Field and Description |
---|---|
static int |
ALL_RESOURCE
The location mask which searches all the locations.
|
static java.lang.String |
BIRT_RESOURCELOCATOR_SEARCH_LOCATION
Key for the location to search in appContext.
|
static int |
CASCADING_STYLE_SHEET
The type of the cascading style sheet to search.
|
static java.lang.String |
FRAGMENT_RESOURCE_HOST
The host name of the fragments where inner resources are located.
|
static int |
IMAGE
The type of the images to search
|
static int |
JAR_FILE
The type for the jar file.
|
static int |
LIBRARY
The type of the libraries to search
|
static int |
MESSAGE_FILE
The type for the message file.
|
static int |
OTHERS
The other types.
|
static int |
RESOURCE_BUNDLE
The location mask which searches in the resource bundle.
|
static int |
RESOURCE_DESIGN
The location mask which searches the file relative to design.
|
static int |
RESOURCE_FILEPATH
The location mask which searches in the file system with path.
|
static int |
RESOURCE_FOLDER
The location mask which searches in the resource folder.
|
Modifier and Type | Method and Description |
---|---|
java.net.URL |
findResource(ModuleHandle moduleHandle,
java.lang.String fileName,
int type)
Searches the file by the given file name.
|
java.net.URL |
findResource(ModuleHandle moduleHandle,
java.lang.String fileName,
int type,
java.util.Map appContext)
Searches the file by the given file name and the given user's information.
|
static final int ALL_RESOURCE
static final java.lang.String FRAGMENT_RESOURCE_HOST
static final int IMAGE
static final int LIBRARY
static final int CASCADING_STYLE_SHEET
static final int JAR_FILE
static final int MESSAGE_FILE
static final int OTHERS
static final java.lang.String BIRT_RESOURCELOCATOR_SEARCH_LOCATION
static final int RESOURCE_FILEPATH
static final int RESOURCE_BUNDLE
static final int RESOURCE_FOLDER
static final int RESOURCE_DESIGN
java.net.URL findResource(ModuleHandle moduleHandle, java.lang.String fileName, int type)
moduleHandle
- The module to tell the search context. This could be null if
the search algorithm does not need the design. It can be the
instance of one of ReportDesignHandle
and
LibraryHandle
.fileName
- The file name to be searched. This could be an absolute path
or a relative path.type
- The type of the file to search. The value must be one of
IMAGE
,LIBRARY
,
CASCADING_STYLE_SHEET
and MESSAGEFILE
.URL
object. null
if the file
can not be found.java.net.URL findResource(ModuleHandle moduleHandle, java.lang.String fileName, int type, java.util.Map appContext)
moduleHandle
- The module to tell the search context. This could be null if
the search algorithm does not need the design. It can be the
instance of one of ReportDesignHandle
and
LibraryHandle
.fileName
- The file name to be searched. This could be an absolute path
or a relative path.type
- The type of the file to search. The value must be one of
IMAGE
,LIBRARY
,
CASCADING_STYLE_SHEET
and MESSAGEFILE
.appContext
- The map containing the user's informationURL
object. null
if the file
can not be found.Copyright © 2014 OpenText Corp. All rights reserved.