# com.bea.ide.core
ResourceSvc.IResourcePkg Interface

public static interface ResourceSvc.IResourcePkg

Simplifies code for getting multiple resources from a single string file. The resource package will store the prefix in "." separated form (note that you should not have directory paths that contain . for properties files, since . is special. the methods use the "." separated form. strings passed to the get* methods should already have the "." form in them. (i.e. use getString("strings.bar.foo") )

Enclosing class
  `ResourceSvc`

## Method Summary

`public `String`` | `findString`(`String` sStringId) Find a string by package relative ID.
`public `String`` | `format`(`String` sStringId, `Object`[] args) Get a formatted string resource from a relative string ID.
`public `String`` | `getString`(`String` sStringId) Get a string by package relative ID.
`public `String`` | `getStringId`(`String` sStringSubid) Get full ID from a package relative ID.

## Method Detail

### findString(String) Method

    public String findString(String sStringId)

Find a string by package relative ID. Note that this method differs from getString in that it does not assert if the string cannot be found e.g. "strings.workshop.shell.dialog.file.Title"

#### Parameters

sStringId
  full path to the string

#### Returns

the string obtained by loading the resource file and reading the corresponding string or null if either the file or string is not found.

### format(String, Object[]) Method

    public String format(String sStringId,
                         Object[] args)

Get a formatted string resource from a relative string ID.

#### Parameters

sStringId
  package relative string ID to format string

args
  array of objects used in format string

#### Returns

formatted string resource

Related Topics

``MessageFormat.format(String, Object[])``

### getString(String) Method

    public String getString(String sStringId)

Get a string by package relative ID. This method will assert if the string is not found. This will help catch cases where someone has left out a string. If it is possible to not have the string and still have a valid scenario, you should use findString instead.

#### Parameters

sStringId
  package relative string ID.

#### Returns

string resource or null if the string cannot be found

### getStringId(String) Method

    public String getStringId(String sStringSubid)

Get full ID from a package relative ID.

#### Parameters

sStringSubid
  the package relative ID.

#### Returns

String full ID.