Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public OpenLdapSyncController()
}

@RequiresPermission(AdminOperationsPermission.class)
public class InitiateLdapSyncAction extends MutatingApiAction<InitiateLdapSyncForm>
public static class InitiateLdapSyncAction extends MutatingApiAction<InitiateLdapSyncForm>
{
@Override
public ApiResponse execute(InitiateLdapSyncForm form, BindException errors) throws Exception
Expand Down Expand Up @@ -100,7 +100,7 @@ public void setForPreview(boolean forPreview)
}

@RequiresPermission(AdminPermission.class)
public class ListLdapGroupsAction extends ReadOnlyApiAction<LdapForm>
public static class ListLdapGroupsAction extends ReadOnlyApiAction<LdapForm>
{
@Override
public ApiResponse execute(LdapForm form, BindException errors) throws Exception
Expand Down Expand Up @@ -495,7 +495,7 @@ public void setMemberSyncMode(String memberSyncMode)
}

@RequiresPermission(AdminOperationsPermission.class)
public class TestLdapConnectionAction extends MutatingApiAction<Object>
public static class TestLdapConnectionAction extends MutatingApiAction<Object>
{
@Override
public ApiResponse execute(Object form, BindException errors) throws Exception
Expand Down Expand Up @@ -545,7 +545,7 @@ public ApiResponse execute(Object form, BindException errors) throws Exception
}

@RequiresPermission(AdminOperationsPermission.class)
public class GetLdapSettingsAction extends ReadOnlyApiAction<Object>
public static class GetLdapSettingsAction extends ReadOnlyApiAction<Object>
{
@Override
public ApiResponse execute(Object form, BindException errors)
Expand All @@ -569,7 +569,7 @@ public ApiResponse execute(Object form, BindException errors)

@Marshal(Marshaller.Jackson)
@RequiresPermission(AdminOperationsPermission.class)
public class SetLdapSettingsAction extends MutatingApiAction<LdapForm>
public static class SetLdapSettingsAction extends MutatingApiAction<LdapForm>
{
@Override
public ApiResponse execute(LdapForm form, BindException errors)
Expand Down Expand Up @@ -668,7 +668,7 @@ public ApiResponse execute(LdapForm form, BindException errors)
if (form.getSyncMode() != null)
props.put(LdapSettings.SYNC_MODE_PROP, form.getSyncMode());

if (form.getAllowedDn() != null && form.getAllowedDn().length() > 0)
if (form.getAllowedDn() != null && !form.getAllowedDn().isEmpty())
{
String allowed = StringUtils.join(form.getAllowedDn().toList(), LdapSettings.DELIM);
props.put(LdapSettings.ALLOWED_DN_PROP, allowed);
Expand Down
4 changes: 2 additions & 2 deletions OpenLdapSync/src/org/labkey/openldapsync/ldap/LdapEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public boolean isEnabled()

try
{
Integer value = Integer.parseInt(a);
return (value.intValue() & 2) == 0;
int value = Integer.parseInt(a);
return (value & 2) == 0;
}
catch (NumberFormatException e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ public Integer getFrequency()

/**
* Provides a brief sanity check of the settings, designed to identify problems if a sync will run.
* @throws LdapException
*/
public void validateSettings() throws LdapException
{
Expand Down Expand Up @@ -495,7 +494,7 @@ public void validateSettings() throws LdapException

if (LdapSyncMode.groupWhitelist.equals(mode))
{
if (getGroupWhiteList().size() == 0)
if (getGroupWhiteList().isEmpty())
{
throw new LdapException("Cannot choose to sync based on specific groups unless you provide a list of groups to sync");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.labkey.api.data.Container;
import org.labkey.api.data.ContainerManager;
import org.labkey.api.data.RuntimeSQLException;
import org.labkey.api.data.Selector;
import org.labkey.api.data.SimpleFilter;
import org.labkey.api.data.Table;
import org.labkey.api.data.TableInfo;
Expand Down Expand Up @@ -1058,7 +1057,7 @@ public void testIndividualOperations() throws Exception
}

// This can be used to return LdapEntry objects to support some degree of automated testing without needing a functional LDAP Server
public class DummyConnectionWrapper extends LdapConnectionWrapper
public static class DummyConnectionWrapper extends LdapConnectionWrapper
{
private final List<LdapEntry> _users = new ArrayList<>();
private final Map<String, MockLdapEntry> _groupMap = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@

package org.labkey.queryextensions;

import org.labkey.api.action.SimpleViewAction;
import org.labkey.api.action.SpringActionController;
import org.labkey.api.security.RequiresPermission;
import org.labkey.api.security.permissions.ReadPermission;
import org.labkey.api.view.JspView;
import org.labkey.api.view.NavTree;
import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;

public class QueryExtensionsController extends SpringActionController
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected void doCleanup(boolean afterTest) throws TestTimeoutException
@BeforeClass
public static void setupProject()
{
QueryExtensionsTest init = (QueryExtensionsTest)getCurrentTest();
QueryExtensionsTest init = getCurrentTest();

init.doSetup();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package org.labkey.api.sequenceanalysis;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.labkey.api.data.Container;
import org.labkey.api.security.User;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ static public void setInstance(SequenceAnalysisService instance)

abstract public void registerReadsetListener(ReadsetListener listener);

public static interface ReadsetListener
public interface ReadsetListener
{
public void onReadsetCreate(User u, Readset rs, @Nullable Readset replacedReadset, @Nullable PipelineJob job);
void onReadsetCreate(User u, Readset rs, @Nullable Readset replacedReadset, @Nullable PipelineJob job);

public boolean isAvailable(Container c, User u);
boolean isAvailable(Container c, User u);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.json.JSONObject;
import org.labkey.api.view.template.ClientDependency;

import java.lang.reflect.ParameterizedType;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
Expand All @@ -39,7 +38,7 @@ abstract public class AbstractPipelineStepProvider<StepType extends PipelineStep
private final String _websiteURL;
private final String _description;
private final LinkedHashSet<String> _clientDependencyPaths;
private List<ToolParameterDescriptor> _parameters;
private final List<ToolParameterDescriptor> _parameters;

public AbstractPipelineStepProvider(String name, String label, @Nullable String toolName, String description, @Nullable List<ToolParameterDescriptor> parameters, @Nullable Collection<String> clientDependencyPaths, @Nullable String websiteURL)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
package org.labkey.api.sequenceanalysis.pipeline;

import org.apache.commons.io.FileUtils;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.jetbrains.annotations.Nullable;
import org.labkey.api.data.ConvertHelper;
import org.labkey.api.pipeline.PipelineJobException;
import org.labkey.api.pipeline.WorkDirectory;
import org.labkey.api.sequenceanalysis.run.SimpleScriptWrapper;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;

/**
* Created by bimber on 9/6/2014.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public interface AlignmentStep extends PipelineStep
{
/**
* Creates any indexes needed by this aligner if not already present.
* @throws PipelineJobException
*/
IndexOutput createIndex(ReferenceGenome referenceGenome, File outputDir) throws PipelineJobException;

Expand All @@ -49,7 +48,6 @@ default String getIndexCachedDirName(PipelineJob job)
* @param inputFastqs1 The forward FASTQ file(s). In most cases this is a single FASTQ. The aligner must return true for canAlignMultiplePairsAtOnce() otherwise.
* @param inputFastqs2 The second FASTQ(s), if using paired end data
* @param basename The basename to use as the output
* @throws PipelineJobException
*/
AlignmentOutput performAlignment(Readset rs, List<File> inputFastqs1, @Nullable List<File> inputFastqs2, File outputDirectory, ReferenceGenome referenceGenome, String basename, String readGroupId, @Nullable String platformUnit) throws PipelineJobException;

Expand Down Expand Up @@ -102,7 +100,6 @@ interface AlignmentOutput extends PipelineStepOutput
/**
* Optional. Allows this analysis to gather any information from the server required to execute the alignment. This information needs to be serialized
* to run remotely, which could be as simple as writing to a text file.
* @throws PipelineJobException
*/
default void init(SequenceAnalysisJobSupport support) throws PipelineJobException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public interface AnalysisStep extends PipelineStep
/**
* Optional. Allows this analysis to gather any information from the server required to execute the analysis. This information needs to be serialized
* to run remotely, which could be as simple as writing to a text file.
* @throws PipelineJobException
*/
default void init(SequenceAnalysisJobSupport support) throws PipelineJobException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.jetbrains.annotations.Nullable;
import org.labkey.api.pipeline.PipelineJobException;
import org.labkey.api.sequenceanalysis.model.Readset;
import org.labkey.api.util.Pair;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class CommandLineParam
{
private final String _argName;
protected boolean _isSwitch = false;
protected boolean _isSwitch;

private CommandLineParam(String argName, boolean isSwitch)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,13 @@ public interface PipelineOutputTracker
{
/**
* Add an intermediate file. If the user selected 'delete intermediates', this will be deleted on job success.
* @param file
*/
void addIntermediateFile(File file);

void addIntermediateFiles(Collection<File> files);

/**
* Add a SequenceOutputFile for this job. These files are tracked and displayed through the browser UI.
* @param file
* @param label
* @param category
* @param readsetId
* @param analysisId
* @param genomeId
* @param description
*/
void addSequenceOutput(File file, String label, String category, @Nullable Integer readsetId, @Nullable Integer analysisId, @Nullable Integer genomeId, @Nullable String description);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package org.labkey.api.sequenceanalysis.pipeline;

import org.jetbrains.annotations.Nullable;
import org.labkey.api.sequenceanalysis.model.Readset;
import org.labkey.api.util.Pair;

import java.io.File;
Expand All @@ -34,15 +33,11 @@ public interface PipelineStepOutput extends PipelineOutputTracker
{
/**
* Add an experiment input to this pipeline step
* @param input
* @param role
*/
void addInput(File input, String role);

/**
* Add an experiment output to this pipeline step
* @param output
* @param role
*/
void addOutput(File output, String role);

Expand All @@ -65,8 +60,6 @@ public interface PipelineStepOutput extends PipelineOutputTracker
/**
* Add an intermediate file. If the user selected 'delete intermediates', this will be deleted on job success.
* This will also be recorded as a step output with this role.
* @param file
* @param role
*/
void addIntermediateFile(File file, String role);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.apache.commons.io.IOUtils;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.labkey.api.util.StringUtilsLabKey;

import java.io.BufferedInputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.labkey.api.sequenceanalysis.pipeline;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.labkey.api.pipeline.PipelineJobException;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.labkey.api.sequenceanalysis.pipeline;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.jetbrains.annotations.Nullable;
import org.labkey.api.sequenceanalysis.run.AbstractCommandWrapper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ default boolean isVisible()

/**
* Provides the opportunity for the handler to validate parameters prior to running
* @param params
* @return List of error messages. Null or empty list indicates no errors.
*/
default List<String> validateParameters(List<SequenceOutputFile> outputFiles, JSONObject params)
Expand Down Expand Up @@ -174,8 +173,6 @@ interface SequenceOutputProcessor extends SequenceProcessor
* Allows handlers to perform setup on the webserver prior to remote running. This will be run in the background as a pipeline job.
* @param ctx Provides context about the active pipeline job
* @param inputFiles The list of input files to process
* @param actions
* @param outputsToCreate
*/
default void init(JobContext ctx, List<SequenceOutputFile> inputFiles, List<RecordedAction> actions, List<SequenceOutputFile> outputsToCreate) throws UnsupportedOperationException, PipelineJobException
{
Expand All @@ -189,10 +186,6 @@ default void init(JobContext ctx, List<SequenceOutputFile> inputFiles, List<Reco
*
* @param support Provides context about the active pipeline job
* @param inputFiles The list of input files to process
* @param params
* @param outputDir
* @param actions
* @param outputsToCreate
*/
void processFilesOnWebserver(PipelineJob job, SequenceAnalysisJobSupport support, List<SequenceOutputFile> inputFiles, JSONObject params, File outputDir, List<RecordedAction> actions, List<SequenceOutputFile> outputsToCreate) throws UnsupportedOperationException, PipelineJobException;

Expand All @@ -211,21 +204,13 @@ interface SequenceReadsetProcessor extends SequenceProcessor
* @param job The pipeline job running this task
* @param support Provides context about the active pipeline job
* @param readsets The list of readsets to process
* @param params
* @param outputDir
* @param actions
* @param outputsToCreate
*/
void init(PipelineJob job, SequenceAnalysisJobSupport support, List<Readset> readsets, JSONObject params, File outputDir, List<RecordedAction> actions, List<SequenceOutputFile> outputsToCreate) throws UnsupportedOperationException, PipelineJobException;

/**
*
* @param support Provides context about the active pipeline job
* @param readsets The list of readsets to process
* @param params
* @param outputDir
* @param actions
* @param outputsToCreate
*/
void processFilesOnWebserver(PipelineJob job, SequenceAnalysisJobSupport support, List<Readset> readsets, JSONObject params, File outputDir, List<RecordedAction> actions, List<SequenceOutputFile> outputsToCreate) throws UnsupportedOperationException, PipelineJobException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ static public void setInstance(SequencePipelineService instance)

/**
*
* @param input
* @param log
* @param startColumnIdx The 1-based column on which to sort. BED files are 2 and GTF/GFF are 4
* @throws IOException
* @throws PipelineJobException
*/
abstract public void sortROD(File input, Logger log, Integer startColumnIdx) throws IOException, PipelineJobException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.time.DurationFormatUtils;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.jetbrains.annotations.Nullable;
import org.labkey.api.pipeline.PipelineJobException;
import org.labkey.api.sequenceanalysis.run.PicardWrapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public interface TaskFileManager extends PipelineOutputTracker

boolean isDeleteIntermediateFiles();

public boolean performCleanupAfterEachStep();
boolean performCleanupAfterEachStep();

boolean isCopyInputsLocally();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
* User: bimber
Expand Down
Loading