Giter Club home page Giter Club logo

mod-orders-storage's Introduction

mod-orders-storage

Copyright (C) 2018 - 2019 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.

Introduction

This is the Orders storage module.

NOTE: This module is intended for internal use only. Please use the APIs provided by mod-orders instead. There is a lot of business logic in mod-orders that will be bypassed if talking directly to the storage layer. While this is mainly important for create/update/delete operations, it also includes get operations as well. For instance, summary information is calculated in the business logic module (mod-orders).

Preparation

Sample Data Loading

Sample data can be optionally loaded during tenant initialization. By default, if no parameters are passed the sample data will not be loaded.

The module supports v1.2 of the Okapi tenant interface. This version of the interface allows Okapi to pass tenant initialization parameters using the tenantParameters key. Currently, the only parameter supported is the loadSample key, which will cause the module to load sample data for the tenant if set to true. Here is an example of passing the parameter to the module via Okapi's //proxy/tenants//install endpoint:

{
  "module_to": "mod-orders-storage-3.3.0",
  "parameters": [
    {
      "key": "loadSample",
      "value": "true"
    }
  ]
}
{
	"module_to": "mod-orders-storage-3.0.0-SNAPSHOT",
	"parameters": [
    {
      "key": "loadSample",
      "value": "true"
    }
    ]
}

DATA SOURCE

The sample data lives in /resources/data folder. Each folder is named identical to the endpoint the data has to be loaded to. The TenantReferenceAPI will then be able to load data into the corresponding table using a POST to the endpoint

Modifying default sample data loading behavior

Sample data load behavior can be modified by passing a command line argument loadSample Unlike the tenant parameters the command Line argument will be applicable for all the tenants.

  • COMMAND LINE: java -jar target/mod-orders-storage-fat.jar loadSample=true

Note: The priority for the parameters in the order Tenant Parameters > Command Line argument > Default value

Search and Filtering on APIs

For the APIs below separate views are created to enable queries that contain fields from Composite Purchase Order.

  • /orders-storage/orders A separate view is created with a metadata column that combines the Purchase order and PO Line JSONs against which queries are executed. It returns the Purchase Order Collection results that match the query
  • /orders-storage/order-lines A separate view is created with a metadata column that combines the Purchase order and PO Line JSONs against which queries are executed. It returns the PO Line Collection results that match the query

Additional information

Issue tracker

See project MODORDSTOR at the FOLIO issue tracker.

Other documentation

Other modules are described, with further FOLIO Developer documentation at dev.folio.org

mod-orders-storage's People

Contributors

khandramai avatar grabsefx avatar ramanasadchy avatar pautau-s avatar piotr-kalashuk avatar craigmcnally avatar kvupp avatar komick avatar dcrossleyau avatar funkymalc avatar nixorg avatar hjiebsco avatar andreimpv avatar siarhei-charniak avatar bon2xl avatar aglukhov avatar andrii-paias avatar pashkin-acc avatar javalkar-varun avatar julianladisch avatar mtraneis avatar damien-git avatar renovate[bot] avatar shale99 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.