Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit 62c1aac

Browse files
committed
Clean up of MeterReadingService + javadoc start
1 parent c24e74c commit 62c1aac

File tree

7 files changed

+291
-198
lines changed

7 files changed

+291
-198
lines changed

src/main/java/org/energyos/espi/common/service/ExportService.java

Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,20 @@
77

88
import org.energyos.espi.common.utils.ExportFilter;
99

10+
11+
/**
12+
* @author jat1
13+
*
14+
* Export (via Green Button XML) any of numerous ESPI resources.
15+
*/
1016
public interface ExportService {
17+
18+
// Generic Forms
19+
20+
public void exportResource(Long resourceId, Class <T> clazz, OutputStream stream, ExportFilter exportFilter);
21+
22+
public void exportResources(Class<T> clazz, OutputStream stream, ExportFilter exportFilter);
23+
1124
// ApplicationInformation
1225

1326
// - ROOT form
@@ -17,82 +30,245 @@ public interface ExportService {
1730

1831
// Authorization
1932
// - ROOT form
33+
/**
34+
* @param authorizationId
35+
* Locally unique resource identifier
36+
* @param stream
37+
* An output stream to receive the export
38+
* @param exportFilter
39+
* A filter to narrow the resource's information scope
40+
* @throws IOException
41+
* A general exception signaled upon various failure conditions
42+
*/
2043
public void exportAuthorization(Long authorizationId, OutputStream stream, ExportFilter exportFilter) throws IOException;
2144

45+
/**
46+
* @param stream
47+
* @param exportFilter
48+
* @throws IOException
49+
*/
2250
public void exportAuthorizations(OutputStream stream, ExportFilter exportFilter) throws IOException;
2351

2452
// - XPath form
53+
/**
54+
* @param retailCustomerId
55+
* @param authorizationId
56+
* @param stream
57+
* @param exportFilter
58+
* @throws IOException
59+
*/
2560
public void exportAuthorization(Long retailCustomerId, Long authorizationId, OutputStream stream, ExportFilter exportFilter) throws IOException;
2661

62+
/**
63+
* @param retailCustomerId
64+
* @param stream
65+
* @param exportFilter
66+
* @throws IOException
67+
*/
2768
public void exportAuthorizations(Long retailCustomerId, OutputStream stream, ExportFilter exportFilter) throws IOException;
2869

2970

3071
// ElectricPowerQualitySummary
3172
// - ROOT form
3273

74+
75+
/**
76+
* @param subscriptionId
77+
* @param electricPowerQualitySummaryId
78+
* @param outputStream
79+
* @param exportFilter
80+
* @throws IOException
81+
*/
82+
3383
void exportElectricPowerQualitySummary_Root(Long subscriptionId, Long electricPowerQualitySummaryId, OutputStream outputStream, ExportFilter exportFilter) throws IOException;
3484

85+
/**
86+
* @param subscriptionId
87+
* @param outputStream
88+
* @param exportFilter
89+
* @throws IOException
90+
*/
3591
void exportElectricPowerQualitySummarys_Root(Long subscriptionId, OutputStream outputStream, ExportFilter exportFilter) throws IOException;
3692

3793
// - XPath form
94+
/**
95+
* @param subscriptionId
96+
* @param retailCustomerId
97+
* @param usagePointId
98+
* @param electricPowerQualitySummaryId
99+
* @param stream
100+
* @param exportFilter
101+
* @throws IOException
102+
*/
38103
public void exportElectricPowerQualitySummary(Long subscriptionId, Long retailCustomerId, Long usagePointId, Long electricPowerQualitySummaryId,
39104
OutputStream stream, ExportFilter exportFilter) throws IOException;
40105

106+
/**
107+
* @param subscriptionId
108+
* @param retailCustomerId
109+
* @param usagePointId
110+
* @param stream
111+
* @param exportFilter
112+
* @throws IOException
113+
*/
41114
public void exportElectricPowerQualitySummarys(Long subscriptionId, Long retailCustomerId, Long usagePointId,
42115
OutputStream stream, ExportFilter exportFilter) throws IOException;
43116

44117

45118
// ElectricPowerUsageSummary
46119
// - ROOT form
47120

121+
/**
122+
* @param subscriptionId
123+
* @param outputStream
124+
* @param exportFilter
125+
* @throws IOException
126+
*/
48127
void exportElectricPowerUsageSummarys_Root(Long subscriptionId, ServletOutputStream outputStream,
49128
ExportFilter exportFilter) throws IOException;
50129

130+
/**
131+
* @param subscriptionId
132+
* @param electricPowerUsageSummaryId
133+
* @param outputStream
134+
* @param exportFilter
135+
* @throws IOException
136+
*/
51137
void exportElectricPowerUsageSummary_Root(Long subscriptionId, long electricPowerUsageSummaryId,
52138
ServletOutputStream outputStream, ExportFilter exportFilter) throws IOException;
53139

54140
// - XPath form
55141

142+
/**
143+
* @param subscriptionId
144+
* @param retailCustomerId
145+
* @param usagePointId
146+
* @param electricPowerUsageSummaryId
147+
* @param stream
148+
* @param exportFilter
149+
* @throws IOException
150+
*/
56151
public void exportElectricPowerUsageSummary(Long subscriptionId, Long retailCustomerId, Long usagePointId, Long electricPowerUsageSummaryId,
57152
OutputStream stream, ExportFilter exportFilter) throws IOException;
58153

154+
/**
155+
* @param subscriptionId
156+
* @param retailCustomerId
157+
* @param usagePointId
158+
* @param stream
159+
* @param exportFilter
160+
* @throws IOException
161+
*/
59162
public void exportElectricPowerUsageSummarys(Long subscriptionId, Long retailCustomerId, Long usagePointId,
60163
OutputStream stream, ExportFilter exportFilter) throws IOException;
61164

62165

63166
// IntervalBlock
64167
// - ROOT form
168+
/**
169+
* @param subscriptionId
170+
* @param outputStream
171+
* @param exportFilter
172+
* @throws IOException
173+
*/
65174
void exportIntervalBlocks_Root(Long subscriptionId, OutputStream outputStream,
66175
ExportFilter exportFilter) throws IOException;
67176

177+
/**
178+
* @param subscriptionId
179+
* @param intervalBlockId
180+
* @param outputStream
181+
* @param exportFilter
182+
* @throws IOException
183+
*/
68184
void exportIntervalBlock_Root(Long subscriptionId, Long intervalBlockId,
69185
OutputStream outputStream, ExportFilter exportFilter) throws IOException;
70186

71187
// - XPath form
72188

189+
/**
190+
* @param subscriptionId
191+
* @param retailCustomerId
192+
* @param usagePointId
193+
* @param meterReadingId
194+
* @param intervalBlockId
195+
* @param stream
196+
* @param exportFilter
197+
* @throws IOException
198+
*/
73199
public void exportIntervalBlock(Long subscriptionId, Long retailCustomerId, Long usagePointId, Long meterReadingId, Long intervalBlockId,
74200
OutputStream stream, ExportFilter exportFilter) throws IOException;
75201

202+
/**
203+
* @param subscriptionId
204+
* @param retailCustomerId
205+
* @param usagePointId
206+
* @param meterReadingId
207+
* @param stream
208+
* @param exportFilter
209+
* @throws IOException
210+
*/
76211
public void exportIntervalBlocks(Long subscriptionId, Long retailCustomerId, Long usagePointId, Long meterReadingId,
77212
OutputStream stream, ExportFilter exportFilter) throws IOException;
78213

79214
// MeterReading
80215
// - ROOT form
216+
/**
217+
* @param subscriptionId
218+
* @param outputStream
219+
* @param exportFilter
220+
* @throws IOException
221+
*/
81222
void exportMeterReadings_Root(Long subscriptionId, ServletOutputStream outputStream, ExportFilter exportFilter) throws IOException ;
82223

224+
/**
225+
* @param subscriptionId
226+
* @param meterReadingId
227+
* @param outputStream
228+
* @param exportFilter
229+
* @throws IOException
230+
*/
83231
void exportMeterReading_Root(Long subscriptionId, long meterReadingId, ServletOutputStream outputStream, ExportFilter exportFilter) throws IOException ;
84232

85233
// - XPath form
234+
/**
235+
* @param subscriptionId
236+
* @param retailCustomerId
237+
* @param usagePointId
238+
* @param meterReadingId
239+
* @param stream
240+
* @param exportFilter
241+
* @throws IOException
242+
*/
86243
public void exportMeterReading(Long subscriptionId, Long retailCustomerId, Long usagePointId, Long meterReadingId,
87244
OutputStream stream, ExportFilter exportFilter) throws IOException;
88245

246+
/**
247+
* @param subscriptionId
248+
* @param retailCustomerId
249+
* @param usagePointId
250+
* @param stream
251+
* @param exportFilter
252+
* @throws IOException
253+
*/
89254
public void exportMeterReadings(Long subscriptionId, Long retailCustomerId, Long usagePointId,
90255
OutputStream stream, ExportFilter exportFilter) throws IOException;
91256

92257
// ReadingType
93258
// - ROOT form
259+
/**
260+
* @param outputStream
261+
* @param exportFilter
262+
* @throws IOException
263+
*/
94264
void exportReadingTypes(OutputStream outputStream, ExportFilter exportFilter) throws IOException;
95265

266+
/**
267+
* @param readingTypeId
268+
* @param outputStream
269+
* @param exportFilter
270+
* @throws IOException
271+
*/
96272
void exportReadingType(Long readingTypeId, OutputStream outputStream, ExportFilter exportFilter) throws IOException;
97273

98274
// RetailCustomer
@@ -109,8 +285,19 @@ public void exportMeterReadings(Long subscriptionId, Long retailCustomerId, Long
109285
// -- TODO: original Pivotal version - used for pub/sub activity b/c of the String/Hashed implication
110286
public void exportSubscription(String subscriptionHashedId, OutputStream stream, ExportFilter exportResourceFilter) throws IOException;
111287

288+
/**
289+
* @param subscriptionId
290+
* @param stream
291+
* @param exportResourceFilter
292+
* @throws IOException
293+
*/
112294
public void exportSubscription(Long subscriptionId, OutputStream stream, ExportFilter exportResourceFilter) throws IOException;
113295

296+
/**
297+
* @param stream
298+
* @param exportResourceFilter
299+
* @throws IOException
300+
*/
114301
public void exportSubscriptions(OutputStream stream, ExportFilter exportResourceFilter) throws IOException;
115302

116303
// XPath forms
@@ -122,32 +309,99 @@ public void exportMeterReadings(Long subscriptionId, Long retailCustomerId, Long
122309
// TimeConfiguration
123310
// - ROOT form
124311

312+
/**
313+
* @param timeConfigurationId
314+
* @param stream
315+
* @param exportFilter
316+
* @throws IOException
317+
*/
125318
public void exportTimeConfiguration(Long timeConfigurationId, OutputStream stream, ExportFilter exportFilter) throws IOException;
126319

320+
/**
321+
* @param stream
322+
* @param exportFilter
323+
* @throws IOException
324+
*/
127325
public void exportTimeConfigurations(OutputStream stream, ExportFilter exportFilter) throws IOException;
128326

129327
// UsagePoints
130328
// - ROOT form
329+
/**
330+
* @param subscriptionId
331+
* @param usagePointId
332+
* @param stream
333+
* @param exportResourceFilter
334+
* @throws IOException
335+
*/
131336
void exportUsagePoint_Root(Long subscriptionId, Long usagePointId, OutputStream stream, ExportFilter exportResourceFilter) throws IOException;
132337

338+
/**
339+
* @param subscriptionId
340+
* @param stream
341+
* @param exportResourceFilter
342+
* @throws IOException
343+
*/
133344
void exportUsagePoints_Root(Long subscriptionId, OutputStream stream, ExportFilter exportResourceFilter) throws IOException;
134345

135346
// - XPath form
347+
/**
348+
* @param subscriptionId
349+
* @param retailCustomerId
350+
* @param usagePointId
351+
* @param stream
352+
* @param exportResourceFilter
353+
* @throws IOException
354+
*/
136355
void exportUsagePoint(Long subscriptionId, Long retailCustomerId, Long usagePointId,
137356
OutputStream stream, ExportFilter exportResourceFilter) throws IOException;
138357

358+
/**
359+
* @param subscriptionId
360+
* @param retailCustomerId
361+
* @param stream
362+
* @param exportResourceFilter
363+
* @throws IOException
364+
*/
139365
void exportUsagePoints(Long subscriptionId, Long retailCustomerId, OutputStream stream,
140366
ExportFilter exportResourceFilter) throws IOException;
141367

142368
// - Full Export form
369+
/**
370+
* @param subscriptionId
371+
* @param retailCustomerId
372+
* @param outputStream
373+
* @param exportFilter
374+
* @throws IOException
375+
*/
143376
void exportUsagePointsFull(Long subscriptionId, Long retailCustomerId, ServletOutputStream outputStream,
144377
ExportFilter exportFilter) throws IOException;
145378

379+
/**
380+
* @param subscriptionId
381+
* @param usagePointId
382+
* @param RetailCustomerId
383+
* @param outputStream
384+
* @param exportFilter
385+
* @throws IOException
386+
*/
146387
void exportUsagePointFull(Long subscriptionId, Long usagePointId, Long RetailCustomerId,
147388
ServletOutputStream outputStream, ExportFilter exportFilter) throws IOException;
148389

390+
/**
391+
* @param bulkId
392+
* @param thirdParty
393+
* @param outputStream
394+
* @param exportFilter
395+
* @throws IOException
396+
*/
149397
public void exportBatchBulk(Long bulkId, String thirdParty, OutputStream outputStream, ExportFilter exportFilter) throws IOException;
150398

399+
/**
400+
* @param subscriptionId
401+
* @param outputStream
402+
* @param exportFilter
403+
* @throws IOException
404+
*/
151405
public void exportBatchSubscription(Long subscriptionId, OutputStream outputStream, ExportFilter exportFilter) throws IOException;
152406

153407
}

0 commit comments

Comments
 (0)