Class AbstractParent<C, CT>Abstract

Defines the Default props and methods for Patterns that will have other Patterns as its childs

Export

Abstract

Implements

Template

Type Parameters

Hierarchy-Diagram

UML class diagram of AbstractParent
Legend
icon for a class in the UML class diagram class
icon for an abstract class in the UML class diagram abstract class
icon for an interface in the UML class diagram interface
icon for a public property in the UML class diagram public property
icon for a protected property in the UML class diagram protected property
icon for a private property in the UML class diagram private property
icon for a public method in the UML class diagram public method
icon for a protected method in the UML class diagram protected method
icon for a private method in the UML class diagram private method
italic abstract property/method

Hierarchy

Implements

Properties

_childIdsByType: Map<string, string> = ...
_childItemsByType: {} = {}

Type declaration

    isProviderBased: boolean = false

    Methods

    • Protected

      Get the child reference based on given Id

      Returns

      Child Reference

      Memberof

      OSFramework.Patterns.AbstractParent

      Parameters

      • childId: string

        Child Id of the element to be found

      Returns CT

    • Protected

      Get a child reference by a given Index position

      Returns

      Child Reference

      Memberof

      OSFramework.Patterns.AbstractParent

      Parameters

      • index: number

        Index of the item to be returned

      • Optional childType: string

        To be based on childType childs collection, otherwise will assume parent only contains one child type!

      Returns CT

    • Protected

      Get a child index from a given child Id

      Returns

      Index value

      Memberof

      OSFramework.Patterns.AbstractParent

      Parameters

      • childId: string

        Child id where index will be found

      Returns number

    • Protected

      Method that is used to set a given child as a Parent child.

      Memberof

      OSFramework.Patterns.AbstractParent

      Parameters

      • childItem: CT

        Reference to be added

      Returns void

    • Protected

      Method that will remove Child by given Id

      Memberof

      OSFramework.Patterns.AbstractParent

      Parameters

      • childId: string

        Id of the item that will be removed

      Returns void

    • Getter that allows to obtain all the childs when parent only contains childs of one type, otherwise a type must be passed in order to return all child of the given type!

      Returns

      Memberof

      OSFramework.Patterns.AbstractParent

      Parameters

      • Optional type: string

        To be based on childType childs collection, otherwise will assume parent only contains one child type!

      Returns CT[]

    • Method used to be notified by a given ChildId about a given action and act accordingly

      Abstract

      Memberof

      OSFramework.Patterns.AbstractParent

      Parameters

      • childItem: CT

        Child Item

      • notifiedTo: string

        Notification name (Should be based on an Enum)

      Returns void

    Constructors

    Accessors

    • get _enableAccessibility(): boolean
    • Protected

      Getter that allows to obtain the accessibility is enabled.

      Memberof

      OSFramework.Patterns.AbstractPattern

      Returns boolean