Snippets

OICP 2.1 Push EVSE Data | Java

Updated by Julius Poessnecker

File (2) Example.java Modified

  • Ignore whitespace
  • Hide word diff
     setPaymentOptions      (PaymentOptions.Contract,
                             PaymentOptions.Direct).
 
+    setValueAddedServices   (ValueAddedServices.Reservation,
+                             ValueAddedServices.DynamicPricing,
+                             ValueAddedServices.ParkingSensors,
+                             ValueAddedServices.MaximumPowerCharging,
+                             ValueAddedServices.PredictiveChargePointUsage,
+                             ValueAddedServices.ChargingPlans
+                             ValueAddedServices.None)
+
     setAccessibility       (AccessibilityTypes.Paying_publicly_accessible).
     setHotlinePhoneNumber  ("+4955512345678").
     addAdditionalInfo      (info -> info.add(Languages.de, "This is a Testbox!")).
     });
 
 // Wait for the future to complete...
-req.get();
+req.get();
Updated by Julius Poessnecker

File (0) OICP Added

  • Ignore whitespace
  • Hide word diff
+The service description can be found in the OICP 2.1 (CPO).
+
+Section:
+3.3.1 eRoamingPushEVSEData
+
+To download the latest OICP Version, please visit our website:
+https://www.hubject.com/downloads/
Updated by Gregor Schermuly

File (1) Push EVSE Data | Java.java Added

  • Ignore whitespace
  • Hide word diff
+/**
+ * Creates a new PushEVSEData request.
+ *
+ * @param EVSEDataRecords a stream of EVSEDataRecords.
+ * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
+ * @param EVSEOperatorName the unique name of the EVSE operator for this request.
+ * @param Action the server side data management operation for this request.
+ * @return a new PushEVSEData request builder object.
+ */
+public PushEVSEDataRequest PushEVSEData(final Stream<EVSEDataRecord>  EVSEDataRecords
+                                        final EVSEOperator_Id         EVSEOperatorId,
+                                        final String                  EVSEOperatorName,
+                                        final ActionType              Action)
+{ ... }
+
+
+/**
+ * Creates a new PushEVSEData request.
+ *
+ * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
+ * @param EVSEOperatorName the unique name of the EVSE operator for this request.
+ * @param Action the server side data management operation for this request.
+ * @param EVSEDataRecords an array of EVSEDataRecords.
+ * @return a new PushEVSEData request builder object.
+ */
+public PushEVSEDataRequest PushEVSEData(final EVSEOperator_Id    EVSEOperatorId,
+                                        final String             EVSEOperatorName,
+                                        final ActionType         Action,
+                                        final EVSEDataRecord...  EVSEDataRecords)
+{ ... }

File (2) Example.java Added

  • Ignore whitespace
  • Hide word diff
+EVSEDataRecord EVSE1 = EVSEDataRecord.
+
+    Create                 (EVSE_Id.Parse("DE*GEF*E123456789*1")).
+    setChargingStationId   (ChargingStation_Id.Parse("DE*GEF*S123456789")).
+    addChargingStationName (name -> name.add(Languages.de, "Testbox 1").
+                                         add(Languages.en, "Testbox One")).
+
+    setAddress             (new Address(Country.Germany,
+                                        "07749", "Jena",
+                                        "Biberweg", "18")).
+
+    setGeoCoordinates      (Latitude. Parse(49.731102),
+                            Longitude.Parse(10.142530)).
+
+    setPlugs               (PlugTypes.TypeFSchuko,
+                            PlugTypes.Type2Outlet).
+
+    setAuthenticationModes (AuthenticationModes.NFC_RFID_Classic,
+                            AuthenticationModes.NFC_RFID_DESFire,
+                            AuthenticationModes.REMOTE).
+
+    setPaymentOptions      (PaymentOptions.Contract,
+                            PaymentOptions.Direct).
+
+    setAccessibility       (AccessibilityTypes.Paying_publicly_accessible).
+    setHotlinePhoneNumber  ("+4955512345678").
+    addAdditionalInfo      (info -> info.add(Languages.de, "This is a Testbox!")).
+    setIsOpen24Hours       ().
+
+    build();
+
+
+CompletableFuture req = new CPOClient("api.playground.hubject.com").
+
+    PushEVSEData(EVSEOperator_Id.Parse("DE*GEF"),
+                 ActionType.insert,
+                 EVSE1).
+
+    Run(ack -> {
+
+        if (ack.hasResult())
+            System.out.println("success!");
+
+        else {
+            System.out.println(ack.getStatusCode().getCode());
+            System.out.println(ack.getStatusCode().getDescription());
+            System.out.println(ack.getStatusCode().getAdditionalInfo());
+        }
+
+    });
+
+// Wait for the future to complete...
+req.get();

File Example.java Deleted

  • Ignore whitespace
  • Hide word diff
-EVSEDataRecord EVSE1 = EVSEDataRecord.
-
-    Create                 (EVSE_Id.Parse("DE*GEF*E123456789*1")).
-    setChargingStationId   (ChargingStation_Id.Parse("DE*GEF*S123456789")).
-    addChargingStationName (name -> name.add(Languages.de, "Testbox 1").
-                                         add(Languages.en, "Testbox One")).
-
-    setAddress             (new Address(Country.Germany,
-                                        "07749", "Jena",
-                                        "Biberweg", "18")).
-
-    setGeoCoordinates      (Latitude. Parse(49.731102),
-                            Longitude.Parse(10.142530)).
-
-    setPlugs               (PlugTypes.TypeFSchuko,
-                            PlugTypes.Type2Outlet).
-
-    setAuthenticationModes (AuthenticationModes.NFC_RFID_Classic,
-                            AuthenticationModes.NFC_RFID_DESFire,
-                            AuthenticationModes.REMOTE).
-
-    setPaymentOptions      (PaymentOptions.Contract,
-                            PaymentOptions.Direct).
-
-    setAccessibility       (AccessibilityTypes.Paying_publicly_accessible).
-    setHotlinePhoneNumber  ("+4955512345678").
-    addAdditionalInfo      (info -> info.add(Languages.de, "This is a Testbox!")).
-    setIsOpen24Hours       ().
-
-    build();
-
-
-CompletableFuture req = new CPOClient("api.playground.hubject.com").
-
-    PushEVSEData(EVSEOperator_Id.Parse("DE*GEF"),
-                 ActionType.insert,
-                 EVSE1).
-
-    Run(ack -> {
-
-        if (ack.hasResult())
-            System.out.println("success!");
-
-        else {
-            System.out.println(ack.getStatusCode().getCode());
-            System.out.println(ack.getStatusCode().getDescription());
-            System.out.println(ack.getStatusCode().getAdditionalInfo());
-        }
-
-    });
-
-// Wait for the future to complete...
-req.get();

File Push EVSE Data | Java.java Deleted

  • Ignore whitespace
  • Hide word diff
-/**
- * Creates a new PushEVSEData request.
- *
- * @param EVSEDataRecords a stream of EVSEDataRecords.
- * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
- * @param EVSEOperatorName the unique name of the EVSE operator for this request.
- * @param Action the server side data management operation for this request.
- * @return a new PushEVSEData request builder object.
- */
-public PushEVSEDataRequest PushEVSEData(final Stream<EVSEDataRecord>  EVSEDataRecords
-                                        final EVSEOperator_Id         EVSEOperatorId,
-                                        final String                  EVSEOperatorName,
-                                        final ActionType              Action)
-{ ... }
-
-
-/**
- * Creates a new PushEVSEData request.
- *
- * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
- * @param EVSEOperatorName the unique name of the EVSE operator for this request.
- * @param Action the server side data management operation for this request.
- * @param EVSEDataRecords an array of EVSEDataRecords.
- * @return a new PushEVSEData request builder object.
- */
-public PushEVSEDataRequest PushEVSEData(final EVSEOperator_Id    EVSEOperatorId,
-                                        final String             EVSEOperatorName,
-                                        final ActionType         Action,
-                                        final EVSEDataRecord...  EVSEDataRecords)
-{ ... }
Created by Gregor Schermuly

File Example.java Added

  • Ignore whitespace
  • Hide word diff
+EVSEDataRecord EVSE1 = EVSEDataRecord.
+
+    Create                 (EVSE_Id.Parse("DE*GEF*E123456789*1")).
+    setChargingStationId   (ChargingStation_Id.Parse("DE*GEF*S123456789")).
+    addChargingStationName (name -> name.add(Languages.de, "Testbox 1").
+                                         add(Languages.en, "Testbox One")).
+
+    setAddress             (new Address(Country.Germany,
+                                        "07749", "Jena",
+                                        "Biberweg", "18")).
+
+    setGeoCoordinates      (Latitude. Parse(49.731102),
+                            Longitude.Parse(10.142530)).
+
+    setPlugs               (PlugTypes.TypeFSchuko,
+                            PlugTypes.Type2Outlet).
+
+    setAuthenticationModes (AuthenticationModes.NFC_RFID_Classic,
+                            AuthenticationModes.NFC_RFID_DESFire,
+                            AuthenticationModes.REMOTE).
+
+    setPaymentOptions      (PaymentOptions.Contract,
+                            PaymentOptions.Direct).
+
+    setAccessibility       (AccessibilityTypes.Paying_publicly_accessible).
+    setHotlinePhoneNumber  ("+4955512345678").
+    addAdditionalInfo      (info -> info.add(Languages.de, "This is a Testbox!")).
+    setIsOpen24Hours       ().
+
+    build();
+
+
+CompletableFuture req = new CPOClient("api.playground.hubject.com").
+
+    PushEVSEData(EVSEOperator_Id.Parse("DE*GEF"),
+                 ActionType.insert,
+                 EVSE1).
+
+    Run(ack -> {
+
+        if (ack.hasResult())
+            System.out.println("success!");
+
+        else {
+            System.out.println(ack.getStatusCode().getCode());
+            System.out.println(ack.getStatusCode().getDescription());
+            System.out.println(ack.getStatusCode().getAdditionalInfo());
+        }
+
+    });
+
+// Wait for the future to complete...
+req.get();

File Push EVSE Data | Java.java Added

  • Ignore whitespace
  • Hide word diff
+/**
+ * Creates a new PushEVSEData request.
+ *
+ * @param EVSEDataRecords a stream of EVSEDataRecords.
+ * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
+ * @param EVSEOperatorName the unique name of the EVSE operator for this request.
+ * @param Action the server side data management operation for this request.
+ * @return a new PushEVSEData request builder object.
+ */
+public PushEVSEDataRequest PushEVSEData(final Stream<EVSEDataRecord>  EVSEDataRecords
+                                        final EVSEOperator_Id         EVSEOperatorId,
+                                        final String                  EVSEOperatorName,
+                                        final ActionType              Action)
+{ ... }
+
+
+/**
+ * Creates a new PushEVSEData request.
+ *
+ * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
+ * @param EVSEOperatorName the unique name of the EVSE operator for this request.
+ * @param Action the server side data management operation for this request.
+ * @param EVSEDataRecords an array of EVSEDataRecords.
+ * @return a new PushEVSEData request builder object.
+ */
+public PushEVSEDataRequest PushEVSEData(final EVSEOperator_Id    EVSEOperatorId,
+                                        final String             EVSEOperatorName,
+                                        final ActionType         Action,
+                                        final EVSEDataRecord...  EVSEDataRecords)
+{ ... }
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.