Example usage for java.util Collections unmodifiableCollection

List of usage examples for java.util Collections unmodifiableCollection

Introduction

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

Prototype

public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> c) 

Source Link

Document

Returns an unmodifiable view of the specified collection.

Usage

From source file:com.alfaariss.oa.engine.requestor.configuration.ConfigurationFactory.java

/**
 * {@inheritDoc}// ww w . j  a va 2  s. c  o m
 * @see com.alfaariss.oa.engine.core.requestor.factory.IRequestorPoolFactory#getAllEnabledRequestorPools()
 */
@Override
public Collection<RequestorPool> getAllEnabledRequestorPools() throws RequestorException {
    Collection<RequestorPool> collPools = new Vector<RequestorPool>();
    if (_mapPools != null) {
        for (RequestorPool pool : _mapPools.values()) {
            if (pool.isEnabled())
                collPools.add(pool);
        }
    }
    return Collections.unmodifiableCollection(collPools);
}

From source file:com.ponysdk.ui.server.basic.PTabLayoutPanel.java

@Override
public Collection<PBeforeSelectionHandler<Integer>> getBeforeSelectionHandlers() {
    return Collections.unmodifiableCollection(beforeSelectionHandlers);
}

From source file:fr.gouv.culture.thesaurus.service.rdf.Concept.java

public Collection<Entry> getConceptGroups() {
    return Collections.unmodifiableCollection(this.conceptGroups);
}

From source file:com.fides.GrinderPropertiesConfigure.java

public Set<String> getGrinderScripts() {
    return (Set<String>) Collections.unmodifiableCollection(grinderScripts);
}

From source file:es.osoco.grails.plugins.otp.access.AbstractMultipleVoterFilterInvocationDefinition.java

/**
 * {@inheritDoc}//from   www .j  av  a2  s . c  om
 * @see org.springframework.security.access.SecurityMetadataSource#getAllConfigAttributes()
 */
public Collection<ConfigAttribute> getAllConfigAttributes() {
    try {
        initialize();
    } catch (Exception e) {
        GrailsUtil.deepSanitize(e);
        _log.error(e.getMessage(), e);
    }

    Collection<ConfigAttribute> all = new HashSet<ConfigAttribute>();
    for (Collection<ConfigAttribute> configs : _compiled.values()) {
        all.addAll(configs);
    }
    return Collections.unmodifiableCollection(all);
}

From source file:org.kmnet.com.fw.web.codelist.CodeListInterceptor.java

/**
 * Extracts the {@code CodeList}s which are to be set to the attribute of {@link HttpServletRequest}
 * <p>//from   w  w  w .ja  v a  2s .c  om
 * Among the Beans which implement {@code CodeList} interface, extract the Codelist IDs(Bean IDs) which match<br>
 * with the regular expression specified in {@link #codeListIdPattern}.
 * </p>
 * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
 */
@Override
public void afterPropertiesSet() {

    Assert.notNull(applicationContext, "applicationContext is null.");

    if (codeListIdPattern == null) {
        this.codeListIdPattern = Pattern.compile(".+");
    }

    Map<String, CodeList> definedCodeLists = BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext,
            CodeList.class, false, false);
    Map<String, CodeList> targetCodeLists = new HashMap<String, CodeList>();
    for (CodeList codeList : definedCodeLists.values()) {
        String codeListId = codeList.getCodeListId();
        Matcher codeListIdMatcher = codeListIdPattern.matcher(codeListId);
        if (codeListIdMatcher.matches()) {
            targetCodeLists.put(codeListId, codeList);
        }
    }

    if (logger.isDebugEnabled()) {
        logger.debug("registered codeList : {}", targetCodeLists.keySet());
    }

    this.codeLists = Collections.unmodifiableCollection(targetCodeLists.values());

}

From source file:nl.strohalm.cyclos.utils.access.PermissionHelper.java

/**
 * @param groupNature the group's nature
 * @return a collection of permissions having a relationship to its possible values according to the specified group's nature
 *//*from w  w w  . j ava  2  s  .c o m*/
public static Collection<Permission> getMultivaluedPermissions(final Group.Nature groupNature) {
    final Collection<Permission> list = new ArrayList<Permission>();

    for (final ModuleType moduleType : ModuleType.getModuleTypes(groupNature)) {
        for (final Module module : moduleType.getModules()) {
            for (final Permission permission : module.getPermissions()) {
                addListPermission(list, permission);
            }
        }
    }

    return Collections.unmodifiableCollection(list);
}

From source file:com.frank.search.solr.core.query.Crotch.java

@Override
public Collection<Criteria> getSiblings() {
    return Collections.unmodifiableCollection(siblings);
}

From source file:grails.plugin.springsecurity.web.access.intercept.AbstractFilterInvocationDefinition.java

public Collection<ConfigAttribute> getAllConfigAttributes() {
    try {/* w  ww  .ja  v a 2  s . com*/
        initialize();
    } catch (Exception e) {
        GrailsUtil.deepSanitize(e);
        log.error(e.getMessage(), e);
    }

    Collection<ConfigAttribute> all = new LinkedHashSet<ConfigAttribute>();
    for (InterceptedUrl iu : compiled) {
        all.addAll(iu.getConfigAttributes());
    }
    return Collections.unmodifiableCollection(all);
}

From source file:com.ponysdk.ui.server.basic.PSuggestBox.java

@Override
public Collection<PSelectionHandler<PSuggestion>> getSelectionHandlers() {
    return Collections.unmodifiableCollection(selectionHandler);
}