1717package org .labkey .hdrl .query ;
1818
1919import org .apache .commons .lang3 .StringUtils ;
20+ import org .jetbrains .annotations .NotNull ;
2021import org .jetbrains .annotations .Nullable ;
2122import org .labkey .api .data .Container ;
2223import org .labkey .api .data .ContainerFilter ;
5354import org .labkey .hdrl .HDRLSchema ;
5455import org .springframework .validation .BindException ;
5556
56- import java .io .IOException ;
57- import java .io .Writer ;
5857import java .util .HashMap ;
5958import java .util .HashSet ;
6059import java .util .List ;
@@ -186,7 +185,7 @@ public Set<String> getTableNames()
186185 }
187186
188187 @ Override
189- public QueryView createView (ViewContext context , QuerySettings settings , BindException errors )
188+ public @ NotNull QueryView createView (ViewContext context , QuerySettings settings , BindException errors )
190189 {
191190 String queryName = settings .getQueryName ();
192191 if (TABLE_INBOUND_REQUEST .equalsIgnoreCase (queryName ))
@@ -196,11 +195,10 @@ public QueryView createView(ViewContext context, QuerySettings settings, BindExc
196195 @ Override
197196 protected void addDetailsAndUpdateColumns (List <DisplayColumn > ret , TableInfo table )
198197 {
199-
200198 SimpleDisplayColumn actionColumn = new SimpleDisplayColumn ()
201199 {
202200 @ Override
203- public void renderGridCellContents (RenderContext ctx , Writer oldWriter , HtmlWriter out ) throws IOException
201+ public void renderGridCellContents (RenderContext ctx , HtmlWriter out )
204202 {
205203 Container c = ContainerManager .getForId (ctx .get (FieldKey .fromParts ("container" )).toString ());
206204
@@ -217,18 +215,17 @@ public void renderGridCellContents(RenderContext ctx, Writer oldWriter, HtmlWrit
217215 {
218216 FieldKey requestFieldKey = FieldKey .fromParts ("RequestId" );
219217 ActionURL actionUrl = new ActionURL (HDRLController .EditRequestAction .class , c ).addParameter ("requestId" , (Integer )ctx .get (requestFieldKey ));
220- oldWriter .write (LinkBuilder .labkeyLink ("Edit" , actionUrl ). toString ( ));
218+ out .write (LinkBuilder .labkeyLink ("Edit" , actionUrl ));
221219 }
222220 else
223221 {
224222 ActionURL actionUrl = new ActionURL (HDRLController .RequestDetailsAction .class , c );
225223 actionUrl .addParameter ("requestId" , (Integer ) ctx .get ("requestId" ));
226- oldWriter .write (LinkBuilder .labkeyLink ("View" , actionUrl ). toString ( ));
224+ out .write (LinkBuilder .labkeyLink ("View" , actionUrl ));
227225 }
228226 }
229227 };
230228 ret .add (actionColumn );
231-
232229 }
233230 };
234231 }
@@ -243,20 +240,19 @@ else if (TABLE_INBOUND_SPECIMEN.equalsIgnoreCase(settings.getQueryName()) || TAB
243240
244241 QueryView queryView = new QueryView (this , settings , errors )
245242 {
246-
247243 @ Override
248244 protected void addDetailsAndUpdateColumns (List <DisplayColumn > ret , TableInfo table )
249245 {
250246 SimpleDisplayColumn downloadColumn = new SimpleDisplayColumn ()
251247 {
252248 @ Override
253- public void renderGridCellContents (RenderContext ctx , Writer oldWriter , HtmlWriter out ) throws IOException
249+ public void renderGridCellContents (RenderContext ctx , HtmlWriter out )
254250 {
255251 Integer specimenId = (Integer ) ctx .get (FieldKey .fromParts ("RowId" ));
256252 if (HDRLManager .get ().hasClinicalReport (specimenId , getUser (), getContainer ()))
257253 {
258254 // download button displayed
259- oldWriter .write (PageFlowUtil .button ("Download" ).href (new ActionURL (HDRLController .DownloadClinicalReportAction .class , getContainer ()).addParameter ("specimenId" , specimenId )). toString ( ));
255+ out .write (PageFlowUtil .button ("Download" ).href (new ActionURL (HDRLController .DownloadClinicalReportAction .class , getContainer ()).addParameter ("specimenId" , specimenId )));
260256 }
261257 }
262258 };
0 commit comments