Commit Graph

271 Commits

Author SHA1 Message Date
Robert von Burg 1779bcc99f [New] Allow to not map name on ToFlatJsonVisitor 2017-02-27 18:53:57 +01:00
Robert von Burg e27a0969ee [Major] Changes in FlatJsonVisitor 2017-02-27 17:25:24 +01:00
Robert von Burg c89e04a356 [Major] Moved *ToFlat and *FromFlat Json Visitors to strolch model 2017-02-27 14:11:49 +01:00
Robert von Burg 967b54f279 [New] Added Activity.getActionsWithState(State) 2017-02-22 17:46:27 +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 c62bbe987e [Minor] Add Activity.remove(String) to remove an element 2017-02-22 10:59:53 +01:00
Robert von Burg e5f454d57d [Minor] Add Activity.remove(String) to remove an element 2017-02-22 10:56:04 +01:00
Robert von Burg b70106260a [Fix] Fix bugs in formatting to JSON 2017-02-08 15:43:23 +01:00
Robert von Burg 753806f672 [New] Added inspector REST api for activities 2017-02-02 12:55:59 +01:00
Robert von Burg 113b953e37 [Major] Json Tags are now in Tags.Json and are drinking camel-case 2017-02-02 12:13:46 +01:00
Robert von Burg 1d25a2a46b [Major] Json Tags are now in Tags.Json and are drinking camel-case 2017-02-02 11:58:59 +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 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 89830c0412 [Minor] resource id and type are optional in model schema 2016-10-06 08:17:26 +02:00
Robert von Burg 61b3a3e5bf [Minor] Fixing broken tests 2016-10-03 11:36:35 +02:00
Robert von Burg f023f682a8 [Major] Implemented State Model on Activity/Actions
We have three major blocks:
- In Execution Warning:
  - STOPPED
  - WARNING
  - ERROR
- in execution:
  - above including EXECUTION and EXECUTED
- in planning:
  - PLANNING and PLANNED
- CREATED
- CLOSED

EXECUTION is used if any action is EXECUTED and a prior state exists
PLANNING is used if any action is PLANNED and PLANNING or CREATED 
  state exists
CLOSED is only used if everything is CLOSED, otherwise one of the
previous states is used
2016-09-30 16:28:35 +02:00
Robert von Burg 3385694563 [Project] StrolchModel-1.4.xsd: added required for attributes 2016-09-28 15:15:18 +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 c4748403d8 [Major] Versionized Namespace to 1.4 2016-09-23 11:09:39 +02:00
Robert von Burg d74807cffa [Major] Versionized Namespace to 1.4 2016-09-23 11:06:12 +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 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 e3ea9fa159 [New] When retrieving new templates, then the type and ID is set auto 2016-09-21 15:47:18 +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 d127a93ed7 [Minor] SimpleStrolchElementListener now stores as map 2016-09-17 17:21:39 +02:00
Robert von Burg 916f927ccd [Minor] Allow to create locator even if parent is missing 2016-09-01 10:06:32 +02:00
Robert von Burg 41f5f22574 [Minor] Allow to override privilegeValue in StrolchElementQuery
use this together with the value "internal" to define queries as
internal, so you can make them executable without having to allow all
queries
2016-08-31 12:29:29 +02:00
Robert von Burg 9cc7ed72b0 [New] StrolchValueType has methods .isBoolean(), isNumber, isString() 2016-08-26 16:42:26 +02:00
Robert von Burg a60c300d5c [New] Creating a XML Schema for Strolch model as XML 2016-08-12 10:25:06 +02:00
Robert von Burg 5dd1a6f277 [New] Creating a XML Schema for Strolch model as XML 2016-08-12 10:22:02 +02:00
Robert von Burg 762f36b184 [New] Creating a XML Schema for Strolch model as XML 2016-08-12 10:21:29 +02:00
Robert von Burg 977674b9c5 [New] Creating a XML Schema for Strolch model as XML 2016-08-12 10:15:19 +02:00
Robert von Burg b889230b7e [New] Creating a XML Schema for Strolch model as XML 2016-08-11 11:11:37 +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 26961b33cc [Major] Implemented opt-in versioning
- adding versioning tests
- fixing broken tests
- implemented missing PostgreSQL DAO methods
2016-08-07 11:49:36 +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 0703103d3b [Major] Refactored object hierarchy and added version to objects
- New ParameterBagContainer interface for GroupedParameterizedElement
- StrolchRootElement extends ParameterBagContainer
- StrolchRootElement is now required in Queries, not StrolchElement
- New Version object on StrolchRootElement
2016-07-31 14:56:57 +02:00
Robert von Burg 47df6b20c7 [New] Added proper marshalling to/from JSON for entire model 2016-07-31 09:28:06 +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 cac24481ee [New] Added toJson visitor for Activity/Action 2016-04-08 18:04:19 +02:00
Robert von Burg 8a5c4468c5 [Major] Now using a nice query parser for resource querying in planning 2016-04-05 08:30:40 +02:00
Robert von Burg a74508ba12 [WIP] Added Resource table loading to planning web 2016-04-01 18:24:35 +02:00
Robert von Burg 503954554b [Minor] Minor fixes 2016-02-10 18:13:20 +01:00
Robert von Burg 794b3a4d38 [Project] Resource.getTimedState():<T extends StrolchTimedState<?>> T 2016-02-10 17:57:43 +01:00
Robert von Burg 465d949071 [Minor] removed unnecessary cast 2016-02-10 17:48:55 +01:00
Robert von Burg 3502a4adad [Minor] Removed redundant types (diamond operator) 2016-02-10 17:46:50 +01:00
Robert von Burg 0473b472b3 [Major] Added PolicyContainer interface
Resource, Order, Activity and Action now implement this interface and Command.getPolicy() now takes a PolicyContainer as a parameter.
2016-02-10 17:37:50 +01:00
Robert von Burg 8fdcc00ed7 [New] Changed GroupedParameterizedElement.getParameter()
- now returns <T extends Parameter<?>>
2015-12-02 22:04:28 +01:00
Robert von Burg 9c7b155b9d [Minor] Fixed closing empty tag in StrolchElementToSaxWriterVisitor 2015-11-28 12:37:15 +01:00
Robert von Burg d06fe4fb04 [New][Major] Initial to JSON visitors for Resources and Orders
- added PolicyDefs to Actions
- also fixed a bug in StringSetValue().getValueAsString()
- further refactorings and clean-up
2015-11-16 22:37:00 +01:00
Robert von Burg b76f90d7bd [Minor] Allow not setting of State on Order and Action 2015-08-28 15:00:10 +02:00
Robert von Burg 01a86ca9f7 [Major] Added StrolchPolicy as super class of all Strolch policies
- this allows to inject a StrolchTransaction and the ComponentContainer
during instantiation
2015-08-22 20:44:31 +02:00
Robert von Burg 12ca8c4f07 [Major] Refactored package for policies in model project
- added additional tests
2015-08-22 15:29:48 +02:00
Robert von Burg 5da07f5824 [Major] Refactored package for policies in model project
- added additional tests
2015-08-22 15:09:30 +02:00
Robert von Burg 339a736c59 [Minor] Fixed broken tests in model due to new Policies in model 2015-08-22 12:07:59 +02:00
Robert von Burg 0e3b3b2a1e [Minor] [New] Implemented and fixed remaining policy tests 2015-08-22 12:04:41 +02:00
Robert von Burg ac1885883a [New] Added Policies
You can now add policies to Resources, Orders and Activities:
<Policies>
	<Policy Type="PlanningPolicy" Value="key:SimplePlanningPolicy" />
	<Policy Type="ExecutionPolicy"
Value="java:li.strolch.policy.execution.TestSimulatedExecutionPolicy" />
	<Policy Type="ConfirmationPolicy" Value="key:NoConfirmation" />
</Policies>

And now there is a PolicyHandler to get the Policy:
<Component>
	<name>PolicyHandler</name>
	<api>li.strolch.policy.PolicyHandler</api>
	<impl>li.strolch.policy.DefaultPolicyHandler</impl>
	<Properties>
		<readPolicyFile>true</readPolicyFile>
		<policyConfigFile>StrolchPolicies.xml</policyConfigFile>
	</Properties>
</Component>

Which has its own configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<StrolchPolicies>

	<PolicyType Type="PlanningPolicy"
Api="li.strolch.policytest.TestPlanningPolicy">
		<Policy Key="SimplePlanningPolicy"
Class="li.strolch.policytest.TestSimplePlanningPolicy" />
	</PolicyType>

	<PolicyType Type="ConfirmationPolicy"
Api="li.strolch.policytest.TestConfirmationPolicy">
		<Policy Key="NoConfirmation"
Class="li.strolch.policytest.TestNoConfirmationPolicy" />
	</PolicyType>

</StrolchPolicies>

Some tests are still broken at this state - will fix them in the next
commit
2015-08-21 17:38:41 +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 4b96679588 [Major] refactored compareTo()-method on StrolchElements
Parameters are now comparable, but remove from some others like the
timed states
2015-07-29 18:54:42 +02:00
Robert von Burg 3ea59da454 Merge remote-tracking branch 'refs/remotes/origin/activity-agent-map' into develop 2015-07-08 08:50:02 +02:00
Robert von Burg 5822c231f0 [Major] Added SAX XML persistence incl. DOM for Activities 2015-07-08 08:21:11 +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 588952b526 [Major] Major refactoring of SAX and DOM implemenetations
- also added SAX and DOM visitors for Acitivities and Actions
2015-07-07 17:53:17 +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 e2ac84ecdc [New][Devel] Work in progress of implementing ActivityMap
- Implemented PostgreSQL persistence

Still missing is the xml persistence implementation and fixing
the tests. Currently no tests were run, just trying to fix compile
errors
2015-06-29 08:34:14 +02:00
Robert von Burg 82ce5a7261 [New][Devel] Work in progress of implementing ActivityMap
- Creating new maps for transient, transactional and cached mode
- adding to Realms; including initialization
- adding new methods to transactions e.g. getActivityBy(), etc.
- Adding new ActivityDao with InMemory implementation
- extending PersistenceHandler
- fixed compile errors in the rest of the project

Still missing is the implementation in persistence handler and fixing
the tests. Currently no tests were run, just trying to fix compile
errors
2015-06-28 20:42:42 +02:00
Reto Breitenmoser c26dde6274 [minor] changed encoding to upper case because jaxb ignores lowercase
encoding type
2015-06-18 20:39:03 +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 3cb65a049c updated header comment 2015-05-24 11:18:01 +02:00
msmock 19c6d0827f implemented xml serialization for activity, action and value changes. 2015-05-23 12:29:45 +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 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
Robert von Burg 74366ea8a5 [New] added Locator.isEqualOrChildOf() including tests 2015-05-15 20:14:41 +02:00
Robert von Burg 754caff688 [New] Added Locator.isChildOf(Locator)
- including a new test class
2015-05-12 18:31:13 +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 d31e9ffc6d [Project] Added missing license headers 2015-04-22 13:20:28 +02:00
Robert von Burg 5c25f9d003 [Minor] fixing broken test 2015-04-19 19:23:40 +02:00
Robert von Burg 9671156f09 [Bugfix] don’t return null in StrolchElementListener getting of lists 2015-04-19 16:38:48 +02:00
Robert von Burg 69c842034a [New] Added rest GET of Order and Resource as XML 2015-04-19 16:13:26 +02:00
Robert von Burg 6bd1ed58ad [New] Added limit and sorting to Audit query incl. REST API 2015-04-04 18:29:33 +02:00
Robert von Burg aa11f8098a [New] Added elementSubType to Audit 2015-04-04 17:53:54 +02:00
Robert von Burg 30608ba99a [New] Added REST API to query Audits 2015-04-02 20:26:20 +02:00
Robert von Burg 22ddb3bd74 [Bugfix] fixed brok Iso8601DateAdapter 2015-04-02 20:26:20 +02: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 f8e0b63e33 [New] added XmlModelSaxStreamReader 2015-02-28 20:43:59 +01:00
Robert von Burg e55a140e7c [New] added Iso8601DateAdapter for JAXB (un)marshalling of ISO8601 dates 2015-02-28 20:43:44 +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 c0b9ac930e [Bugfix] fixed writing time of TimeValue to XML 2015-02-28 20:35:53 +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 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 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 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 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
Robert von Burg c37fe1e11f [New] added StrolchElement.isRootElement() 2014-12-21 23:23:01 +01:00
Robert von Burg 765b040cf9 [Major] Added writing of TimedStates in StrolchElementToSaxVisitor 2014-11-19 07:52:42 +01:00
Robert von Burg b55256ddad [Bugfix] Fixed wrong parsing of StringListParameter string value
Oh boy... how could i not trim the valeus!? =)
2014-11-14 12:43:04 +01:00
msmock 36b47dd971 Implemented base structure for planning and scheduling on resources 2014-10-23 08:59:20 +02:00
Robert von Burg 5fbbe50667 [Bugfix] fix NPE when cloning Resources with no state vars 2014-10-04 23:58:46 +02:00
Robert von Burg b77f4b204f [New] added TimeVariable.clear()-method
Can be used to remove all currently existing TimedValues
2014-10-04 23:58:03 +02:00
Robert von Burg 8f50a159b1 [Major] changed XML format of time value of TimedStates to be ISO8601 2014-10-04 17:45:33 +02:00
Robert von Burg c1cdfbb4ea [Bugfix] added missing cloning of StringSetTimedState in Resources 2014-10-04 17:06:58 +02:00
Robert von Burg d55371e9b7 [Minor] fixed component version descriptions 2014-10-04 14:35:01 +02:00
Robert von Burg d7c6025c59 [New] Added a new parameter: DurationParameter of type "Duration"
The parameter is implemented in all visitors and also persistence layer
postgre.
2014-10-04 13:40:52 +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 0882274198 moved everything to a subdirectory for repo merge 2014-09-16 08:50:59 +02:00