2424 * Project: White Label Digital Twin Java Framework - (whitelabel-digitaltwin)
2525 * Defines an Interface allowing the Digital Twin developer to implement its internal storage system for the Digital Twin instance.
2626 * The interface defines methods for the management of:
27- * i) Digital Twin State storage and retrieval;
28- * ii) Digital Twin State Change List storage and retrieval;
29- * iii) Received Physical Events;
30- * iv) Generated Digital Events;
31- * v) Life Cycle State storage and retrieval;
32- * vi) Physical Asset Description storage and retrieval;
33- * vii) Physical Asset Property Variation storage and retrieval;
34- * viii) Physical Asset Relationship Instance storage and retrieval;
35- * ix) Digital Action Request storage and retrieval;
36- * x) Physical Asset Action Request storage and retrieval;
37- * xi) Physical Asset Event Notification storage and retrieval;
27+ * - Digital Twin State storage and retrieval with the associated change list;
28+ * - Generated State Digital Events;
29+ * - Life Cycle State storage and retrieval;
30+ * - Physical Asset Description storage and retrieval;
31+ * - Physical Asset Property Variation storage and retrieval;
32+ * - Physical Asset Relationship Instance storage and retrieval;
33+ * - Digital Action Request storage and retrieval;
34+ * - Physical Asset Action Request storage and retrieval;
35+ * - Physical Asset Event Notification storage and retrieval;
3836 */
3937public abstract class WldtStorage {
4038
@@ -177,7 +175,7 @@ public void setStorageId(String storageId) {
177175 * Returns the latest computed Digital Twin State of the target Digital Twin instance
178176 * @return the latest computed Digital Twin State
179177 */
180- public abstract Optional <DigitalTwinStateRecord > getLastDigitalTwinStateVariation () throws StorageException ;
178+ public abstract Optional <DigitalTwinStateRecord > getLastDigitalTwinState () throws StorageException ;
181179
182180 /**
183181 * Returns the number of computed and stored Digital Twin States
@@ -242,6 +240,12 @@ public void setStorageId(String storageId) {
242240 */
243241 public abstract void saveLifeCycleState (LifeCycleStateVariation lifeCycleStateVariation ) throws StorageException ;
244242
243+ /**
244+ * Get the last LifeCycleState of the Digital Twin
245+ * @return the last LifeCycleState of the Digital Twin
246+ */
247+ public abstract LifeCycleVariationRecord getLastLifeCycleState () throws StorageException ;
248+
245249 /**
246250 * Get the number of LifeCycleState of the Digital Twin
247251 * @return the number of LifeCycleState of the Digital Twin
@@ -448,21 +452,21 @@ public void setStorageId(String storageId) {
448452 * Save the Physical Asset Relationship Instance Created Event
449453 * @param physicalRelationshipInstanceVariation the Physical Relationship Instance Variation to be saved
450454 */
451- public abstract void savePhysicalAssetRelationshipInstanceCreatedEvent (PhysicalRelationshipInstanceVariation physicalRelationshipInstanceVariation ) throws StorageException ;
455+ public abstract void savePhysicalAssetRelationshipInstanceCreatedNotification (PhysicalRelationshipInstanceVariation physicalRelationshipInstanceVariation ) throws StorageException ;
452456
453457 /**
454458 * Get the number of Physical Asset Relationship Instance Created Event
455459 * @return the number of Physical Asset Relationship Instance Created Event
456460 */
457- public abstract int getPhysicalAssetRelationshipInstanceCreatedEventCount () throws StorageException ;
461+ public abstract int getPhysicalAssetRelationshipInstanceCreatedNotificationCount () throws StorageException ;
458462
459463 /**
460464 * Get the Physical Asset Relationship Instance Created Event in the specified time range
461465 * @param startTimestampMs the start timestamp of the time range
462466 * @param endTimestampMs the end timestamp of the time range
463467 * @return the list of Physical Asset Relationship Instance Created Event in the specified time range
464468 */
465- public abstract List <PhysicalRelationshipInstanceVariationRecord > getPhysicalAssetRelationshipInstanceCreatedEventInTimeRange (long startTimestampMs , long endTimestampMs ) throws StorageException , IllegalArgumentException ;
469+ public abstract List <PhysicalRelationshipInstanceVariationRecord > getPhysicalAssetRelationshipInstanceCreatedNotificationInTimeRange (long startTimestampMs , long endTimestampMs ) throws StorageException , IllegalArgumentException ;
466470
467471 /**
468472 * Get the Physical Asset Relationship Instance Created Event in the specified range of indices
@@ -472,27 +476,27 @@ public void setStorageId(String storageId) {
472476 * @throws IndexOutOfBoundsException if the startIndex or endIndex is out of bounds
473477 * @throws IllegalArgumentException if startIndex is greater than endIndex
474478 */
475- public abstract List <PhysicalRelationshipInstanceVariationRecord > getPhysicalAssetRelationshipInstanceCreatedEventInRange (int startIndex , int endIndex ) throws StorageException , IllegalArgumentException ;
479+ public abstract List <PhysicalRelationshipInstanceVariationRecord > getPhysicalAssetRelationshipInstanceCreatedNotificationInRange (int startIndex , int endIndex ) throws StorageException , IllegalArgumentException ;
476480
477481 /**
478482 * Save the Physical Asset Relationship Instance Updated Event
479483 * @param physicalRelationshipInstanceVariation the Physical Relationship Instance Variation to be saved
480484 */
481- public abstract void savePhysicalAssetRelationshipInstanceDeletedEvent (PhysicalRelationshipInstanceVariation physicalRelationshipInstanceVariation ) throws StorageException ;
485+ public abstract void savePhysicalAssetRelationshipInstanceDeletedNotification (PhysicalRelationshipInstanceVariation physicalRelationshipInstanceVariation ) throws StorageException ;
482486
483487 /**
484488 * Get the number of Physical Asset Relationship Instance Updated Event
485489 * @return the number of Physical Asset Relationship Instance Updated Event
486490 */
487- public abstract int getPhysicalAssetRelationshipInstanceDeletedEventCount () throws StorageException ;
491+ public abstract int getPhysicalAssetRelationshipInstanceDeletedNotificationCount () throws StorageException ;
488492
489493 /**
490494 * Get the Physical Asset Relationship Instance Updated Event in the specified time range
491495 * @param startTimestampMs the start timestamp of the time range
492496 * @param endTimestampMs the end timestamp of the time range
493497 * @return the list of Physical Asset Relationship Instance Updated Event in the specified time range
494498 */
495- public abstract List <PhysicalRelationshipInstanceVariationRecord > getPhysicalAssetRelationshipInstanceDeletedEventInTimeRange (long startTimestampMs , long endTimestampMs ) throws StorageException , IllegalArgumentException ;
499+ public abstract List <PhysicalRelationshipInstanceVariationRecord > getPhysicalAssetRelationshipInstanceDeletedNotificationInTimeRange (long startTimestampMs , long endTimestampMs ) throws StorageException , IllegalArgumentException ;
496500
497501 /**
498502 * Get the Physical Asset Relationship Instance Updated Event in the specified range of indices
@@ -502,7 +506,7 @@ public void setStorageId(String storageId) {
502506 * @throws IndexOutOfBoundsException if the startIndex or endIndex is out of bounds
503507 * @throws IllegalArgumentException if startIndex is greater than endIndex
504508 */
505- public abstract List <PhysicalRelationshipInstanceVariationRecord > getPhysicalAssetRelationshipInstanceDeletedEventInRange (int startIndex , int endIndex ) throws StorageException , IndexOutOfBoundsException , IllegalArgumentException ;
509+ public abstract List <PhysicalRelationshipInstanceVariationRecord > getPhysicalAssetRelationshipInstanceDeletedNotificationInRange (int startIndex , int endIndex ) throws StorageException , IndexOutOfBoundsException , IllegalArgumentException ;
506510
507511 /**
508512 * Initialize the WLDT Storage
0 commit comments