The Manifest class.
Creates and initializes a manifest wrapper which provides API access to the content of the manifest.
new sap.ui.core.Manifest(oManifest, mOptions?)
Param | Type | Default Value | Description |
---|---|---|---|
oManifest | object | the manifest object |
|
mOptions? | object | (optional) the configuration options |
|
componentName? | string | (optional) the name of the component |
|
baseUrl? | string | (optional) the base URL which is used to resolve relative URLs against |
|
process? | boolean | true | (optional) Flag whether the manifest object should be processed or not which means that the placeholders will be replaced with resource bundle values |
activeTerminologies? | string[] | (optional) A list of active terminologies. If the |
Method | Description |
---|---|
_preprocess |
Generic preprocessing function. Current features: - resolve "ui5://..." urls. - collect "i18n placeholder properties" |
_processResourceConfiguration |
Function that loops through the model config and resolves the bundle urls of terminologies relative to the component or relative to the manifest |
sap.ui.core.Manifest.extend |
Creates a new subclass of class sap.ui.core.Manifest with name
|
getComponentName |
Returns the Component name which is defined in the manifest as |
getEntry |
Returns the configuration of a manifest section or the value for a specific path. If no key is specified, the return value is null. Example: The configuration above can be accessed in the following ways:
By section/namespace returns the configuration for the specified manifest section and by path allows to specify a concrete path to a dedicated entry inside the manifest. The path syntax always starts with a slash (/). |
getJson |
Returns the manifest defined in the metadata of the component. If not specified, the return value is null. |
sap.ui.core.Manifest.getMetadata |
Returns a metadata object for class sap.ui.core.Manifest. |
getRawJson |
Returns the raw manifest defined in the metadata of the component. If not specified, the return value is null. |
sap.ui.core.Manifest.load |
Function to load the manifest by URL |
resolveUri |
Resolves the given URI relative to the Component by default or optional relative to the manifest when passing 'manifest' as second parameter. |
Generic preprocessing function. Current features: - resolve "ui5://..." urls. - collect "i18n placeholder properties"
Param | Type | DefaultValue | Description |
---|---|---|---|
args | object |
arguments map |
|
resolveUI5Urls | boolean |
whether "ui5://..." URLs should be resolved |
|
i18nProperties | array |
an array into which all i18n placeholders will be pushed |
Function that loops through the model config and resolves the bundle urls of terminologies relative to the component or relative to the manifest
Param | Type | DefaultValue | Description |
---|---|---|---|
mSettings | object |
Map with model config settings |
|
sBaseBundleUrlRelativeTo | string |
BundleUrlRelativeTo info from base config |
|
bAlreadyResolvedOnRoot | boolean |
Whether the bundleUrl was already resolved (usually by the sap.ui.core.Component) |
Creates a new subclass of class sap.ui.core.Manifest with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.base.Object.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Returns the Component name which is defined in the manifest as sap.ui5/componentName
or sap.app/id
Returns the configuration of a manifest section or the value for a specific path. If no key is specified, the return value is null.
Example: { "sap.ui5": { "dependencies": { "libs": { "sap.m": {} }, "components": { "my.component.a": {} } } });
The configuration above can be accessed in the following ways:
oManifest.getEntry("sap.ui5")
oManifest.getEntry("/sap.ui5/dependencies/libs")
By section/namespace returns the configuration for the specified manifest section and by path allows to specify a concrete path to a dedicated entry inside the manifest. The path syntax always starts with a slash (/).
Param | Type | DefaultValue | Description |
---|---|---|---|
sPath | string |
Either the manifest section name (namespace) or a concrete path |
Returns the manifest defined in the metadata of the component. If not specified, the return value is null.
Returns the raw manifest defined in the metadata of the component. If not specified, the return value is null.
Function to load the manifest by URL
Param | Type | DefaultValue | Description |
---|---|---|---|
mOptions | object |
the configuration options |
|
manifestUrl | string |
URL of the manifest |
|
componentName | string |
name of the component |
|
async | boolean | false |
Flag whether to load the manifest async or not |
failOnError | boolean | true |
Flag whether to fail if an error occurs or not If set to |
processJson | function |
Callback for asynchronous processing of the loaded manifest. The callback receives the parsed manifest object and must return a Promise which resolves with an object. It allows to early access and modify the manifest object. |
|
activeTerminologies | string[] |
A list of active terminologies. The order of the given active terminologies is significant. The ResourceBundle API documentation describes the processing behavior in more detail. Please have a look at this dev-guide chapter for general usage instructions: Text Verticalization. |
Resolves the given URI relative to the Component by default or optional relative to the manifest when passing 'manifest' as second parameter.
Param | Type | DefaultValue | Description |
---|---|---|---|
sUri | string |
URI to resolve as string |
|
sRelativeTo | string | 'component' |
defines to which base URI the given URI will be resolved to; one of ‘component' (default) or 'manifest' |