Example usage for java.util Collections EMPTY_LIST

List of usage examples for java.util Collections EMPTY_LIST

Introduction

In this page you can find the example usage for java.util Collections EMPTY_LIST.

Prototype

List EMPTY_LIST

To view the source code for java.util Collections EMPTY_LIST.

Click Source Link

Document

The empty list (immutable).

Usage

From source file:uk.ac.ebi.intact.editor.services.summary.ModelledParticipantSummaryService.java

private boolean isNoUniprotUpdate(Interactor interactor) {
    Collection<Annotation> annots = Collections.EMPTY_LIST;
    if (interactor == null)
        return false;
    else {//w ww  .  ja  va 2  s . c  o m
        annots = interactor.getAnnotations();
    }

    if (annots.isEmpty()) {
        return false;
    }
    Annotation caution = AnnotationUtils.collectFirstAnnotationWithTopic(annots, null,
            AnnotatedObjectController.NON_UNIPROT);
    return caution != null ? true : false;
}

From source file:com.twosigma.beakerx.easyform.EasyForm.java

public EasyFormComponent addList(final String label, final Collection<String> values,
        final Boolean multipleSelection, final Integer size) throws Exception {

    ListComponent list = (multipleSelection) ? createSelectMultipleWidget()
            : createSelectMultipleSingleWidget();
    list.setLabel(label);//  w  w w  .j  a  v a 2 s .c o  m
    list.setSize(size);
    list.setMultipleSelection(multipleSelection);
    list.setValues(values);
    list.setValue(Collections.EMPTY_LIST);
    return addComponentOrThrow(label, list);
}

From source file:com.netflix.zuul.scriptManager.FilterScriptManagerServlet.java

private void handleListAction(HttpServletRequest request, HttpServletResponse response) throws IOException {
    String filter_id = request.getParameter("filter_id");
    if (filter_id == null) {
        // get list of all endpoints
        List<String> filterIDs = scriptDAO.getAllFilterIDs();
        Map<String, Object> json = new LinkedHashMap<String, Object>();
        json.put("filters", filterIDs);
        response.getWriter().write(JsonUtility.jsonFromMap(json));
    } else {//  w  w w.  java  2s . c o  m
        List<FilterInfo> scripts;
        if (Boolean.parseBoolean(request.getParameter("active"))) {
            // get list of all scripts for this endpoint
            FilterInfo activeEndpoint = scriptDAO.getActiveFilterInfoForFilter(filter_id);
            scripts = activeEndpoint == null ? Collections.EMPTY_LIST
                    : Collections.singletonList(activeEndpoint);
        } else {
            // get list of all scripts for this endpoint
            scripts = scriptDAO.getZuulFiltersForFilterId(filter_id);
        }
        if (scripts.size() == 0) {
            setUsageError(404, "ERROR: No scripts found for endpoint: " + filter_id, response);
        } else {
            // output JSON
            Map<String, Object> json = new LinkedHashMap<String, Object>();
            json.put("filter_id", filter_id);
            List<Map<String, Object>> scriptsJson = new ArrayList<Map<String, Object>>();
            for (FilterInfo script : scripts) {
                Map<String, Object> scriptJson = createEndpointScriptJSON(script);
                scriptsJson.add(scriptJson);
            }

            json.put("filters", scriptsJson);

            response.getWriter().write(JsonUtility.jsonFromMap(json));
        }
    }
}

From source file:org.hupo.psi.mi.psicquic.ws.IndexBasedPsicquicService.java

public List<String> getSupportedDbAcs() {
    return Collections.EMPTY_LIST;
}

From source file:org.syncope.core.propagation.PropagationManager.java

/**
 * Create the user on every associated resource.
 *
 * @param wfResult user to be propagated (and info associated), as per
 * result from workflow./* w  w w  . j  av  a2s. c  om*/
 * @param password to be set.
 * @param vAttrs virtual attributes to be set.
 * @param syncResourceNames external resources performing sync, hence not to
 * be considered for propagation.
 * @return list of propagation tasks.
 * @throws NotFoundException if userId is not found.
 */
public List<PropagationTask> getCreateTaskIds(final WorkflowResult<Map.Entry<Long, Boolean>> wfResult,
        final String password, final List<AttributeTO> vAttrs, final Set<String> syncResourceNames)
        throws NotFoundException {

    SyncopeUser user = getSyncopeUser(wfResult.getResult().getKey());
    if (vAttrs != null && !vAttrs.isEmpty()) {
        userDataBinder.fillVirtual(user, vAttrs, AttributableUtil.USER);
    }

    final PropagationByResource propByRes = wfResult.getPropByRes();
    if (propByRes == null || propByRes.isEmpty()) {
        return Collections.EMPTY_LIST;
    }

    if (syncResourceNames != null) {
        propByRes.get(PropagationOperation.CREATE).removeAll(syncResourceNames);
    }

    return provision(user, password, wfResult.getResult().getValue(), propByRes);
}

From source file:io.cyberstock.tcdop.server.integration.teamcity.DOCloudClient.java

@NotNull
public Collection<? extends CloudImage> getImages() throws CloudException {
    //        LOG.debug("DO get images triggered");
    if (DOIntegrationMode.PREPARED_IMAGE.equals(settings.getMode())) {
        Collection<DOCloudImage> images = imageStorage.getImagesList();
        //            LOG.debug(images.size() + " images found, trying to identify image with name: " + settings.getImageName());
        for (DOCloudImage cloudImage : images) {
            if (cloudImage != null && settings.getImageName().equals(cloudImage.getName())) {
                //                    LOG.debug("Image found: " + cloudImage.toString());
                return Collections.singleton(cloudImage);
            } else {
                //                    LOG.debug("Image " + cloudImage.getName() + " skipped.");
            }//from  w  ww . ja  va  2 s  .c  om

        }
    } else {
        LOG.error(settings.getMode() + " Mode isn't supported yet");
        throw new NotImplementedException();
    }

    //        LOG.debug("Image with name " + settings.getImageName() + " hasn't been found.");
    return Collections.EMPTY_LIST;
}

From source file:com.mitre.storefront.controllers.pages.ProductPageController.java

@RequestMapping(value = PRODUCT_CODE_PATH_VARIABLE_PATTERN + "/futureStock", method = RequestMethod.GET)
public String productFutureStock(@PathVariable("productCode") final String productCode, final Model model,
        final HttpServletRequest request, final HttpServletResponse response) throws CMSItemNotFoundException {
    final boolean futureStockEnabled = Config.getBoolean(FUTURE_STOCK_ENABLED, false);
    if (futureStockEnabled) {
        final List<FutureStockData> futureStockList = b2bFutureStockFacade.getFutureAvailability(productCode);
        if (futureStockList == null) {
            GlobalMessages.addErrorMessage(model, STOCK_SERVICE_UNAVAILABLE);
        } else if (futureStockList.isEmpty()) {
            GlobalMessages.addErrorMessage(model, "product.product.details.future.nostock");
        }/*  w w w . j av  a 2 s.  c  om*/
        populateProductDetailForDisplay(productCode, model, request, Collections.EMPTY_LIST);
        model.addAttribute("futureStocks", futureStockList);

        return ControllerConstants.Views.Fragments.Product.FutureStockPopup;
    } else {
        return ControllerConstants.Views.Pages.Error.ErrorNotFoundPage;
    }

}

From source file:gov.nih.nci.caarray.application.vocabulary.VocabularyServiceTest.java

License:asdf

@Test
public void testSearchForCharacteristic() {
    assertEquals(Collections.EMPTY_LIST,
            this.vocabularyService.searchForCharacteristicCategory(TermBasedCharacteristic.class, null));
}

From source file:com.opensymphony.able.action.EmbeddedCollectionActionBean.java

public List<E> getSearchResults() {
    if (queryStrategy != null && query != null && query.trim().length() > 0) {
        return queryStrategy.execute(getEntityClass(), query);
    }//w w  w.  j  av a 2  s .com
    return Collections.EMPTY_LIST;
}

From source file:hr.fer.zemris.vhdllab.service.workspace.WorkspaceTest.java

@SuppressWarnings("unchecked")
@Test(expected = IllegalArgumentException.class)
public void removeFile() {
    workspace.removeFile(null, new Hierarchy(new Project(), Collections.EMPTY_LIST));
}