Example usage for org.apache.commons.collections MapUtils unmodifiableMap

List of usage examples for org.apache.commons.collections MapUtils unmodifiableMap

Introduction

In this page you can find the example usage for org.apache.commons.collections MapUtils unmodifiableMap.

Prototype

public static Map unmodifiableMap(Map map) 

Source Link

Document

Returns an unmodifiable map backed by the given map.

Usage

From source file:fr.mby.saml2.sp.impl.web.Saml20RequestWrapper.java

@SuppressWarnings("unchecked")
protected Saml20RequestWrapper(final HttpServletRequest request, final Map<String, String[]> initialParams)
        throws SamlProcessingException, UnsupportedSamlOperation {
    super(request);

    Saml20RequestWrapper.LOGGER.debug("Wrapping SAML 2.0 request...");

    // Unlock the map
    final Map<String, String[]> parameters = new HashMap<String, String[]>(super.getParameterMap());

    final String idpIdParamKey = SamlHelper.getWayfConfig().getIdpIdParamKey();
    parameters.remove(idpIdParamKey);/*from www  . ja  v  a2 s.c o  m*/
    parameters.remove(SamlHelper.SAML_RESPONSE_PARAM_KEY);

    if (!CollectionUtils.isEmpty(initialParams)) {
        parameters.putAll(initialParams);
    }

    // Lock the map.
    this.parameters = MapUtils.unmodifiableMap(parameters);
}

From source file:it.geosolutions.geobatch.services.jmx.JMXConsumerManager.java

@Override
public Map<String, String> getConfiguration(int i) {
    return MapUtils.unmodifiableMap(configurations.get(i));
}

From source file:com.tdclighthouse.commons.simpleform.html.FormItemGroup.java

/**
 * @return the children/*www. ja v  a 2s  .c om*/
 */
@SuppressWarnings("unchecked")
public Map<String, FormItemGroup> getSubgroups() {
    return MapUtils.unmodifiableMap(this.subgroups);
}

From source file:it.geosolutions.geobatch.destination.vulnerability.ResultStatsMap.java

public Map getStatsMap() {
    return MapUtils.unmodifiableMap(statsMap);
}

From source file:it.geosolutions.geobatch.destination.vulnerability.TargetManager.java

public Map<Integer, String> getPixelValues() {
    if (pixelValues == null) {
        return null;
    }/*from  w  w  w  .  j a  v  a 2s  .  c o m*/
    return MapUtils.unmodifiableMap(pixelValues);
}

From source file:net.refractions.udig.catalog.wmsc.server.AbstractTileRange.java

/**
 * Returns the tiles in the given range as an unmodifiable
 * map./*from   ww w.  j  a  v  a  2  s .c om*/
 *
 * @return
 */
@SuppressWarnings("unchecked")
public Map<String, Tile> getTiles() {
    return MapUtils.unmodifiableMap(allTiles);
}

From source file:io.hops.hopsworks.common.security.CertificateMaterializer.java

private MaterializerState<Map<MaterialKey, Bag>, List<RemoteMaterialReferences>, Map<MaterialKey, Map<String, Runnable>>, Map<MaterialKey, ReentrantReadWriteLock>> getImmutableState() {
    Map<MaterialKey, Bag> localMaterial = null;
    Map<MaterialKey, Map<String, Runnable>> scheduledRemovals = null;
    List<RemoteMaterialReferences> remoteMaterial = null;
    Map<MaterialKey, ReentrantReadWriteLock> materialKeyLocks = null;

    // Take all the write locks
    TreeSet<ReentrantReadWriteLock> acquiredLocks = acquireWriteLocks(materialKeyLocks);
    try {/*w  w  w .j  a  v  a2s. co  m*/
        localMaterial = MapUtils.unmodifiableMap(materializedCerts);
        scheduledRemovals = MapUtils.unmodifiableMap(fileRemovers);
        materialKeyLocks = MapUtils.unmodifiableMap(materialKeyLocks);
        remoteMaterial = remoteMaterialReferencesFacade.findAll();
    } finally {
        // Release all locks acquired
        releaseWriteLocks(acquiredLocks);
    }

    return new MaterializerState(localMaterial, remoteMaterial, scheduledRemovals, materialKeyLocks);
}

From source file:org.wso2.carbon.identity.provider.common.model.AuthenticatorConfig.java

public Map<String, Object> getProperties() {
    return MapUtils.unmodifiableMap(properties);
}

From source file:org.wso2.carbon.identity.provider.common.model.IdPMetadata.java

public Map<String, String> getCertMap() {
    return MapUtils.unmodifiableMap(certMap);
}

From source file:org.wso2.carbon.identity.provider.common.model.RoleConfig.java

public Map<String, String> getRoleMapping() {
    return MapUtils.unmodifiableMap(roleMapping);
}