Blueprint source

Properties

binder :Property source

Default Value:
  • null

blueprintInstanceModule source

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

customPrototype :boolean source

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

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

Default Value:
  • false

evaluateRules source

Evaluates the rules based on the object and the properties.

eventBlueprints :?Array.<EventBlueprint> source

identifier :string source

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

Default Value:
  • `this.name`

name source

newAssociationBlueprint source

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

newDerivedPropertyBlueprint source

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

newEventBlueprint source

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

newPropertyBlueprint source

Return a new property blueprint.

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

ObjectProperty :ObjectProperty source

Return the blueprint object property for this blueprint.

This will return the default if none is declared.

parent :BlueprintReference source

Blueprint parent

propertyBlueprintGroupForName source

Returns the group associated with that name

propertyBlueprintGroups :Array.<PropertyBlueprint> source

List of properties blueprint groups names

propertyBlueprints :Array.<PropertyBlueprint> source

propertyValidationRuleForName source

Returns the properties validation rule for that name

propertyValidationRules source

Gets the list of properties validation rules.

Methods

addEventBlueprint(property) → {PropertyBlueprint} 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.

Returns: PropertyBlueprint

addEventBlueprintNamed(name) → {EventBlueprint} source

Convenience to add an event blueprint.

Parameters:
Name Type Description
name string
Returns: EventBlueprint

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 PropertyBlueprint

blueprint The property blueprint to be added.

Returns:

the property blueprint

addPropertyBlueprintGroupNamed(name) → {Array.<PropertyBlueprint>} source

Add a new property blueprint group.

Parameters:
Name Type Description
name string

of the group

Returns: Array.<PropertyBlueprint>

new property blueprint group

addPropertyBlueprintToGroupNamed(property, name) → {Array.<PropertyBlueprint>} 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

Returns: Array.<PropertyBlueprint>

property blueprint group

addPropertyValidationRule(name) → {PropertyDescription} source

Add a new properties validation rule .

Parameters:
Name Type Description
name string

of the rule

Returns: PropertyDescription

new properties validation rule

addToManyAssociationBlueprintNamed(name, inverse) → {AssociationBlueprint} source

Convenience to add an property blueprint to many relationships.

Parameters:
Name Type Description
name string

TODO

inverse string

TODO

Returns: AssociationBlueprint

addToManyPropertyBlueprintNamed(name) → {PropertyBlueprint} source

Convenience to add many property blueprints.

Parameters:
Name Type Description
name string

Add to many property blueprints

Returns: PropertyBlueprint

addToOneAssociationBlueprintNamed(name, inverse) → {AssociationBlueprint} source

Convenience to add an property blueprint to one relationship.

Parameters:
Name Type Description
name string
inverse string
Returns: AssociationBlueprint

addToOnePropertyBlueprintNamed(name) → {PropertyBlueprint} source

Convenience to add one property blueprint.

Parameters:
Name Type Description
name string

Add to one property blueprint

Returns: PropertyBlueprint

create(prototype, 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
prototype Object
propertyDescriptor Object
Returns:

newPrototype

eventBlueprintForName(name) → {EventBlueprint} source

Parameters:
Name Type Description
name string
Returns: EventBlueprint

initWithName(name) source

Parameters:
Name Type Description
name string

The name of the blueprint

Returns:

itself

initWithNameAndModuleId(name, moduleId) source

Parameters:
Name Type Description
name string
moduleId string
Returns:

itself

newInstance() source

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

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.

Returns:

new prototype

propertyBlueprintForName(name) → {PropertyBlueprint} source

Parameters:
Name Type Description
name string
Returns: PropertyBlueprint

removeEventBlueprint(property) → {PropertyBlueprint} 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.

Returns: PropertyBlueprint

removePropertyBlueprint(property) source

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

Parameters:
Name Type Description
property PropertyBlueprint

blueprint The property blueprint to be removed.

Returns:

the same property blueprint

removePropertyBlueprintFromGroupNamed(name, name) → {Array.<PropertyBlueprint>} source

Removes a property blueprint from the group name.

Parameters:
Name Type Description
name string

of the property

name string

of the group

Returns: Array.<PropertyBlueprint>

property blueprint group

removePropertyBlueprintGroupNamed(name) → {Array.<PropertyBlueprint>} source

Remove the property blueprint group.

Parameters:
Name Type Description
name string

of the group to remove

Returns: Array.<PropertyBlueprint>

removed property blueprint group

removePropertyValidationRule(name) → {PropertyDescription} source

Remove the properties validation rule for the name.

Parameters:
Name Type Description
name string

of the rule

Returns: PropertyDescription

removed properties validation rule

Generated from v0.14.14

Need help?

Can't find what you are looking for? Please contact us, we're more than happy to help answer your questions.