Create a Report as follows: <Resource Id="stockReport" Name="Stock Report" Type="Report"> <ParameterBag Id="parameters" Name="parameters" Type="Parameters"> <Parameter Id="objectType" Name="Object Type" Type="String" Interpretation="Resource-Ref" Uom="Slot" Value="Slot" /> </ParameterBag> <ParameterBag Id="columns" Name="Display Columns" Type="Display"> <Parameter Id="location" Name="Location" Type="String" Interpretation="Resource-Ref" Uom="Location" Value="$name" /> <Parameter Id="storage" Name="Storage" Type="String" Interpretation="Resource-Ref" Uom="Storage" Value="$name" /> <Parameter Id="section" Name="Section" Type="String" Interpretation="Resource-Ref" Uom="Section" Value="$name" /> <Parameter Id="slot" Name="Slot" Type="String" Interpretation="Resource-Ref" Uom="Slot" Value="$name" /> <Parameter Id="product" Name="Product" Type="String" Interpretation="Resource-Ref" Uom="Product" Value="$name" /> <Parameter Id="quantity" Name="Quantity" Type="String" Interpretation="Resource-Ref" Uom="Slot" Value="Bags/parameters/quantity" /> <Parameter Id="maxQuantity" Name="Quantity" Type="String" Interpretation="Resource-Ref" Uom="Slot" Value="Bags/parameters/maxQuantity" /> </ParameterBag> <ParameterBag Id="joins" Name="Joins" Type="Joins"> <Parameter Id="Product" Name="Product" Type="String" Interpretation="Resource-Ref" Uom="Product" Value="Slot" /> <Parameter Id="Section" Name="Section" Type="String" Interpretation="Resource-Ref" Uom="Section" Value="Slot" /> <Parameter Id="Storage" Name="Storage" Type="String" Interpretation="Resource-Ref" Uom="Storage" Value="Section" /> <Parameter Id="Location" Name="Location" Type="String" Interpretation="Resource-Ref" Uom="Location" Value="Storage" /> </ParameterBag> </Resource> This creates a report for objects of type Slot, where a Join is done on multiple objects: Slot -> Product -> Section -> Storage -> Location Thus the columns can then be fetched from different joing objects. The joing is done by searching for a Parameter on the joined object on the ParameterBag "relations". See the example XML on how this is done. Or ask eitch@eitchnet.ch to write a proper documentation =)) Filtering is missing, and will be added later |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
LICENSE | ||
README.md | ||
pom.xml |
README.md
li.strolch.service
Service API for Strolch
Running tests
Start PostgreSQL console and create the users:
$ sudo -u postgres psql
$ postgres=#
create user cacheduser with password 'test';
create database cacheduserdb;
GRANT ALL PRIVILEGES ON DATABASE cacheduserdb to cacheduser;
GRANT CONNECT ON DATABASE cacheduserdb TO cacheduser;
create user transactionaluser with password 'test';
create database transactionaluserdb;
GRANT ALL PRIVILEGES ON DATABASE transactionaluserdb to transactionaluser;
GRANT CONNECT ON DATABASE transactionaluserdb TO transactionaluser;
You can revoke the privileges with the following:
revoke ALL PRIVILEGES ON DATABASE cacheduserdb from cacheduser;
drop user cacheduser;
drop database cacheduserdb;
revoke ALL PRIVILEGES ON DATABASE transactionaluserdb from transactionaluser;
drop user transactionaluser;
drop database transactionaluserdb;