ModuleBlueprint source

Specializes Blueprint

Properties

binder :Property source

Inherited From:
Default Value:
  • null

blueprintInstanceModule source

This is used for references only so that we can reload referenced blueprints.

Inherited From:

customPrototype :boolean source

Defines if the blueprint should use custom prototype for new instances.

Returns true if the blueprint needs to require a custom prototype for creating new instances, false if new instance are generic prototypes.

Inherited From:
Default Value:
  • false

eventBlueprints :Property source

Inherited From:
Default Value:
  • {Array} new Array()

exportName :string source

The name of the export this blueprint is for.

identifier :Property source

The identifier is the same as the name and is used to make the serialization of a blueprint humane.

Inherited From:
Default Value:
  • {string} this.name

module :ModuleReference source

A reference to the module that this blueprint is for.

moduleId :Property source

Inherited From:
Default Value:
  • null

name source

Inherited From:

newAssociationBlueprint source

Return a new association blueprint. <b>Note: </b> This is the canonical way of creating new association blueprint in order to enable subclassing.

Inherited From:

newDerivedPropertyBlueprint source

Return a new derived property blueprint. <b>Note: </b> This is the canonical way of creating new derived property blueprint in order to enable subclassing.

Inherited From:

newEventBlueprint source

Return a new event blueprint. Note: This is the canonical way of creating new event blueprint in order to enable subclassing.

Inherited From:

newPropertyBlueprint source

Return a new property blueprint.

Note: This is the canonical way of creating new property blueprint in order to enable subclassing.

Inherited From:

ObjectProperty :Property source

Return the blueprint object property for this blueprint.

This will return the default if none is declared.

Inherited From:

parent :Property source

Blueprint parent

Inherited From:
Default Value:
  • {Object} null

propertyBlueprintGroupForName source

Returns the group associated with that name

Inherited From:

propertyBlueprintGroups source

List of properties blueprint groups names

Inherited From:

propertyBlueprints :Property source

Inherited From:
Default Value:
  • {Array} new Array()

propertyValidationRules source

Gets the list of properties validation rules

Inherited From:

Methods

getBlueprintWithModuleId(blueprint, require) <constructor> source

Gets a blueprint from a serialized file at the given module id.

Parameters:
Name Type Description
blueprint string

module id

require Function

function

addEventBlueprint(property) source

Add a new property blueprint to this blueprint.

If that property blueprint was associated with another blueprint it will be removed first.

Parameters:
Name Type Description
property string

blueprint The property blueprint to be added.

Inherited From:
Returns:

property blueprint

addEventBlueprintNamed(name) source

Convenience to add an event blueprint.

Parameters:
Name Type Description
name string

TODO

Inherited From:
Returns:

relationship

addPropertyBlueprint(property) source

Add a new property blueprint to this blueprint.

If that property blueprint was associated with another blueprint it will be removed first.

Parameters:
Name Type Description
property string

blueprint The property blueprint to be added.

Inherited From:
Returns:

property blueprint

addPropertyBlueprintGroupNamed(name) → {array} source

Add a new property blueprint group.

Parameters:
Name Type Description
name string

of the group

Inherited From:
Returns: array

new property blueprint group

addPropertyBlueprintToGroupNamed(property, name) → {array} source

Adds a property blueprint to the group name. if the group does not exist creates it.

Parameters:
Name Type Description
property string

to add

name string

of the group

Inherited From:
Returns: array

property blueprint group

addToManyAssociationBlueprintNamed(name, inverse) source

Convenience to add an property blueprint to many relationships.

Parameters:
Name Type Description
name string

TODO

inverse string

TODO

Inherited From:
Returns:

relationship

addToManyPropertyBlueprintNamed(name) source

Convenience to add many property blueprints.

Parameters:
Name Type Description
name string

Add to many property blueprints

Inherited From:
Returns:

names

addToOneAssociationBlueprintNamed(name, inverse) source

Convenience to add an property blueprint to one relationship.

Parameters:
Name Type Description
name string

TODO

inverse string

TODO

Inherited From:
Returns:

relationship

addToOnePropertyBlueprintNamed(name) source

Convenience to add one property blueprint.

Parameters:
Name Type Description
name string

Add to one property blueprint

Inherited From:
Returns:

name

create(aPrototype, propertyDescriptor) source

This is the canonical way of creating managed objects prototypes.

Newly created prototype will be blessed with all the required properties to be well behaved.

Parameters:
Name Type Description
aPrototype Object

TODO

propertyDescriptor string

TODO

Inherited From:
Returns:

newPrototype

eventBlueprintForName(name) source

Parameters:
Name Type Description
name string

TODO

Inherited From:
Returns:

event blueprint

initWithModuleAndExportName(name, module) source

Parameters:
Name Type Description
name string

TODO

module string

A ModuleReference

Returns:

this

initWithName(name) source

Parameters:
Name Type Description
name string

The name of the blueprint

Inherited From:
Returns:

this

newInstance() source

Create a new instance of the target prototype for the blueprint.

Inherited From:
Returns:

new instance

newInstancePrototype() source

Returns the target prototype for this blueprint.

Note: This method uses the customPrototype property to determine if it needs to require a custom prototype or create a default prototype.

Inherited From:
Returns:

new prototype

propertyBlueprintForName(name) source

Parameters:
Name Type Description
name string

TODO

Inherited From:
Returns:

property blueprint

removeEventBlueprint(property) source

Removes an property blueprint from the property blueprint list of this blueprint.

Parameters:
Name Type Description
property Object

blueprint The property blueprint to be removed.

Inherited From:
Returns:

property blueprint

removePropertyBlueprint(property) source

Removes an property blueprint from the property blueprint list of this blueprint.

Parameters:
Name Type Description
property Object

blueprint The property blueprint to be removed.

Inherited From:
Returns:

property blueprint

removePropertyBlueprintFromGroupNamed(name, name) → {array} source

Removes a property blueprint from the group name.

Parameters:
Name Type Description
name string

of the property

name string

of the group

Inherited From:
Returns: array

property blueprint group

removePropertyBlueprintGroupNamed(name) → {array} source

Remove the property blueprint group.

Parameters:
Name Type Description
name string

of the group to remove

Inherited From:
Returns: array

removed property blueprint group

Generated from a4679af

comments powered by Disqus

More help?

Can't find what you are looking for? Get in touch, we're more than happy in helping answer your questions.