|
29 | 29 | // |
30 | 30 |
|
31 | 31 | #import "JSRESTBase.h" |
32 | | -#import "JSResourceDescriptor.h" |
33 | | -#import "JSReportDescriptor.h" |
34 | 32 | #import "JSInputControlDescriptor.h" |
35 | | -#import <Foundation/Foundation.h> |
| 33 | +#import "JSReportOption.h" |
| 34 | +#import "JSReportParameter.h" |
| 35 | + |
36 | 36 |
|
37 | 37 | /** |
38 | 38 | Extention to <code>JSRESTBase</code> class for working with reports by REST calls. |
|
49 | 49 | //--------------------------------------------------------------------- |
50 | 50 |
|
51 | 51 | /** |
52 | | - Generates the report url to receive all pages report output in HTML format. |
| 52 | + Generates the report url to receive all pages report output in selected format. |
53 | 53 | |
54 | 54 | @param uri The resource descriptor uri |
55 | 55 | @param reportParams list of report parameter/input control values |
|
59 | 59 | |
60 | 60 | @since 1.4 |
61 | 61 | */ |
62 | | -- (NSString *)generateReportUrl:(NSString *)uri reportParams:(NSDictionary *)reportParams page:(NSInteger)page format:(NSString *)format; |
| 62 | +- (nonnull NSString *)generateReportUrl:(nonnull NSString *)uri reportParams:(nullable NSArray <JSReportParameter *> *)reportParams page:(NSInteger)page format:(nonnull NSString *)format; |
63 | 63 |
|
64 | 64 | /** |
65 | 65 | Gets the list of states of input controls with specified IDs for the report with specified URI and according to selected values |
|
71 | 71 | |
72 | 72 | @since 1.6 |
73 | 73 | */ |
74 | | -- (void)inputControlsForReport:(NSString *)reportUri ids:(NSArray /*<NSString>*/ *)ids selectedValues:(NSArray /*<JSReportParameter>*/ *)selectedValues completionBlock:(JSRequestCompletionBlock)block; |
| 74 | +- (void)inputControlsForReport:(nonnull NSString *)reportUri ids:(nullable NSArray <NSString *> *)ids selectedValues:(nullable NSArray <JSReportParameter *> *)selectedValues completionBlock:(nullable JSRequestCompletionBlock)block; |
75 | 75 |
|
76 | 76 | /** |
77 | 77 | Gets the states with updated values for input controls with specified IDs and according to selected values |
|
83 | 83 | |
84 | 84 | @since 1.4 |
85 | 85 | */ |
86 | | -- (void)updatedInputControlsValues:(NSString *)reportUri ids:(NSArray /*<NSString>*/ *)ids |
87 | | - selectedValues:(NSArray /*<JSReportParameter>*/ *)selectedValues completionBlock:(JSRequestCompletionBlock)block; |
| 86 | +- (void)updatedInputControlsValues:(nonnull NSString *)reportUri ids:(nonnull NSArray <NSString *> *)ids |
| 87 | + selectedValues:(nonnull NSArray <JSReportParameter *> *)selectedValues completionBlock:(nullable JSRequestCompletionBlock)block; |
88 | 88 |
|
89 | 89 | /** |
90 | 90 | Executes report |
|
104 | 104 | |
105 | 105 | @since 1.8 |
106 | 106 | */ |
107 | | -- (void)runReportExecution:(NSString *)reportUnitUri async:(BOOL)async outputFormat:(NSString *)outputFormat |
| 107 | +- (void)runReportExecution:(nonnull NSString *)reportUnitUri async:(BOOL)async outputFormat:(nonnull NSString *)outputFormat |
108 | 108 | interactive:(BOOL)interactive freshData:(BOOL)freshData saveDataSnapshot:(BOOL)saveDataSnapshot |
109 | | - ignorePagination:(BOOL)ignorePagination transformerKey:(NSString *)transformerKey pages:(NSString *)pages |
110 | | - attachmentsPrefix:(NSString *)attachmentsPrefix parameters:(NSArray /*<JSReportParameter>*/ *)parameters completionBlock:(JSRequestCompletionBlock)block; |
| 109 | + ignorePagination:(BOOL)ignorePagination transformerKey:(nullable NSString *)transformerKey pages:(nullable NSString *)pages |
| 110 | + attachmentsPrefix:(nullable NSString *)attachmentsPrefix parameters:(nullable NSArray <JSReportParameter *> *)parameters completionBlock:(nullable JSRequestCompletionBlock)block; |
111 | 111 |
|
112 | 112 | /** |
113 | 113 | Cancel Report Execution |
|
117 | 117 | |
118 | 118 | @since 1.9 |
119 | 119 | */ |
120 | | -- (void)cancelReportExecution:(NSString *)requestId completionBlock:(JSRequestCompletionBlock)block; |
| 120 | +- (void)cancelReportExecution:(nonnull NSString *)requestId completionBlock:(nullable JSRequestCompletionBlock)block; |
121 | 121 |
|
122 | 122 | /** |
123 | 123 | Run Export Execution |
|
130 | 130 | |
131 | 131 | @since 1.9 |
132 | 132 | */ |
133 | | -- (void)runExportExecution:(NSString *)requestId outputFormat:(NSString *)outputFormat pages:(NSString *)pages |
134 | | - attachmentsPrefix:(NSString *)attachmentsPrefix completionBlock:(JSRequestCompletionBlock)block; |
| 133 | +- (void)runExportExecution:(nonnull NSString *)requestId outputFormat:(nonnull NSString *)outputFormat pages:(nullable NSString *)pages |
| 134 | + attachmentsPrefix:(nullable NSString *)attachmentsPrefix completionBlock:(nullable JSRequestCompletionBlock)block; |
135 | 135 |
|
136 | 136 | /** |
137 | 137 | Generates the report output url |
|
142 | 142 |
|
143 | 143 | @since 1.8 |
144 | 144 | */ |
145 | | -- (NSString *)generateReportOutputUrl:(NSString *)requestId exportOutput:(NSString *)exportOutput; |
| 145 | +- (nonnull NSString *)generateReportOutputUrl:(nonnull NSString *)requestId exportOutput:(nonnull NSString *)exportOutput; |
146 | 146 |
|
147 | 147 | /** |
148 | 148 | Gets report execution metadata by request id |
|
152 | 152 | |
153 | 153 | @since 1.8 |
154 | 154 | */ |
155 | | -- (void)reportExecutionMetadataForRequestId:(NSString *)requestId completionBlock:(JSRequestCompletionBlock)block; |
| 155 | +- (void)reportExecutionMetadataForRequestId:(nonnull NSString *)requestId completionBlock:(nullable JSRequestCompletionBlock)block; |
156 | 156 |
|
157 | 157 | /** |
158 | 158 | Gets report execution status by request id |
|
162 | 162 | |
163 | 163 | @since 1.8 |
164 | 164 | */ |
165 | | -- (void)reportExecutionStatusForRequestId:(NSString *)requestId completionBlock:(JSRequestCompletionBlock)block; |
| 165 | +- (void)reportExecutionStatusForRequestId:(nonnull NSString *)requestId completionBlock:(nullable JSRequestCompletionBlock)block; |
166 | 166 |
|
167 | 167 | /** |
168 | 168 | Gets report export status by execution id and export output id. |
|
172 | 172 |
|
173 | 173 | @since 2.1 |
174 | 174 | */ |
175 | | -- (void)exportExecutionStatusWithExecutionID:(NSString *)executionID |
176 | | - exportOutput:(NSString *)exportOutput |
177 | | - completion:(JSRequestCompletionBlock)block; |
| 175 | +- (void)exportExecutionStatusWithExecutionID:(nonnull NSString *)executionID |
| 176 | + exportOutput:(nonnull NSString *)exportOutput |
| 177 | + completion:(nullable JSRequestCompletionBlock)block; |
178 | 178 |
|
179 | 179 | /** |
180 | 180 | Loads report output and saves it by specified path if needed |
|
189 | 189 |
|
190 | 190 | @since 1.9 |
191 | 191 | */ |
192 | | -- (void)loadReportOutput:(NSString *)requestId exportOutput:(NSString *)exportOutput |
193 | | - loadForSaving:(BOOL)loadForSaving path:(NSString *)path completionBlock:(JSRequestCompletionBlock)block; |
| 192 | +- (void)loadReportOutput:(nonnull NSString *)requestId exportOutput:(nonnull NSString *)exportOutput |
| 193 | + loadForSaving:(BOOL)loadForSaving path:(nullable NSString *)path completionBlock:(nullable JSRequestCompletionBlock)block; |
194 | 194 |
|
195 | 195 |
|
196 | 196 | /** |
|
204 | 204 | |
205 | 205 | @since 1.8 |
206 | 206 | */ |
207 | | -- (void)saveReportAttachment:(NSString *)requestId exportOutput:(NSString *)exportOutput attachmentName:(NSString *)attachmentName path:(NSString *)path completionBlock:(JSRequestCompletionBlock)block; |
| 207 | +- (void)saveReportAttachment:(nonnull NSString *)requestId exportOutput:(nonnull NSString *)exportOutput attachmentName:(nonnull NSString *)attachmentName path:(nonnull NSString *)path completionBlock:(nullable JSRequestCompletionBlock)block; |
| 208 | + |
| 209 | +/** |
| 210 | + Gets the report options array for report |
| 211 | + |
| 212 | + @param reportUri repository URI of the report |
| 213 | + @param block The block to inform of the results |
| 214 | + |
| 215 | + @since 2.2 |
| 216 | + */ |
| 217 | +- (void)reportOptionsForReportURI:(nonnull NSString *)reportURI completion:(nullable JSRequestCompletionBlock)block; |
| 218 | + |
| 219 | +/** |
| 220 | + Delete existed report option |
| 221 | + |
| 222 | + @param reportOption the report option for deleting |
| 223 | + @param reportUri repository URI of the report |
| 224 | + @param block The block to inform of the results |
| 225 | + |
| 226 | + @since 2.2 |
| 227 | + */ |
| 228 | + |
| 229 | +- (void)deleteReportOption:(nonnull JSReportOption *)reportOption withReportURI:(nonnull NSString *)reportURI completion:(nullable JSRequestCompletionBlock)completion; |
| 230 | + |
| 231 | +/** |
| 232 | + Create new report option |
| 233 | + |
| 234 | + @param reportUri repository URI of the report |
| 235 | + @param optionLabel the name for new report option |
| 236 | + @param reportParameters parameters for new report option creating |
| 237 | + @param block The block to inform of the results |
| 238 | + |
| 239 | + @since 2.2 |
| 240 | + */ |
| 241 | + |
| 242 | +- (void)createReportOptionWithReportURI:(nonnull NSString *)reportURI optionLabel:(nonnull NSString *)optionLabel reportParameters:(nonnull NSArray <JSReportParameter *> *)reportParameters completion:(nullable JSRequestCompletionBlock)completion; |
208 | 243 |
|
209 | 244 | @end |
0 commit comments