Commit Graph

149 Commits

Author SHA1 Message Date
Robert von Burg 4965af17b4 [Minor] Activity casts to returned object 2017-05-04 15:48:26 +02:00
Robert von Burg ca50609131 [New] Added new method .getParameterBagsByType() 2017-05-03 13:52:34 +02:00
Robert von Burg ae0fba00ca [New] Added Selection.not() to return inversion of selection 2017-05-01 17:39:04 +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 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 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 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 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 4e1e1ccb8f [New] Add toXml() and toJson() methods on StrolchRootElement 2017-03-29 09:50:15 +02:00
Robert von Burg 299f789fb2 [Fix] AbstractStrolchTimedState should also clone optional fields 2017-03-28 19:30:11 +02:00
Robert von Burg 7ee002adcf [New] Added GroupedParameterizedElement.getParameterBag(String,boolean) 2017-03-27 14:36:09 +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 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 a88a098bf3 [Minor] Wrapping exception in FromFlatJsonVisitor 2017-03-14 18:48:42 +01:00
Robert von Burg 72af643d38 [Minor] implemented chaining on FromFlatJsonVisitor 2017-03-06 12:28:48 +01:00
Robert von Burg 538ded80b8 [Fix] Fixed not closing document in StrolchXmlHelper, added test 2017-03-02 19:41:22 +01:00
Robert von Burg 2724bb9706 [Minor] Added logger in StrolchXmlHelper 2017-03-02 17:06:53 +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 6cc22c21a8 [New] Added StrolchXmlParser to quickly parse from a file 2017-03-02 15:00:35 +01:00
Robert von Burg 62a441e038 [Major] Added Parameter.clearValue() and list parameters use , as sep 2017-03-02 14:59:03 +01:00
Robert von Burg fa7309cb19 [New] Added StrolchElementQuery.internal() 2017-03-01 01:37:55 +01:00
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