Example usage for org.apache.commons.collections CollectionUtils EMPTY_COLLECTION

List of usage examples for org.apache.commons.collections CollectionUtils EMPTY_COLLECTION

Introduction

In this page you can find the example usage for org.apache.commons.collections CollectionUtils EMPTY_COLLECTION.

Prototype

Collection EMPTY_COLLECTION

To view the source code for org.apache.commons.collections CollectionUtils EMPTY_COLLECTION.

Click Source Link

Document

An empty unmodifiable collection.

Usage

From source file:org.kuali.kfs.module.cg.document.AwardMaintainableImpl.java

/**
 * If the Contracts & Grants Billing (CGB) enhancement is disabled, we don't want to
 * process sections only related to CGB.
 *
 * @return list of section ids to ignore
 *//*from ww  w  . java  2s . c  o  m*/
@Override
protected Collection<?> getSectionIdsToIgnore() {
    if (!SpringContext.getBean(AccountsReceivableModuleBillingService.class)
            .isContractsGrantsBillingEnhancementActive()) {
        return SpringContext.getBean(ContractsAndGrantsBillingService.class)
                .getAwardContractsGrantsBillingSectionIds();
    } else {
        return CollectionUtils.EMPTY_COLLECTION;
    }
}

From source file:org.openurp.edu.other.web.action.OtherExamSignUpAction.java

public String categorySubject() {
    Integer categoryId = getInt("categoryIdId");
    if (null != categoryId) {
        put("subjects", entityDao.get(OtherExamSubject.class, "category.id", categoryId));
    } else {/* ww  w . j  a  va2 s  .  c  om*/
        put("subjects", CollectionUtils.EMPTY_COLLECTION);
    }
    return forward();
}

From source file:org.openurp.edu.other.web.action.OtherExamSignUpStatAction.java

public String categorySubject() {
    Integer categoryId = getIntId("category");
    if (null != categoryId) {
        OqlBuilder<OtherExamSubject> query = OqlBuilder.from(OtherExamSubject.class, "otherExamSubject");
        query.where("otherExamSubject.category.id =:categoryId", categoryId);
        query.where(/*from  w  w  w .  j a  v  a  2  s  . c om*/
                "otherExamSubject.beginOn <= :now and (otherExamSubject.endOn is null or otherExamSubject.endOn >= :now)",
                new java.util.Date());
        put("subjects", entityDao.search(query));
    } else {
        put("subjects", CollectionUtils.EMPTY_COLLECTION);
    }
    return forward();
}

From source file:org.richfaces.component.UITabPanel.java

/**
 * Create iterator for all rendered tabs in this component
 * {@link Iterator#next()} method will return tab model - {@link UITab}
 *
 * @return Iterator/* w w w .  j ava  2 s  .  c o m*/
 */
public Iterator getRenderedTabs() {
    if (getChildCount() > 0) {
        return new FilterIterator(getChildren().iterator(), RENDERED_TAB_PREDICATE);
    } else {
        return CollectionUtils.EMPTY_COLLECTION.iterator();
    }
}

From source file:org.sipfoundry.sipxconfig.admin.commserver.LocationTest.java

public void testInitBundlesNewLocation() {
    SipxServiceBundle b1 = new SipxServiceBundle("b1");
    b1.setBeanName("b1");
    b1.setAutoEnable(true);/* ww w .  j  av  a2 s .c om*/
    SipxServiceBundle b2 = new SipxServiceBundle("b2");
    b2.setBeanName("b2");
    b2.setAutoEnable(false);
    Collection<SipxServiceBundle> bundles = asList(b1, b2);

    Location location = new Location();

    SipxServiceManager sipxServiceManager = createMock(SipxServiceManager.class);
    sipxServiceManager.getBundleDefinitions();
    expectLastCall().andReturn(bundles);
    sipxServiceManager.getBundlesForLocation(location);
    expectLastCall().andReturn(bundles);
    sipxServiceManager.getServiceDefinitions(bundles);
    expectLastCall().andReturn(CollectionUtils.EMPTY_COLLECTION);

    replay(sipxServiceManager);

    location.setPrimary(true);
    location.setServices(CollectionUtils.EMPTY_COLLECTION);
    location.initBundles(sipxServiceManager);

    List<String> installedBundles = location.getInstalledBundles();
    assertEquals(1, installedBundles.size());
    assertTrue(installedBundles.contains("b1"));
    assertFalse(installedBundles.contains("b2"));

    verify(sipxServiceManager);
}

From source file:org.sipfoundry.sipxconfig.common.BeanId.java

/**
 * Given a Collection of IDs and a Java class, create and return a Collection of BeanIds.
 * Throw an exception if any ID is negative (unsaved object) or is not unique.
 *//*  w  ww  . j a v  a2  s .c  o m*/
public static Collection createBeanIdCollection(Collection ids, Class beanClass) {
    if (SipxCollectionUtils.safeIsEmpty(ids)) {
        return CollectionUtils.EMPTY_COLLECTION;
    }
    Collection bids = new ArrayList(ids.size());
    Collection idCheck = new ArrayList(ids.size()); // for uniqueness checking
    for (Iterator iter = ids.iterator(); iter.hasNext();) {
        Integer id = (Integer) iter.next();
        if (id == null) {
            throw new IllegalArgumentException("The ID collection contains a null ID");
        }
        int idVal = id.intValue();
        if (idVal < 0) {
            throw new IllegalArgumentException("The ID collection contains a negative ID: " + idVal);
        }
        if (idCheck.contains(id)) {
            throw new IllegalArgumentException("The ID collection contains this ID more than once: " + idVal);
        }
        idCheck.add(id);
        BeanId bid = new BeanId(id, beanClass);
        bids.add(bid);
    }
    return bids;
}

From source file:org.squashtest.tm.service.internal.testcase.TestCaseLibraryNavigationServiceImpl.java

@Override
@SuppressWarnings("unchecked")
public File searchExportTestCaseAsExcel(List<Long> nodeIds, boolean includeCalledTests, boolean keepRteFormat,
        MessageSource messageSource) {//from  ww  w.ja va  2 s  . c o  m

    Collection<Long> allIds = findTestCaseIdsFromSelection(CollectionUtils.EMPTY_COLLECTION, nodeIds,
            includeCalledTests);
    allIds = securityFilterIds(allIds, TEST_CASE_CLASS_NAME, EXPORT);

    return excelService.searchExportAsExcel(new ArrayList<>(allIds), keepRteFormat, messageSource);

}

From source file:org.wso2.carbon.identity.application.authenticator.passive.sts.manager.X509CredentialImpl.java

@Override
public Collection<X509Certificate> getEntityCertificateChain() {
    // TODO Auto-generated method stub
    return CollectionUtils.EMPTY_COLLECTION;
}

From source file:org.wso2.carbon.identity.application.authenticator.passive.sts.manager.X509CredentialImpl.java

@Override
public Collection<String> getKeyNames() {
    // TODO Auto-generated method stub
    return CollectionUtils.EMPTY_COLLECTION;
}

From source file:org.wso2.carbon.identity.application.authenticator.samlsso.manager.X509CredentialImpl.java

@Override
public Collection<X509CRL> getCRLs() {
    // TODO Auto-generated method stub
    return CollectionUtils.EMPTY_COLLECTION;
}