Commit Graph

1940 Commits

Author SHA1 Message Date
Robert von Burg f331babd3d [Minor] Small fixes 2017-04-25 19:47:15 +02:00
Robert von Burg ac9d24802c [Fix] Compile error fixes =( 2017-04-25 19:32:38 +02:00
Robert von Burg 090d0d394f [Major] Don't expose API toJson() in ToFlatJsonVisitor 2017-04-25 11:38:58 +02:00
Robert von Burg 5eda6e57e7 [Minor] Added UserRep.hasRole() 2017-04-24 16:59:39 +02:00
Robert von Burg d1a392f025 [Major] Changed the behaviour of the EventBasedExecutionHandler
Now execution is always performed asynchronously for each Action and an
Activity should be added to the ExecutionHandler by calling
.addForExecution(), so that it is executed later even if an action
couldn't be executed to it being reserved (for instance).
2017-04-22 19:25:27 +02:00
Robert von Burg b06274a103 [New] Updated *ToFlatJsonVisitors to be more build-pattern-like 2017-04-19 22:01:41 +02:00
Robert von Burg a0371d7272 [Minor] Resource.getTimedState() generics fix 2017-04-19 22:01:08 +02:00
Robert von Burg ffe7c2ae0f [New] Added GenericReport.hasDateRangeSelector() 2017-04-13 14:41:07 +02:00
Robert von Burg 05c2f8f09c [New] *To*JsonVisitor now support adding version to JSON result 2017-04-13 12:10:30 +02:00
Robert von Burg ffca077419 [New] Changed Parameter.getValue() for implicit cast to type
Now you can simplify:
StringParameter valueS = resource.getParameter("bagId", "paramId");
String value = valueS.getValue();

to:
String value = resource.getParameter("bagId", "paramId").getValue();

Casting is done implicitly, thus this can lead to runtime exceptions
when the parameter is not of the relevant type, but otherwise it reduces
the code by one line.

Setting the value in this manor is not supported due to the
ListParameters requiring a type of List<T>.
2017-04-12 17:34:23 +02:00
Robert von Burg 476bd0f728 [Fix] Fixed migration scripts and added missing states in DB 2017-04-11 11:05:07 +02:00
Robert von Burg c835ef2735 [Minor] Cleaned up use of new FileInputStream 2017-04-11 11:04:46 +02:00
Robert von Burg 6afba02c59 [Major] Implemented querying Activities by state and resolves #3 2017-04-06 10:02:04 +02:00
Robert von Burg fbb2bc85db [Minor] Small logging changes 2017-04-06 08:42:05 +02:00
Robert von Burg 2a3ee2bcf0 [Minor] Updated to latest versions of external dependencies 2017-04-03 10:01:19 +02:00
Robert von Burg b325e77197 [Minor] Updated to latest versions of external dependencies 2017-04-03 09:56:42 +02:00
Robert von Burg 88f294841d [Minor] Minor change to ParameterSelection for list selections 2017-03-30 19:38:55 +02:00
Robert von Burg 7ad09e2fe5 [Fix] Hopefully last fix for Intepretation/UOM of TimedStates 2017-03-29 17:00:21 +02:00
Robert von Burg 801f792771 [Minor] Added StrolchComponent.openTx() methods 2017-03-29 14:14:25 +02:00
Robert von Burg 4e1e1ccb8f [New] Add toXml() and toJson() methods on StrolchRootElement 2017-03-29 09:50:15 +02:00
Reto Breitenmoser d469a035fb added commitOnClose statement and unit test 2017-03-28 22:19:55 +02:00
Reto Breitenmoser 23b12631d0 if the resource doesn't exist add otherwise update 2017-03-28 21:51:26 +02:00
Robert von Burg 299f789fb2 [Fix] AbstractStrolchTimedState should also clone optional fields 2017-03-28 19:30:11 +02:00
Robert von Burg 537c6ea8d0 [Fix] Properly initialize GenericReport 2017-03-27 14:39:03 +02:00
Robert von Burg 7ee002adcf [New] Added GroupedParameterizedElement.getParameterBag(String,boolean) 2017-03-27 14:36:09 +02:00
Robert von Burg a982097d4f [Minor] added GenericReport.getOrderedColumnKeys() 2017-03-27 14:04:39 +02:00
Robert von Burg 3935a425e0 [Minor] Simplified GenericReport implementation 2017-03-27 11:51:53 +02:00
Robert von Burg 2bc76ca79b [New] Added putAll and addAll to MapOf* collections 2017-03-27 11:50:18 +02:00
Robert von Burg 16f16c330b [Fix] also parse TimedState optional fields 2017-03-24 16:57:51 +01:00
Robert von Burg 27964e47a5 [Minor] Added optional fields of TimedStates to XSD 2017-03-24 16:01:35 +01:00
Robert von Burg bc52cdabda [Minor] Also allow to pass a Set for filter 2017-03-24 11:25:56 +01:00
Robert von Burg 22892671a5 [New] Added searching of column parameter in GenericReport
If a column definition exists as follows:
  <Parameter Id="minQuantity" Name="Min Quantity" Type="String"
Interpretation="Resource-Ref" Uom="Storage"
Value="$search:parent:Bags/parameters/minQuantity" />
  
Then a search is done by looking on this element, and all "parent"
elements where the parent relation is defined by the parameter with the
id "parent". The first instance of the Parameter "minQuantity" is used
as the value for the report.
2017-03-22 14:55:54 +01:00
Robert von Burg 1c4decd578 [Fix] Don't add a null value to the rows in GenericReport 2017-03-22 13:55:31 +01:00
Robert von Burg 9c45bf2ec3 [New] GenericReport: DateRange filter, incl. $id, $type, $date, $state 2017-03-21 15:34:10 +01:00
Robert von Burg 9b2fc22cc0 [New] Added new ElementDateVisitor and ElementStateVisitor
These allow to get the date or state respectively from a
StrolchRootElement which supports such a field (Order and/or Activity)
and thus eliminates the need for casting
2017-03-21 15:33:06 +01:00
Robert von Burg 0661c675e4 [Project] Added new blog entry 2017-03-21 09:04:25 +01:00
Robert von Burg 332463f8a9 [New] Added GenericReport.generateFilterCriteria()
This allows the UI to show filter facets based on the actual data
2017-03-21 08:23:29 +01:00
Robert von Burg b0e57d6425 [New] Added filtering to GenericReport 2017-03-21 07:51:13 +01:00
Robert von Burg 30ad0fcaa8 [New] Added new generic report creator
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
2017-03-20 19:27:59 +01:00
Robert von Burg 5fd8e7df8f [Minor] Added RuntimeMock.mockRuntime(String, String) 2017-03-20 19:24:03 +01:00
Robert von Burg a618fff095 [New] SmtpMailer now understands whitelists for override 2017-03-16 13:45:30 +01:00
Robert von Burg 58248058e5 [New] SmtpMailer now understands whitelists for override 2017-03-16 13:25:04 +01:00
Robert von Burg a88a098bf3 [Minor] Wrapping exception in FromFlatJsonVisitor 2017-03-14 18:48:42 +01:00
Robert von Burg 1470540ac7 [Project] Minor fix in codetemplates.xml 2017-03-12 14:22:06 +01:00
Robert von Burg 40077c5b62 [Fix broken tests] 2017-03-09 11:21:11 +01:00
Robert von Burg 8e06ccb7e1 [Minor] Don't log exceptions if user fails to auth 2017-03-09 11:07:39 +01:00
Robert von Burg 1102f34d18 [Minor] Don't log stack trace if certificate does not exist 2017-03-08 17:51:49 +01:00
Robert von Burg 8310dc1a44 [Project] Updated to petit-parser 2.0.3 2017-03-07 09:49:56 +01:00
Robert von Burg e4e35e5392 [Fix] AuthenticationRequestFilter now has priority AUTHENTICATION 2017-03-06 17:27:44 +01:00
Robert von Burg 72af643d38 [Minor] implemented chaining on FromFlatJsonVisitor 2017-03-06 12:28:48 +01:00