API Docs for: 0.4
Show:

RSAddonYUI Class

Methods

_captureYUIModuleDetails

(
  • res
)
Nothing private

If the resource is a YUI module, augments its metadata with metadata about the YUI module.

Parameters:

  • res Object

    resource metadata

Returns:

Nothing:

_getYUIDependencies

(
  • env
  • poslKey
  • lang
  • module
)
Object private

Returns precomputed dependencies saved by _setYuiSorted.

Parameters:

  • env String

    runtime environment (either client, or server)

  • poslKey String

    key (representing the POSL) under which to save the moduldes

  • lang String

    YUI language code

  • module String

    YUI module name for which the precomputed dependencies are for

Returns:

Object: the precomputed dependencies

_makeYUIModuleConfig

(
  • env
  • res
)
Object private

Generates the YUI configuration for the resource.

Parameters:

  • env String

    runtime environment (either client, or server)

  • res Object

    the resource metadata

Returns:

Object: the YUI configuration for the module

_precomputeYUIDependencies

(
  • lang
  • env
  • mojit
  • modules
  • required
)
Object private

Precomputes a set of dependencies.

Parameters:

  • lang String

    YUI language code

  • env String

    runtime environment (either client, or server)

  • mojit String

    name of the mojit

  • modules Object

    YUI module metadata

  • required Object

    lookup hash of YUI module names that are required

Returns:

Object: precomputed (and sorted) module dependencies

_setYUIDependencies

(
  • env
  • poslKey
  • lang
  • module
  • sorted
)
Nothing private

Saves the precomputed YUI module dependencies for later.

Parameters:

  • env String

    runtime environment (either client, or server)

  • poslKey String

    key (representing the POSL) under which to save the moduldes

  • lang String

    YUI language code

  • module String

    YUI module name for which the precomputed dependencies are for

  • sorted Object

    the precomputed dependencies

Returns:

Nothing:

addResourceVersion

(
  • res
)
Nothing

Using AOP, this is called before the ResourceStore's version. If the resource is a YUI module, augments the metadata with details about the YUI module.

Parameters:

  • res Object

    resource version metadata

Returns:

Nothing:

findResourceVersionByConvention

(
  • source
  • mojitType
)
Object | | Null

Using AOP, this is called after the ResourceStore's version.

Parameters:

  • source Object

    metadata about where the resource is located

  • mojitType String

    name of mojit to which the resource likely belongs

Returns:

Object | | Null: for yui modules or lang bundles, returns metadata signifying that

getConfigAllMojits

(
  • env
  • ctx
)
Object

Returns a datastructure which tells a YUI instance where to find the YUI modules that are in all the mojits.

Parameters:

  • env String

    runtime environment (either client, or server)

  • ctx Object

    runtime context

Returns:

Object: datastructure for configuring YUI

getConfigShared

(
  • env
  • ctx
  • justApp
)
Object

Returns a datastructure which tells a YUI instance where to find the YUI modules that are shared among all mojits.

Parameters:

  • env String

    runtime environment (either client, or server)

  • ctx Object

    runtime context

  • justApp Boolean

    Indicates whether to include the YUI modules just found in the application (true), or also include those found in mojito (false).

Returns:

Object: datastructure for configuring YUI

initializer

(
  • config
)
Nothing

This methods is part of Y.Plugin.Base. See documentation for that for details.

Parameters:

  • config Object

    Configuration object as per Y.Plugin.Base

Returns:

Nothing:

onGetMojitTypeDetails

(
  • evt
)
Nothing

This is called when the ResourceStore fires this event. It augments the mojit type details with the precomputed YUI module dependencies.

Parameters:

  • evt Object

    The fired event.

Returns:

Nothing:

onMojitResourcesResolved

(
  • evt
)
Nothing

This is called when the ResourceStore fires this event. It precomputes the YUI module dependencies, to be used later during onGetMojitTypeDetails.

Parameters:

  • evt Object

    The fired event

Returns:

Nothing:

parseResourceVersion

(
  • source
  • type
  • subtype
  • mojitType
)
Object | | Null

Using AOP, this is called before the ResourceStore's version.

Parameters:

  • source Object

    metadata about where the resource is located

  • type String

    type of the resource

  • subtype String

    subtype of the resource

  • mojitType String

    name of mojit to which the resource likely belongs

Returns:

Object | | Null: for yui modules or lang bundles, returns the resource metadata