Commit Graph

387 Commits

Author SHA1 Message Date
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
Robert von Burg 99989de8b4 [New] Added StringMapResult to use as a ServiceResult 2017-02-20 09:17:18 +01:00
Robert von Burg 757300e955 [Fix] Don't delete other user's files! 2017-02-17 22:52:49 +01:00
Robert von Burg 9041bf9fb5 [New] Added new StringMapArgument for StrolchServices 2017-02-16 11:15:08 +01:00
Robert von Burg a67e18af40 [New] Added RuntimeMock.doServiceAssertResult() 2017-02-16 11:14:41 +01:00
Robert von Burg 061436e7ee [Project] Refactoring tests 2017-01-31 14:20:47 +01:00
Robert von Burg de1d569efd [Minor] Moved PrivilegeAddUserService to command, added tests 2017-01-31 14:20:14 +01:00
Robert von Burg 5cdffcc450 [New] Implemented StrolchTransaction.setSuppressAuditsForAudits() 2017-01-31 11:24:27 +01:00
Robert von Burg 02a8f9d3ef [Minor] Added JavaDoc to execution policies 2017-01-23 16:44:14 +01:00
Robert von Burg 13a7c83d96 [New] Added new SimpleExecution and DurationExecution extends it 2017-01-20 10:23:47 +01:00
Robert von Burg 744c7614d3 Merge branch 'release/1.4.0' into develop 2016-11-03 13:35:58 +01:00
Robert von Burg e7cf9bad6d [Fix] Fixed undo logic for general commands
Should a command be undone, then some commands performed an undo,
although they didn't perform their work, this led to an inconsistent
data model. I.e. AddResourceCommand would fail because the resource
already existed and an undo would lead to the existing object being
removed
2016-11-03 13:35:29 +01:00
Robert von Burg df4d716c35 Merge branch 'release/1.4.0' into develop 2016-11-03 12:14:31 +01:00
Robert von Burg da41e2aeb9 [Project] Remove xmlpers as dependency from service project 2016-11-03 12:10:43 +01:00
Robert von Burg 905db8c297 [Project] Set new version 1.5.0-SNAPSHOT 2016-11-03 12:07:38 +01:00
Robert von Burg bff0215510 [Major] Refactored the DurationExecutionTimer to not be singleton
Once again it is clear how bad singletons are. One test killed the
timer, thus all other tests failed. Now the DelayedExecutionTimer is
retrieved from the ExecutionHandler and is called DelayedExecutionTimer
with a default implementation of SimpleDurationExecutionTimer
instantiated by the EventBasedExecutionHandler
2016-10-11 14:59:52 +02:00
Robert von Burg 3be7f9e905 [Fix] Fix timing in execution tests for CI 2016-10-06 21:16:00 +02:00
Robert von Burg 001717d987 [Fix] Fixed ToStock Execution due to changes in Strolch 1.4.x 2016-10-06 20:46:15 +02:00
Robert von Burg b775c00f4d [Major] Implemented ExecutionDuration and fixed deep execution
Using the DurationExecution:

<Activity Id="produceBicycle" Name="Activity" Type="ToStock" 
        TimeOrdering="Series">
  <ParameterBag Name="objectives" Id="Objectives" Type="Objectives">
    <Parameter Name="Duration" Id="duration" Value="PT0.01S" 
          Type="Duration" />
  </ParameterBag>
  <Action Id="produce" Name="Produce" ResourceId="bicycle" 
          ResourceType="Product" Type="Produce" />
</Activity>

IActivityElement now has a new method .findParameter() to search up the
activity hierarchy to find the element
2016-10-06 20:38:06 +02:00
Robert von Burg 811b71f543 [Major] Implemented EventBasedExecutionHandler
Now all Actions are executed, as long as Execution is done through the
ExecutionHandler
2016-09-30 16:35:16 +02:00
Robert von Burg 48caa84903 [Major] Refactored SystemAction in privileges
Simplified the API, removed the privileged user - now always use the
agent system user for running system actions. One method has no return
value and one has a return value. Now it is easy to perform a system
action using:

    runAsAgent(ctx -> {
      // do work			
    });

    String result = runAsAgentWithResult(ctx -> {
      // do work
      return "done";
    });

    // execute a SystemAction
    runAsAgent(action);

    // execute a SystemActionWithResult
    String result = runAsAgentWithResult(actionWithResult);
2016-09-29 15:54:30 +02:00
Robert von Burg dd227c65d0 [Major] Refactored SystemAction in privileges
Simplified the API, removed the privileged user - now always use the
agent system user for running system actions. One method has no return
value and one has a return value. Now it is easy to perform a system
action using:

    runAsAgent(ctx -> {
      // do work			
    });

    String result = runAsAgentWithResult(ctx -> {
      // do work
      return "done";
    });

    // execute a SystemAction
    runAsAgent(action);

    // execute a SystemActionWithResult
    String result = runAsAgentWithResult(actionWithResult);
2016-09-29 12:26:27 +02:00
Robert von Burg aab5f0b22f [Major] Moved planning services to li.strolch.planning 2016-09-24 19:07:42 +02:00
Robert von Burg 65c02d2cc0 [Major] Implemented first version of Activity execution 2016-09-23 14:20:16 +02:00
Robert von Burg b4bc62d11c [Major] Implemented first version of Activity execution 2016-09-23 14:03:42 +02:00
Robert von Burg d86e23b58f [Fix] Fixed locator finding for Activity and Action 2016-09-23 13:29:02 +02:00
Robert von Burg d413794213 [Major] Added Activity.TimeOrdering and updated Model XSD 2016-09-23 10:53:37 +02:00
Robert von Burg 02e0110fc6 [Minor] Refactoring packages of tests 2016-09-22 21:59:40 +02:00
Robert von Burg 5cbbfebf06 [Major] Services now consider Arg realm or user realm 2016-09-22 21:52:36 +02:00
Robert von Burg b7b9d63e79 [Major] Refactored services to use generic Arguments were applicable 2016-09-22 21:06:57 +02:00
Robert von Burg c89a275452 [Major] Planning commands are in planning package 2016-09-22 21:05:13 +02:00
Robert von Burg dc0a34dc9d [Project] Set new snapshot version 1.4.0-SNAPSHOT 2016-09-22 11:33:15 +02:00
Robert von Burg bda16a0f80 [Project] Updated project for deployment to Maven Central 2016-09-22 09:37:55 +02:00
Robert von Burg f8165208b1 [New] Added CRUD Services and Commands for Activities 2016-09-21 12:40:23 +02:00
Robert von Burg 6286949506 [New] Added StrolchRootElement Service Argument and Result classes 2016-09-21 09:48:36 +02:00
Robert von Burg 7269a5f3b1 [New] Added StrolchRootElement Service Argument and Result classes 2016-09-21 09:45:27 +02:00
Robert von Burg 6339f7df93 [Minor] Don't allow to add TimedState if already exists 2016-09-19 21:46:52 +02:00
Robert von Burg 7de48c0d43 [Project] Mockito is only test dependency 2016-09-16 11:30:16 +02:00
Robert von Burg 9602313410 [New] Implemented a SmtpMailer and Strolch MailHandler component
SmtpMailer is a singleton and requires properties.

Configure the MailHandler as follows:
<Component>
    <name>MailHandler</name>
    <api>li.strolch.handler.mail.MailHandler</api>
    <impl>li.strolch.handler.mail.SmtpMailHandler</impl>
    <Properties>
        <fromAddr>relayer@eitchnet.ch</fromAddr>
        <fromName>Consilium</fromName>
        <overrideRecipientAddr>eitch@eitchnet.ch</overrideRecipientAddr>
        <overrideRecipientName>Consilium Test</overrideRecipientName>
        <username>relayer@eitchnet.ch</username>
        <password>M5ztAE4a1NWWZBHaUd2ey9aoH</password>
        <auth>true</auth>
        <startTls>true</startTls>
        <host>smtp.gmail.com</host>
        <port>587</port>
    </Properties>
</Component>
2016-09-08 11:19:10 +02:00
Robert von Burg bcc0bf4a10 [Major] Now users can reset their own passwords
- built in User Challenge feature (currently only console)
- extended REST API to allow user to initiate a challenge and then use
the challenge to authenticate for a one time change password session
2016-09-07 14:41:16 +02:00
Robert von Burg 8c4c8e539e [Major] Implemented opt-in versioning
- Implemented marshalling of Version
- Added further tests for marshalled version
- added version in deep equals
- fixing further tests
2016-08-07 17:47:52 +02:00
Robert von Burg 9dc09515e9 [Major] Implemented opt-in versioning
Now all root elements have a version, and if the realm has versioning
enabled, then actions through the ElementMap lead to new versions being
created. There are also methods to revert/undo changes to an object.

Some tests are still failing, this will be fixed later
2016-08-05 20:24:23 +02:00
Robert von Burg 612745098b [Project] Set new SNAPSHOT version 1.3.0-SNAPSHOT 2016-07-05 09:57:44 +02:00
Robert von Burg 611a7c670a [Project] Set new SNAPSHOT version 1.2.1-SNAPSHOT 2016-07-05 09:56:56 +02:00
Robert von Burg e15b93e690 [Project] Set version 1.2.0 2016-07-05 09:52:34 +02:00
Robert von Burg 11ba7eb1de [Major] Moved ch.eitchnet to li.strolch 2016-06-26 11:38:41 +02:00
Robert von Burg 3b7e5200fa [Project] Removed parent 2016-06-24 18:05:45 +02:00
Robert von Burg 14197ed644 [Major] Cleaning up parents 2016-06-24 18:00:44 +02:00
Robert von Burg 0cadf66f3f [Major] Refactored Privilege to use separate mode files
So now users and roles are in their own files. This makes it far easier
to add new privileges without needing to take care if the user changed
their data.
2016-02-28 19:54:17 +01:00
Robert von Burg bab06d3ab5 [Minor] Fixing broken tests due to PostgreSQL driver not loaded 2016-02-27 16:50:04 +01:00
Robert von Burg beccdbf4be [Minor] closing potentially open streams 2016-02-10 17:52:17 +01:00
Robert von Burg e2b3e5f7b0 [Minor] removed unnecessary else 2016-02-10 17:48:18 +01:00
Robert von Burg 3502a4adad [Minor] Removed redundant types (diamond operator) 2016-02-10 17:46:50 +01:00
Robert von Burg c37fd20efb [Major] Added persisting and reloading of sessions 2015-10-16 17:21:49 +02:00
Robert von Burg 69eb5ccf38 [Major] Refactored query API
- Now added ordering
- added setters for visitors on query
-
2015-08-10 22:21:45 +02:00
Robert von Burg cf004e5577 [Minor] Changed TimeState Type from BooleanState to Boolean, etc.
- See StrolchValueType for the types of values which Strolch knows about
2015-07-08 07:47:46 +02:00
Robert von Burg 5fe84b1d02 [Major] Extended XmlExportModel XmlImportModel for Activities 2015-07-08 07:42:53 +02:00
Robert von Burg 8f7f6aa920 [Major] Major refactoring of toDom and toSax implementations
- adding Activity and Action
- remove methods on model itself and move to visitors
2015-07-03 15:11:49 +02:00
Robert von Burg 521bd84ce0 [Major] StrolchComponent methods can now throw Exception
- execption handling is done in the ComponentContainerStateHandler
- clients now not need to worry about exceptions which would make them
  rethrow anyhow as a runtime exception
2015-06-11 19:19:52 +02:00
Robert von Burg 503bdbe4d6 [Major] refactored SystemUserActions in privilege
Now a SystemUserAction is defined as follows:
<Privilege name="ch.eitchnet.privilege.handler.SystemUserAction" 
    policy="DefaultPrivilege">
  <Allow>li.strolch.agent.impl.StartRealms</Allow>
</Privilege>
2015-06-03 23:32:23 +02:00
msmock 97c7e36536 added the two core command required to set up a disposition application
and refactored to remove code duplication.
2015-05-24 11:08:04 +02:00
msmock 188a8d9461 simplified model and removed distinction between start and end operators
in action. Removed the action start and end attribute.
2015-05-23 10:14:16 +02:00
msmock 1109a7be2d Merge branch 'develop' of https://github.com/eitchnet/strolch into develop 2015-05-22 21:07:34 +02:00
msmock cce0fdc50b implemented core planning functionality where activity with all child
elements is created programmatically and the time and values of the
changes is set by the programmmer. Note, that the persistence and xml
serialization is not implemented yet.
2015-05-22 21:04:37 +02:00
Reto Breitenmoser f72f6a1c0e [Major] refactored the handling with code and data migration versions -
The version handling with code and data migrations was messed up. The
migration version was set after the data migration and then the code
migration used this value for further processing. Now there are two
attributes for the migration version (code and data). The files for the
data migration and the classes for the code migration have now
individual versions.
2015-05-22 18:21:41 +02:00
Robert von Burg d3dad2a827 [New] added Integer, Float and ListParameters
- including tests, etc.
2015-05-02 13:32:30 +02:00
Robert von Burg 01535fb515 [New] added connection pool properties for PersistenceHandler
- e.g. for PostgreSQL enforce pool size:
  <db.pool.maximumPoolSize>1</db.pool.maximumPoolSize>
2015-04-30 08:46:18 +02:00
Robert von Burg d31e9ffc6d [Project] Added missing license headers 2015-04-22 13:20:28 +02:00
Robert von Burg 86d4fe4eeb [Major] refactored DataMigration.buildMigrationVersionChangeCommand() 2015-04-14 21:17:01 +02:00
Robert von Burg 4383e8a1ab [Minor] fixed wrong actions for audits of locale,pw,state change of user 2015-04-05 01:20:54 +02:00
Robert von Burg bd4291b483 [Major] Moved privilege management into separate services
- instead of just calling the methods from the REST API, now we call
services
- this allows auditing who changes which privileges
2015-04-05 01:11:54 +02:00
Robert von Burg e163237613 [Minor] fixed broken tests 2015-04-03 13:37:56 +02:00
Robert von Burg 47bbafba22 [Minor] fixed broken test 2015-03-17 21:43:10 +01:00
Robert von Burg 2ee0d2fb4e [New] Added UserSession querying and modifying 2015-03-14 21:23:10 +01:00
Robert von Burg 819ae53708 [Minor] added missing PrivilegePolicies:
<Policy name="RoleAccessPrivilege"
    class="ch.eitchnet.privilege.policy.RoleAccessPrivilege" />
<Policy name="UserAccessPrivilege" 
    class="ch.eitchnet.privilege.policy.UserAccessPrivilege" />
2015-03-12 18:05:46 +01:00
Robert von Burg 5ffc03f115 [Minor] removed reference to non existing role PrivilegAdmin in users 2015-03-12 18:01:02 +01:00
Robert von Burg 5675027f6c [Minor] removed the PrivilegeAdmin role from all PrivilegeModel.xml 2015-03-12 17:43:42 +01:00
Robert von Burg 5602f56c15 [Major] allow user to change their own locale incl. auto persist 2015-03-08 21:44:35 +01:00
Robert von Burg 28a6e24842 [Minor] fixing broken service tests 2015-03-02 20:44:35 +01:00
Robert von Burg e961aa8cd3 [Project] Bumped version from 1.2.0-SNAPSHOT to 1.1.0-SNAPSHOT 2015-03-02 14:29:34 +01:00
Robert von Burg 460c26126e [Project] Bumped version from 1.1.0-SNAPSHOT to 1.2.0-SNAPSHOT 2015-03-02 14:28:18 +01:00
Robert von Burg 52e06f1818 [Project] Bumped version to 1.1.0-SNAPSHOT 2015-03-02 13:43:45 +01:00
Robert von Burg aa2f55fa53 [New] Refactored XML import and export model
- added allowInclude for recursive parsing of xml importing
- ModelStatistics is now JAXB capable
- added handling of absolute paths
2015-02-28 20:44:26 +01:00
Robert von Burg a832b2dc3e [New] Refactored XML import and export model
- added allowInclude for recursive parsing of xml importing
- ModelStatistics is now JAXB capable
- added handling of absolute paths
2015-02-28 20:41:52 +01:00
Robert von Burg a7de76933b [New] Added new ServiceExecutionHandler
The ServiceExecutionHandler is used to execute long running services
without needing singletons
2015-02-21 00:32:55 +01:00
Robert von Burg f46e72bbdb [New] XmlExportModelService can now export to absolute path 2015-02-21 00:20:30 +01:00
Robert von Burg c2efc19889 [Minor] don't log CurrentMigrationVersionQuery queries 2015-02-13 17:15:39 +01:00
Robert von Burg 174e5bd37f [Major] refactored MigrationsHandler
- now the currentVersions are queried later, because only after the
realm handler is started, can we query the current version.
- this lead to only parsing the migrations at initialize
- and thus in start querying the versions and performing the required
migrations
2015-02-12 17:25:59 +01:00
Robert von Burg 30d4916a7e [Minor] less logging 2015-02-11 23:49:25 +01:00
Robert von Burg b8c07015d1 [Bugfix] fixed bug where Migrations didn't handle missing realm
- If a code migration is run programmatically, then in some migrations
shouldn't fail if a realm is missing -> the realm might not be available
in a certain environment
2015-02-11 23:03:59 +01:00
Robert von Burg 5aef65861b [Minor] changed test to check for versions with qualifier 2015-02-11 16:52:37 +01:00
Robert von Burg cf807edd7a [New] added MigrationsHandler.runCodeMigrations()
- this allows a project to add migrations to be run in a post
initializer etc.
2015-02-11 16:41:43 +01:00
Robert von Burg cfb30486e0 [Bugfix] fixed broken migrations in multiple realms 2015-02-09 21:13:24 +01:00
Robert von Burg f43088d680 [Bugfix] fixed handlinge of missing migrations directory 2015-02-09 00:40:28 +01:00
Robert von Burg 70ec912446 [Minor] Ignoring TxTest.shouldNotAllowCommandsOnDoNothig()
- We have to re-think this. It does not work, throwing an exception if
commands are registered on a read-only TX as then we don't know if we
want to roll back or not - we probably need a ROLLBACK_ON_ERROR or
something, indicating that we are preparing a non-read-only TX.
2015-02-08 16:39:23 +01:00
Robert von Burg 7e0f9c95eb [Minor] Fixing broken tests 2015-02-08 16:37:49 +01:00
Robert von Burg 35c35b9d1c [New] Added new MigrationsHandler to migrate the model
- Add the new MigrationsHandler as a StrolchComponent
- add migrations/data/<realm>/n.n.n.xml files
- and your migration will run
2015-02-08 12:59:21 +01:00
Robert von Burg 3fc4c83a61 [Minor] removed all tx.commitOnClose() for read only TXs 2015-02-06 22:13:48 +01:00
Robert von Burg 85b82f6628 [New] Added TransactionCloseStrategy.DO_NOTHING
- added a new closing strategy which is now the default closing
strategy. This effectively makes a new transaction read only
2015-02-06 21:35:38 +01:00
Robert von Burg 40c9ac7969 [Major] added new feature tx.flush()
- Now if you need to perform commands to carry on in your transaction,
you can simply use the tx.flush()-method.
- Should something go wrong, then even after a tx.flush() one can call
throw tx.fail("Reason") or tx.rollbackOnClose()
2015-02-06 09:18:12 +01:00
Robert von Burg a9f3b04b3f [Devel] fixing flushing of TX not working on rollback 2015-02-03 23:19:29 +01:00
Robert von Burg b0cf516dab [Major] Refactored how a TX is closed
- So sadly just auto closing a TX using try-resource from Java7 is a bad idea.
- Doing that leads to problems when an exception is thrown, then the close is called (duh) but this leads to commit being called.
- Since the Java language does not offer a decent way to detect if the close is being called in the context of an exception i was forced to add a tx.commitOnClose() and tx.rollbackOnClose().
- The default is that when a TX is opened, then the close strategy is rollback; the API user must call tx.commitOnClose() before the TX is closed by the braces, or as late as possible, to make sure that if an exception is thrown the transaction is rolled back, and not committed.
- The API was also extended with a tx.fail(msg):StrolchTransactionException so that if the implementor detects an unrecoverable error, one can write: throw tx.fail(“my reason”);

This was sadly an unavoidable late 1.0.0 change
2015-02-03 23:18:31 +01:00
Robert von Burg 2f84091f76 [Devel] adding new feature tx.flush() 2015-01-26 00:50:46 +01:00
Robert von Burg e44775f30b [Bugfix] fixed not unlocked objects after TX
When a TX is closed, all locked objects are unlocked. The but originated from multiple commands being performed for the same object, thus the object was locked multiple times i.e. the lock counter was >1. Now added a releaseLock() method which is called by the TX when the TX is closed so that the lock counter is really 0 and the lock is released.

- Added tests for this situation
- documented the LockHandler
2015-01-16 13:59:17 +01:00
Robert von Burg 6e265c755b [Major] refactored DbSchemaVersionCheck and added version parsing
- Now we can use Version to see if current version is greater than
- Fixed bug where version checking didn't check for app
- TODO is still open to handle migration with intermediary steps
2015-01-09 12:34:05 +01:00
Robert von Burg 304255fcc2 [Minor] fixed broken tests due to change in privilege handling 2014-12-31 17:00:59 +01:00
Robert von Burg b70ee2d228 [New] Added LoginResult.getRoles(), modified logs
- also log user when performing service calls
- also log user when committing TX
2014-12-31 16:41:00 +01:00
Robert von Burg 85d1a4a145 [Major] refactored PostgreSQL DB schema validation
Now moved all generic schema generation code to ch.eitchnet.utils so it can be used by other projects
2014-11-14 00:07:53 +01:00
msmock 36b47dd971 Implemented base structure for planning and scheduling on resources 2014-10-23 08:59:20 +02:00
Robert von Burg 8593ab4a15 [Minor] fixed broken test due to change in value time format 2014-10-09 13:23:06 +02:00
Robert von Burg d55371e9b7 [Minor] fixed component version descriptions 2014-10-04 14:35:01 +02:00
Robert von Burg ada9abb097 [Project] Bumped version from 1.0.0-RC1 to 1.0.0-SNAPSHOT 2014-09-20 15:23:11 +02:00
Robert von Burg 7c0ab16c9e [Project] bumped version from 1.0.0-SNAPSHOT to 1.0.0-RC1 2014-09-20 14:38:29 +02:00
Robert von Burg 890b9f47cd [New] added new setVersion.sh script 2014-09-20 00:31:04 +02:00
Robert von Burg fe37e0aae0 [Project] added a new parent pom where Strolch's version is set 2014-09-19 20:09:42 +02:00
Robert von Burg f590a12e3a [Project] added a new parent pom where Strolch's version is set 2014-09-19 19:23:49 +02:00
Robert von Burg 6b5006c0bb [Project] fixed scm configuration in poms 2014-09-19 18:31:55 +02:00
Robert von Burg fadafe0599 moved everything to a subdirectory for repo merge 2014-09-16 08:53:28 +02:00