Commit Graph

267 Commits

Author SHA1 Message Date
Robert von Burg 2ee6f9a689 [Project] Fixed db test user examples in README.md 2018-06-18 11:07:34 +02:00
Robert von Burg fa9d0afacf [Fix] Don't toString columnValues in GenericReport before necessary 2018-05-29 10:04:28 +02:00
Robert von Burg 87d9b83f38 [Fix] Don't toString columnValues in GenericReport before necessary 2018-05-29 09:48:07 +02:00
Robert von Burg f8ea8998b1 [Minor] Fixed JavaDoc due to doclint errors 2018-04-04 16:02:45 +02:00
Robert von Burg 5b6183319c [Fix] don't persist set password if don't have privilege 2018-03-29 16:56:24 +02:00
Robert von Burg 3eba63ff13 [Minor] code cleanup in planning tests 2018-03-26 10:41:25 +02:00
Robert von Burg 9ccaf5392a [Minor] Persist roles and users after changes 2018-03-20 14:30:12 +01:00
Robert von Burg 2907df815a [Project] Added privilege StrolchSearch 2018-03-20 07:46:50 +01:00
Robert von Burg 6d7e473564 [Major] Implemented user modification in inspector 2018-03-16 17:17:59 +01:00
Robert von Burg abeceb7a6c [Minor] more waiting in LockingTest 2018-03-09 10:42:16 +01:00
Robert von Burg 20cd71ab6a [Minor] Use ? extends StrolchRootElement in GenericReport 2018-03-08 18:07:11 +01:00
Robert von Burg 4f2fd4648a [Fix] fix broken tests 2018-02-28 09:10:47 +01:00
Robert von Burg 676bb9c11e [Fix] Fixed broken tests 2018-02-28 09:04:49 +01:00
Robert von Burg c66f7c2805 [Major] Implement StrolchElement.isReadOnly() and .setReadOnly()
Modifying a read only element causes an exception. Retrieving elements from the TX, or directly from the ElementMap returns a clone, so nothing changes there. But elements returned by a query will have their readOnly flag set, thus if these are modified, then they need to be cloned first.
2018-02-27 14:46:23 +01:00
Robert von Burg f3ea159052 [Major] RIP transactional mode 2018-02-09 22:16:34 +01:00
Robert von Burg 475c719859 [Major] Reworked visitors: StrolchElement.accept(StrolchElementVisitor) 2018-02-09 09:49:51 +01:00
Robert von Burg 50c379d06d [Major] Using executor pools with names in StrolchAgent 2017-12-19 14:54:57 +01:00
Robert von Burg 04f4fed0ba [New] Added toJson() to ServiceResult, ModelStatistics 2017-11-29 16:56:36 +01:00
Robert von Burg 4513de79af [Minor] Log error in SimpleExecution.java.toError(LogMessage) 2017-11-21 18:04:21 +01:00
Robert von Burg 93e099f101 [New] Adding value changes to actions on execution 2017-11-07 07:40:31 +01:00
Robert von Burg b05c3db748 [Fix] Allow missing join to not crash report on filter of said join 2017-11-02 17:53:49 +01:00
Robert von Burg 2d60a352b4 [Fix] Fix not allow to re-add removed element with versioning enabled 2017-11-01 10:15:21 +01:00
Robert von Burg d21785edd0 [Fix] Allow to archive activities in state CLOSED 2017-10-31 10:55:47 +01:00
Robert von Burg b0ef4ff50d [New] Allow to handle missing columns 2017-10-27 19:22:22 +02:00
Robert von Burg 7c15a8d7c5 [New] Added ExecutionHandler.archiveActivity() 2017-10-27 09:20:32 +02:00
Robert von Burg 3bcd2075d3 [Fix] filter to only StringParameters in joining of GenericReport 2017-10-18 16:33:56 +02:00
Robert von Burg c0bf2ae428 [Major] Refactored GenericReport into Policies for extension 2017-10-18 13:11:39 +02:00
Robert von Burg 7dd6aa8afc [Minor] logger fix in Migrations 2017-10-12 16:13:59 +02:00
Robert von Burg c7fc11f563 [Fix] Fixed reservation problem in concurrent execution 2017-10-09 12:31:02 +02:00
Robert von Burg adf53dd49f [Major] Implemented SingleSignOn facility for Privilege 2017-10-06 16:59:22 +02:00
Robert von Burg 4087608e1a [Fix] Throw Exception on programmer mistake if no commitOnClose with + 2017-10-05 09:54:42 +02:00
Robert von Burg dad2f35b16 [Major] Multiple changes to StrolchTransaction:
New:
- needsCommit() -> return true if objects or commands are registered
- hasResource()
- hasOrder()
- hasActivity()

Changes:
- When tx.add(), update() or remove() is called, then get*Template(),  or get*By() check the internal cache and thus e.g. a new resource is immediately available.
- the has*()-methods also check the internal cache, thus the need to get the underlying maps should now no longe be required in normal TX use.
2017-10-04 13:10:20 +02:00
Robert von Burg 2c5dddd893 [Major] rename add/update/remove methods in StrolchTransaction 2017-10-03 11:41:30 +02:00
Robert von Burg 84d3ca4666 [Minor] Some code cleanup for JDK 9 2017-09-29 16:21:21 +02:00
Robert von Burg 2cb799dfb4 [Major] Removed the need for javax.xml.bind.* imports. Using gson 2017-09-29 15:57:21 +02:00
Robert von Burg 76e7403974 [Project] Update all dependencies and plugin dependencies in pom.xml 2017-09-28 19:11:34 +02:00
Robert von Burg 80a1e4af62 [Fix] Fixed not committing after archiving activity 2017-09-19 15:19:29 +02:00
Robert von Burg d9db935bbb [Fix] Fixed wrong value order in CSV export 2017-09-13 15:28:40 +02:00
Robert von Burg 9801e8e543 [Fix] Fixed race condition in XmlExportModelCommand 2017-08-30 16:31:24 +02:00
Robert von Burg a27e9a2999 [Project] Set new snapshot version 1.6.0-SNAPSHOT 2017-08-24 14:11:29 +02:00
Robert von Burg 0aca2e517c [Minor] stop future when stopping ExecutorService 2017-08-23 10:59:47 +02:00
Robert von Burg b3adf8dfa5 [Major] Implemented new ToErrorReservationExecution 2017-08-18 17:42:02 +02:00
Robert von Burg 2863a5746b [Fix] Fixed wrong filtering of resources 2017-08-18 09:46:54 +02:00
Robert von Burg c1522fc1e7 [New] EventBasedExecutionHandler can now restart in-exec Activity 2017-08-09 11:31:36 +02:00
Robert von Burg cfe8664ddc [Minor] Allow to set Action to ERROR, if already in ERROR 2017-08-09 11:31:10 +02:00
Robert von Burg 40c9d92bb2 [Fix] Fixed broken test 2017-07-27 14:27:47 +02:00
Robert von Burg e71b7b018b [Major] Now exposing StrolchTransaction.assertHasPrivilege()
Enforcing privilege checking was a bad idea
2017-07-25 14:12:51 +02:00
Robert von Burg 1183000520 [Major] Implemented privilege checking for DAO
Now the PrivilegeConfig.xml must include:

	<Policies>
		<Policy name="ModelPrivilege"
class="li.strolch.runtime.privilege.ModelPrivilege" />
	</Policies>

And PrivilegeRoles.xml must include:

	<Role>
		<Privilege name="GetResource" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
		<Privilege name="GetOrder" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
		<Privilege name="GetActivity" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
		<Privilege name="AddResource" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
		<Privilege name="AddOrder" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
		<Privilege name="AddActivity" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
		<Privilege name="UpdateResource" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
		<Privilege name="UpdateOrder" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
		<Privilege name="UpdateActivity" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
		<Privilege name="RemoveResource" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
		<Privilege name="RemoveOrder" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
		<Privilege name="RemoveActivity" policy="ModelPrivilege">
			<AllAllowed>true</AllAllowed>
		</Privilege>
	</Role>
2017-07-24 20:07:10 +02:00
Robert von Burg c0cc6f57cb [Major] Added add, update and remove methods to TX for elements
Moved add, update and remove commands to agent package
2017-07-24 13:51:17 +02:00
Robert von Burg a214853e94 [Major] Inspector can now update StrolchElements from JSON/XML 2017-07-05 15:07:51 +02:00
Robert von Burg a7fc27627f [New] GenericReport can now do ordering 2017-06-27 08:45:26 +02:00
Robert von Burg ad8f0220e9 [Project] filter all property files 2017-06-20 15:38:46 +02:00
Robert von Burg 9b92d2fdbc [Major] Refactored LogMessage to use ResourceBundle, instead of bundleId 2017-06-14 17:58:13 +02:00
Robert von Burg 08631498dc [Major] Creating LogMessages for exceptions in Migrations, TX, Execution 2017-06-14 15:54:58 +02:00
Robert von Burg 6dfdcf6a04 [New] Added SimpleExecution methods with LogMessage 2017-06-14 12:53:47 +02:00
Robert von Burg 6171e53ff4 [New] Implemented simple OperationsLog to storing messages 2017-06-14 12:53:08 +02:00
Robert von Burg 5bf7cd8b72 [Major] Changed State machine implementation 2017-06-13 10:26:21 +02:00
Robert von Burg 5471a3176b [Fix] Fix able to restart error actions by setting to STOPPED first 2017-06-12 21:48:33 +02:00
Robert von Burg 3e2e21da6d [Fix] Fixed re-executing ERRORed Action 2017-06-09 16:11:22 +02:00
Robert von Burg b8b0806e12 [New] Now StrolchTimedState compact only if boolean supplied 2017-06-08 14:33:59 +02:00
Robert von Burg ffbbe3c4bb [New] ExecutionHandler.triggerExecution(realm) is now public 2017-06-07 15:53:52 +02:00
Robert von Burg 2470b02a10 [New] Added StringServiceArgument 2017-06-01 12:42:07 +02:00
Robert von Burg 58a3afb3e7 [Minor] Fix logging error in XmlExportModelService 2017-06-01 10:10:41 +02:00
Robert von Burg 4c9e66876a [Major] Privilege passwords are now salted! 2017-05-22 14:37:48 +02:00
Robert von Burg f87c42f399 [Project] switched tests to use logback-classic 2017-05-22 09:50:48 +02:00
Robert von Burg 1354a89f72 [Fix] Fixed issues where remaining actions on Activity aren't executed
This ocurred because of settings remaining unneeded Actions to state
CLOSED, and thus execution was not continued.
2017-05-19 10:55:57 +02:00
Robert von Burg 3622339896 [Major] Total refactoring of StrolchElementVisitor hierarchy 2017-05-17 09:20:27 +02:00
Robert von Burg 42c623cea6 [Major] Added Service.getArgumentInstance() 2017-05-16 15:18:38 +02:00
Robert von Burg 2ed8c8dc5f [New] Implemented RemoveActivityArchival policy 2017-05-14 16:32:59 +02:00
Robert von Burg 24b7f1d2bc [New] Update the order state of activity by Type and Id reference 2017-05-14 15:33:23 +02:00
Robert von Burg 76fb797102 [New] Added ConfirmationPolicy and ActivityArchivalPolicy 2017-05-14 11:42:37 +02:00
Robert von Burg 3dcd4aafaf [New] Added ActivityCreationPolicy 2017-05-09 17:34:52 +02:00
Robert von Burg ade6b5374d [Fix] EventBasedExecutionHandler now executes next action in same TX 2017-05-09 12:43:32 +02:00
Robert von Burg 358f4eff63 [Minor] Small change in ParameterizedElement 2017-05-04 20:45:44 +02:00
Robert von Burg 5d907dc6db [Minor] Added exception handling in EventBasedExecutionHandler 2017-05-04 15:48:39 +02:00
Robert von Burg 49f8e2bec5 [Fix] fixing broken tests 2017-05-03 16:47:49 +02:00
Robert von Burg fdc08d873d [Fix] Fixing StartActivityExecutionServiceTest test 2017-05-03 16:36:41 +02:00
Robert von Burg b13558eb65 [Fix] Fixing StartActivityExecutionServiceTest test 2017-05-03 16:24:04 +02:00
Robert von Burg b700bdf270 [New] Allow to hide objectType from report filter criteria 2017-05-03 16:06:56 +02:00
Robert von Burg 5f1f4af7b0 [Major] GenericReport now supports filter policies
The first two are:
- GreaterThan for FloatParameters
- Equals for strings
2017-05-03 15:32:20 +02:00
Robert von Burg f331babd3d [Minor] Small fixes 2017-04-25 19:47:15 +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 ffe7c2ae0f [New] Added GenericReport.hasDateRangeSelector() 2017-04-13 14:41:07 +02:00
Robert von Burg c835ef2735 [Minor] Cleaned up use of new FileInputStream 2017-04-11 11:04:46 +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 537c6ea8d0 [Fix] Properly initialize GenericReport 2017-03-27 14:39:03 +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 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 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 e0149cc4b0 [Major] Removed many visitors and implemented proper visitor pattern... 2017-03-02 16:52:50 +01:00
Robert von Burg 89739717f2 [Major] Refactored LockHandler to use Locator
This is required because in certain instances it is important to lock
the object before retrieving it, otherwise if, for instance in
execution, we would need to fetch, lock and re-fetch to be sure we have
the latest object.

In moste of the Update*Commands this is not important as we perform a
list commit wins, where the client wants their version to be persisted.
Later a optimistic locking can be performed in that the given version
must be the latest, otherwise an exception would be thrown
2017-02-22 12:14:23 +01:00
Robert von Burg 111a75c034 [Fix] Lock activities during execution! 2017-02-21 18:48:24 +01:00
Robert von Burg 5c8ccabd7f [New] Added new ReservationExection to reserve resources 2017-02-20 17:32:44 +01:00