Commit Graph

981 Commits

Author SHA1 Message Date
Robert von Burg c0b9ac930e [Bugfix] fixed writing time of TimeValue to XML 2015-02-28 20:35:53 +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 193b76ed60 [Bugfix] fixed bug on AbstractToSaxWriterVisitor writing timestates 2015-02-21 00:19:58 +01:00
Robert von Burg c9d16f9ee4 [Minor] StrolchElementQuery fields are now protected 2015-02-14 23:24:38 +01:00
Robert von Burg 249cc0a6b0 [New] added ListParameter.isValueEmpty() 2015-02-14 23:24:20 +01:00
Robert von Burg 6ae389bc75 [Minor] added further test in QueryTest for param 2015-02-14 23:04:12 +01:00
Robert von Burg 752c79d497 [Minor] Locator constructors are private use Locator.valueOf() 2015-02-14 22:21:24 +01:00
Robert von Burg 2a79ed701b [New] Added ListParameter.clearValue() 2015-02-14 19:14:34 +01:00
Robert von Burg c2efc19889 [Minor] don't log CurrentMigrationVersionQuery queries 2015-02-13 17:15:39 +01:00
Robert von Burg 69af0d75bc [New] added StrolchTransaction.setSuppressDoNothingLogging() 2015-02-13 17:15:25 +01:00
Robert von Burg a8e5a07a9d [Minor] Updated ch.eitchnet.utils submodule 2015-02-13 15:30:11 +01:00
Robert von Burg 1888e2ea70 [Minor] Updated ch.eitchnet.utils submodule 2015-02-13 12:55:29 +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 9a8f29de34 [Minor] minor exception message changes on refP 2015-02-11 23:02:30 +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 c224dc63b6 [Bugfix] fixed not adding firstname and last name to sys user cert 2015-02-09 00:35:16 +01:00
Robert von Burg f847ff3208 [Bugfix] fixed bug in RuntimeConfiguration
- the methods getConfigFile and getDataFile() didn't properly evaluate
if they should throw an exception if a directory or file does not exist
2015-02-08 16:48:49 +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 e741680959 [Devel] Implementing MigrationsHandler
- currently the parsing of the versions is handled
- missing is the actual loading of the date into the realms
- and the performing of the code migrations
- and the registering of the performed migrations
2015-02-07 23:56:59 +01:00
Robert von Burg 2375c94dd6 [Minor] removed all tx.commitOnClose() for read only TXs 2015-02-06 22:26:30 +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 1736435864 Merge branch 'feature/tx-flush' into develop
Conflicts:
	li.strolch.agent/src/main/java/li/strolch/persistence/api/StrolchTransaction.java
2015-02-06 09:20:34 +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 46ccb921df [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
Conflicts:
	li.strolch.agent/src/main/java/li/strolch/persistence/api/AbstractTransaction.java
2015-02-03 23:21:28 +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 9532c97ef1 [Major] fixed issue with CACHED not querying inmemory
- this was a big issue as the query was delegated by the TX to the
persistence handler, which meant that the current element map types
(cached, transactional, etc.) were ignored. Move the doQuery to the
element maps, and this lead to also reimplementing the way the cached
element maps work: they now use an in memory dao, instead of MapOfMaps
2015-02-01 22:28:42 +01:00
Robert von Burg a0f832c7db [Major] changed ParameterSelection implementation
- stringListSelection() uses contains, instead of equals now
- dateRangeSelection() uses a date range object now
2015-02-01 14:12:53 +01:00
Robert von Burg 96f7c3d20f [Project] Site: Java8 and referencing tools used 2015-01-31 12:01:23 +01:00
Robert von Burg 2f84091f76 [Devel] adding new feature tx.flush() 2015-01-26 00:50:46 +01:00
Robert von Burg 569c745cc7 [New] added tx.getCertificate() 2015-01-23 12:08:19 +01:00
Robert von Burg be6f1d170f [New] added tx.get*()-methods with assertExists boolean
- now a user can always use that flag to guarantee the element exists
2015-01-23 12:06:15 +01:00
Robert von Burg 120ff0ace9 [New] Added tx.getTemplate*(), documented TX, added StrolchLockException 2015-01-23 11:40:17 +01:00
Robert von Burg 9711914056 [Project] due to stricter Java8 JavaDoc lint, deactivate strict mode 2015-01-22 18:23:15 +01:00
Robert von Burg 1652de3503 [Major] Project now requires Java8 2015-01-22 18:04:33 +01:00
Robert von Burg 99887642a6 [Bugfix] fixed bug where controllers aren't properly stopped
- this occurred for controllers which had dependencies of other
dependencies
2015-01-20 20:08:58 +01:00
Robert von Burg 72abd2a175 Merge branch 'develop' of git@github.com:eitchnet/strolch.git into develop 2015-01-20 19:48:10 +01:00
Robert von Burg bacf17b1a7 [New] Added tx.auditFrom()
- this allows to quickly create a new Audit which uses the details from
the current TX. This TX can then be added to the auditTrail for
persisting
2015-01-20 19:47:49 +01:00
Robert von Burg b731be86e3 [Bugfix] fixed bug where controllers aren't properly stopped
- this occurred for controllers which had dependencies of other
dependencies
2015-01-20 19:43:51 +01:00
Robert von Burg 15ae2f9702 [Minor] don't log multiple times the exception on failed service 2015-01-18 19:17:16 +01:00
Robert von Burg 9505ab355c [New] Added new StrolchAccessDeniedException for use in ServiceHandler
Now if you add the DefaultServiceHandler property 'throwOnPrivilegeFail'
and set it to true, then the service handler will throw a
StrolchAccessDeniedException which in combination with the
StrolchRestfulExceptionMapper allows rest services to quickly determine
if the error was because the user does not have access to the requested
resource.

Same goes for performing queries in AbstractTransaction only there
instead of throwing a privilege exception, we now also throw a
StrolchAccessDeniedException
2015-01-18 18:37:04 +01:00