|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IResourceLocator
Implements this interface to provide a custom file search algorithm. This class defines the file search algorithm used to locate files referenced in the design. For example, when parsing a design file and a library is encountered, a file locator will be used to locate the library. This interface is implemented differently for each environment. For example, the GUI might have its own file search requirement, while the deployment environment in application server has another.
The default file locator is
.
DefaultResourceLocator
The customized file search must be installed before opening designs. Set the
file locator using SessionHandle.setResourceLocator(IResourceLocator)
method.
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
java.net.URL |
findResource(ModuleHandle moduleHandle,
java.lang.String filename,
int type)
Searches the file by the given file name. |
Field Detail |
---|
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
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |