@Test void testExtractTargetWithMissingParameters() { assertThrows(SLException.class, () -> purgeApiAuthorizationFilter.extractTarget(request)); }
@Override protected CloudTarget extractTarget(HttpServletRequest request) { String organizationName = request.getParameter(ConfigurationEntriesResource.REQUEST_PARAM_ORGANIZATION); String spaceName = request.getParameter(ConfigurationEntriesResource.REQUEST_PARAM_SPACE); if (StringUtils.isAnyEmpty(organizationName, spaceName)) { throw new SLException(Messages.ORG_AND_SPACE_MUST_BE_SPECIFIED); } return new CloudTarget(organizationName, spaceName); }
PurgeApiAuthorizationFilter extends SpaceNameBasedAuthorizationFilter { @Override protected CloudTarget extractTarget(HttpServletRequest request) { String organizationName = request.getParameter(ConfigurationEntriesResource.REQUEST_PARAM_ORGANIZATION); String spaceName = request.getParameter(ConfigurationEntriesResource.REQUEST_PARAM_SPACE); if (StringUtils.isAnyEmpty(organizationName, spaceName)) { throw new SLException(Messages.ORG_AND_SPACE_MUST_BE_SPECIFIED); } return new CloudTarget(organizationName, spaceName); } }
PurgeApiAuthorizationFilter extends SpaceNameBasedAuthorizationFilter { @Override protected CloudTarget extractTarget(HttpServletRequest request) { String organizationName = request.getParameter(ConfigurationEntriesResource.REQUEST_PARAM_ORGANIZATION); String spaceName = request.getParameter(ConfigurationEntriesResource.REQUEST_PARAM_SPACE); if (StringUtils.isAnyEmpty(organizationName, spaceName)) { throw new SLException(Messages.ORG_AND_SPACE_MUST_BE_SPECIFIED); } return new CloudTarget(organizationName, spaceName); } @Inject  PurgeApiAuthorizationFilter(AuthorizationChecker authorizationChecker); }
PurgeApiAuthorizationFilter extends SpaceNameBasedAuthorizationFilter { @Override protected CloudTarget extractTarget(HttpServletRequest request) { String organizationName = request.getParameter(ConfigurationEntriesResource.REQUEST_PARAM_ORGANIZATION); String spaceName = request.getParameter(ConfigurationEntriesResource.REQUEST_PARAM_SPACE); if (StringUtils.isAnyEmpty(organizationName, spaceName)) { throw new SLException(Messages.ORG_AND_SPACE_MUST_BE_SPECIFIED); } return new CloudTarget(organizationName, spaceName); } @Inject  PurgeApiAuthorizationFilter(AuthorizationChecker authorizationChecker); @Override String getUriRegex(); }
PurgeApiAuthorizationFilter extends SpaceNameBasedAuthorizationFilter { @Override protected CloudTarget extractTarget(HttpServletRequest request) { String organizationName = request.getParameter(ConfigurationEntriesResource.REQUEST_PARAM_ORGANIZATION); String spaceName = request.getParameter(ConfigurationEntriesResource.REQUEST_PARAM_SPACE); if (StringUtils.isAnyEmpty(organizationName, spaceName)) { throw new SLException(Messages.ORG_AND_SPACE_MUST_BE_SPECIFIED); } return new CloudTarget(organizationName, spaceName); } @Inject  PurgeApiAuthorizationFilter(AuthorizationChecker authorizationChecker); @Override String getUriRegex();  }