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 @@ -28,6 +28,7 @@
import org.labkey.api.query.FieldKey;
import org.labkey.api.query.QuerySettings;
import org.labkey.api.query.UserSchema;
import org.labkey.api.security.MethodsAllowed;
import org.labkey.api.security.RequiresPermission;
import org.labkey.api.security.permissions.InsertPermission;
import org.labkey.api.study.Dataset;
Expand Down Expand Up @@ -57,6 +58,9 @@
import java.util.Map;
import java.util.Set;

import static org.labkey.api.util.HttpUtil.Method.POST;

@MethodsAllowed(POST)
@RequiresPermission(InsertPermission.class)
public abstract class AbstractPublishConfirmAction<FORM extends PublishConfirmForm> extends FormViewAction<FORM>
{
Expand Down
20 changes: 1 addition & 19 deletions study/src/org/labkey/study/assay/AssayPublishConfirmAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,10 @@
import org.labkey.api.util.Pair;
import org.labkey.api.view.ActionURL;
import org.labkey.api.view.DataView;
import org.labkey.api.view.HtmlView;
import org.labkey.api.view.NavTree;
import org.labkey.api.view.NotFoundException;
import org.labkey.api.view.UnauthorizedException;
import org.springframework.validation.BindException;
import org.springframework.validation.Errors;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.List;
Expand All @@ -58,7 +55,7 @@ public static class AssayPublishConfirmForm extends PublishConfirmForm
private ExpProtocol _protocol;
private AssayProvider _provider;

ExpProtocol getProtocol()
@NotNull ExpProtocol getProtocol()
{
if (_protocol == null)
{
Expand Down Expand Up @@ -286,21 +283,6 @@ protected ActionURL linkToStudy(AssayPublishConfirmForm form, Container targetSt
return form.getProvider().linkToStudy(getUser(), getContainer(), _protocol, targetStudy, form.getAutoLinkCategory(), publishData, publishErrors);
}

@Override
public ModelAndView getView(AssayPublishConfirmForm form, boolean reshow, BindException errors) throws Exception
{
if (form.getProtocol() == null)
Comment thread
labkey-nicka marked this conversation as resolved.
return HtmlView.err("Could not resolve the source protocol.");

return super.getView(form, reshow, errors);
}

@Override
public boolean handlePost(AssayPublishConfirmForm form, BindException errors) throws Exception
{
return super.handlePost(form, errors);
}

@Override
public void addNavTrail(NavTree root)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@
import org.labkey.api.study.publish.StudyPublishService;
import org.labkey.api.util.Pair;
import org.labkey.api.view.ActionURL;
import org.labkey.api.view.HtmlView;
Comment thread
labkey-nicka marked this conversation as resolved.
import org.labkey.api.view.NavTree;
import org.labkey.api.view.NotFoundException;
import org.springframework.validation.BindException;
import org.springframework.validation.Errors;
import org.springframework.web.servlet.ModelAndView;

import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -201,15 +199,6 @@ protected ActionURL linkToStudy(SampleTypePublishConfirmForm form, Container tar
dataMaps, ROW_ID, errors);
}

@Override
public ModelAndView getView(SampleTypePublishConfirmForm form, boolean reshow, BindException errors) throws Exception
{
if (_sampleType == null)
Comment thread
labkey-tchad marked this conversation as resolved.
return HtmlView.err("Could not resolve the source Sample Type.");

return super.getView(form, reshow, errors);
}

@Override
public void addNavTrail(NavTree root)
{
Expand Down