Namespace

Managers

Managers

Manager Classes in this context should do the bridge between the controllers and the services exposing only the necessary api to the controllers while encapsulating all business logic.

All Manager Classes should be singletons.

This complete separation of concerts is very beneficial for 2 reasons:

  • Allows for testing since there's no browser dependent code (i think) since the DSUStorage can be 'mocked'
  • Allows for different controllers access different business logic when necessary (while benefiting from the singleton behaviour)

View Source managers/index.js, line 2

Classes

BatchManager

Batch Manager Class

Manager Classes in this context should do the bridge between the controllers and the services exposing only the necessary api to the controllers while encapsulating all business logic.

DirectoryManager

Stores references to some entities for quicker lookup on the front end (eg, products, suppliers, etc)

.
IndividualProductManager

IndividualProduct Manager Class

Manager Classes in this context should do the bridge between the controllers and the services exposing only the necessary api to the controllers while encapsulating all business logic.

IssuedOrderManager
Issued Order Manager Class - concrete OrderManager for issuedOrders.
IssuedShipmentManager
Issued Shipment Manager Class - concrete ShipmentManager for issuedShipments.
NotificationManager

Batch Manager Class

Manager Classes in this context should do the bridge between the controllers and the services exposing only the necessary api to the controllers while encapsulating all business logic.

OrderManager

Order Manager Class

Abstract class.

ParticipantManager

Participant Manager Class - Extension of Base Manager

Manager Classes in this context should do the bridge between the controllers and the services exposing only the necessary api to the controllers while encapsulating all business logic.

ProductManager

Product Manager Class

Manager Classes in this context should do the bridge between the controllers and the services exposing only the necessary api to the controllers while encapsulating all business logic.

ReceiptManager

Stock Manager Class

Manager Classes in this context should do the bridge between the controllers and the services exposing only the necessary api to the controllers while encapsulating all business logic.

ReceivedOrderManager
Received Order Manager Class - concrete OrderManager for receivedOrders.
ReceivedShipmentManager
Received Shipment Manager Class - concrete ShipmentManager for received Shipments.
SaleManager

Stock Manager Class

Manager Classes in this context should do the bridge between the controllers and the services exposing only the necessary api to the controllers while encapsulating all business logic.

ShipmentLineManager

ShipmentLine Manager Class

Manager Classes in this context should do the bridge between the controllers and the services exposing only the necessary api to the controllers while encapsulating all business logic.

ShipmentManager

Shipment Manager Class

Abstract class.

StockManager

Stock Manager Class

Manager Classes in this context should do the bridge between the controllers and the services exposing only the necessary api to the controllers while encapsulating all business logic.

TraceabilityManager

Stock Manager Class

Manager Classes in this context should do the bridge between the controllers and the services exposing only the necessary api to the controllers while encapsulating all business logic.

Methods

# static getBatchManager(participantManager, callbackopt) → {BatchManager}

Parameters:
Name Type Attributes Description
participantManager BaseManager
callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/BatchManager.js, line 314

BatchManager

# static getDirectoryManager(participantManager, callbackopt) → {DirectoryManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager
callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/DirectoryManager.js, line 167

# static getIndividualProductManager(participantManageropt, callbackopt) → {IndividualProductManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager <optional>

only required the first time, if not forced

callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/IndividualProductManager.js, line 216

# static getIssuedOrderManager(participantManager, callbackopt) → {IssuedOrderManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager
callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/IssuedOrderManager.js, line 411

# static getIssuedShipmentManager(participantManager, callbackopt) → {IssuedShipmentManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager
callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/IssuedShipmentManager.js, line 325

# static getNotificationManager(participantManager, callbackopt) → {NotificationManager}

Parameters:
Name Type Attributes Description
participantManager BaseManager
callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/NotificationManager.js, line 281

# static getParticipantManager(dsuStorageopt, forceopt, callbackopt) → {ParticipantManager}

Parameters:
Name Type Attributes Description
dsuStorage DSUStorage <optional>

only required the first time, if not forced

force boolean <optional>

defaults to false. overrides the singleton behaviour and forces a new instance. Makes DSU Storage required again!

callback function <optional>

View Source managers/ParticipantManager.js, line 200

# static getProductManager(participantManageropt, callbackopt) → {ProductManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager <optional>

only required the first time, if not forced

callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/ProductManager.js, line 208

# static getReceiptManager(participantManager, callbackopt) → {ReceiptManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager
callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/ReceiptManager.js, line 252

# static getReceivedOrderManager(participantManager, callbackopt) → {OrderManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager
callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/ReceivedOrderManager.js, line 206

OrderManager

# static getReceivedShipmentManager(participantManager, callbackopt) → {ReceivedShipmentManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager
callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/ReceivedShipmentManager.js, line 183

# static getSaleManager(participantManager, callbackopt) → {SaleManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager
callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/SaleManager.js, line 381

SaleManager

# static getShipmentLineManager(participantManager, callbackopt) → {ShipmentLineManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager
callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/ShipmentLineManager.js, line 268

# static getStockManager(participantManager, serializationopt, callbackopt) → {StockManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager
serialization boolean <optional>

defaults to true.

callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/StockManager.js, line 404

StockManager

# static getTraceabilityManager(participantManager, callbackopt) → {TraceabilityManager}

Parameters:
Name Type Attributes Description
participantManager ParticipantManager
callback function <optional>

optional callback for when the assurance that the table has already been indexed is required.

View Source managers/TraceabilityManager.js, line 300