Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.report.model.api
Class DefaultResourceLocator

    java.lang.Object
      org.eclipse.birt.report.model.api.DefaultResourceLocator

All Implemented Interfaces:
  IResourceLocator

    public class DefaultResourceLocator

extends java.lang.Object
implements IResourceLocator

The default implementation for interface `IResourceLocator`. This implementation is empty and does nothing to search the resource.

See Also:
  `IResourceLocator`, `SessionHandle`

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.

Constructor Summary
`DefaultResourceLocator()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### FRAGMENT_RESOURCE_HOST

    public static final java.lang.String FRAGMENT_RESOURCE_HOST

  The host name of the fragments where inner resources are located.

  See Also:
    Constant Field Values

### IMAGE

    public static final int IMAGE

  The type of the images to search

  See Also:
    Constant Field Values

### LIBRARY

    public static final int LIBRARY

  The type of the libraries to search

  See Also:
    Constant Field Values

### CASCADING_STYLE_SHEET

    public static final int CASCADING_STYLE_SHEET

  The type of the cascading style sheet to search.

  See Also:
    Constant Field Values

### JAR_FILE

    public static final int JAR_FILE

  The type for the jar file. Includes .jar type.

  See Also:
    Constant Field Values

### MESSAGE_FILE

    public static final int MESSAGE_FILE

  The type for the message file.

  See Also:
    Constant Field Values

### OTHERS

    public static final int OTHERS

  The other types.

  See Also:
    Constant Field Values

Constructor Detail

### DefaultResourceLocator

    public DefaultResourceLocator()

Method Detail

### findResource

    public java.net.URL findResource(ModuleHandle moduleHandle,
                                     java.lang.String fileName,
                                     int type)

  Searches the file by the given file name. The actual search algorithm will be different in different environment. The file type is just helpful when different file searching steps for different files are required. Because new file type will be added if design file includes new file, the default searching steps are encouraged for unknown file type to improve robustness.

  Parameters:
    `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`.
  Returns:
    The `URL` object. `null` if the file can not be found.

### findResource

    public 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. The actual search algorithm will be different in different environment. The file type is just helpful when different file searching steps for different files are required. Because new file type will be added if design file includes new file, the default searching steps are encouraged for unknown file type to improve robustness.

  Parameters:
    `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 information
  Returns:
    The `URL` object. `null` if the file can not be found.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.