4949import org .labkey .laboratory .query .WorkbookModel ;
5050import org .labkey .laboratory .security .LaboratoryAdminRole ;
5151
52- import java .util .ArrayList ;
5352import java .util .Arrays ;
5453import java .util .Collection ;
5554import java .util .HashMap ;
@@ -68,23 +67,27 @@ public class LaboratoryModule extends ExtendedSimpleModule
6867 public static final String CONTROLLER_NAME = "laboratory" ;
6968 public static final String SCHEMA_NAME = "laboratory" ;
7069
70+ @ Override
7171 public String getName ()
7272 {
7373 return NAME ;
7474 }
7575
76+ @ Override
7677 public double getVersion ()
7778 {
7879 return 12.304 ;
7980 }
8081
82+ @ Override
8183 @ NotNull
8284 protected Collection <WebPartFactory > createWebPartFactories ()
8385 {
84- return new ArrayList < WebPartFactory >( Arrays .asList (
86+ return Arrays .asList (
8587 new BaseWebPartFactory ("Workbook Header" )
8688 {
87- public WebPartView getWebPartView (ViewContext portalCtx , Portal .WebPart webPart )
89+ @ Override
90+ public WebPartView getWebPartView (@ NotNull ViewContext portalCtx , @ NotNull Portal .WebPart webPart )
8891 {
8992 WorkbookModel model = LaboratoryManager .get ().getWorkbookModel (portalCtx .getContainer ());
9093 if (model == null )
@@ -106,7 +109,8 @@ public boolean isAvailable(Container c, String scope, String location)
106109 },
107110 new BaseWebPartFactory ("Laboratory Data Browser" )
108111 {
109- public WebPartView getWebPartView (ViewContext portalCtx , Portal .WebPart webPart )
112+ @ Override
113+ public WebPartView getWebPartView (@ NotNull ViewContext portalCtx , @ NotNull Portal .WebPart webPart )
110114 {
111115 JspView <Object > view = new JspView <>("/org/labkey/laboratory/view/dataBrowser.jsp" , new Object ());
112116 view .setTitle ("Laboratory Data Browser" );
@@ -135,9 +139,10 @@ public boolean isAvailable(Container c, String scope, String location)
135139 return WebPartFactory .LOCATION_BODY .equals (location );
136140 }
137141 }
138- )) ;
142+ );
139143 }
140144
145+ @ Override
141146 protected void init ()
142147 {
143148 addController (CONTROLLER_NAME , LaboratoryController .class );
@@ -220,8 +225,7 @@ public LinkedHashSet<ClientDependency> getClientDependencies(Container c)
220225 @ Override
221226 public JSONObject getPageContextJson (ContainerUser context )
222227 {
223- Map <String , Object > ret = new HashMap <>();
224- ret .putAll (super .getPageContextJson (context ));
228+ Map <String , Object > ret = new HashMap <>(super .getPageContextJson (context ));
225229
226230 ret .put ("isLaboratoryAdmin" , context .getContainer ().hasPermission (context .getUser (), LaboratoryAdminPermission .class ));
227231
0 commit comments