Skip to content

Commit 6e7ede2

Browse files
committed
1) Remove use of 'All' for published-min/max query parameters in NotificationServiceImpl class, 2) Correct spelling of 'propagation' in ImportServiceImpl class
1 parent 459c51f commit 6e7ede2

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

src/main/java/org/energyos/espi/common/service/impl/ImportServiceImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public void importData(InputStream stream, Long retailCustomerId)
220220
// an Authorization w/o an associated subscription breaks
221221
// the propagation chain
222222
System.out
223-
.printf("**** End of Notification Propgation Chain\n");
223+
.printf("**** End of Notification Propagation Chain\n");
224224
}
225225
if (subscription != null) {
226226
String resourceUri = authorization.getResourceURI();

src/main/java/org/energyos/espi/common/service/impl/NotificationServiceImpl.java

+5-10
Original file line numberDiff line numberDiff line change
@@ -59,29 +59,24 @@ public class NotificationServiceImpl implements NotificationService {
5959
@Override
6060
public void notify(Subscription subscription,
6161
XMLGregorianCalendar startDate, XMLGregorianCalendar endDate) {
62+
6263
String thirdPartyNotificationURI = subscription
6364
.getApplicationInformation().getThirdPartyNotifyUri();
6465
String separator = "?";
65-
String startDateString = "All";
66-
String endDateString = "All";
67-
68-
if (startDate != null)
69-
startDateString = startDate.toXMLFormat();
70-
if (endDate != null)
71-
endDateString = endDate.toXMLFormat();
72-
7366
String subscriptionURI = subscription.getApplicationInformation()
7467
.getDataCustodianResourceEndpoint()
7568
+ "/Batch/Subscription/"
7669
+ subscription.getId();
70+
7771
if (startDate != null) {
7872
subscriptionURI = subscriptionURI + separator + "published-min="
79-
+ startDateString;
73+
+ startDate.toXMLFormat();
8074
separator = "&";
8175
}
76+
8277
if (endDate != null) {
8378
subscriptionURI = subscriptionURI + separator + "published-max="
84-
+ endDateString;
79+
+ endDate.toXMLFormat();
8580
}
8681

8782
BatchList batchList = new BatchList();

0 commit comments

Comments
 (0)