org.apache.sling.scripting.core.impl.helper
Class ProtectedBindings

java.lang.Object
  extended by org.apache.sling.scripting.core.impl.helper.ProtectedBindings
All Implemented Interfaces:
Map<String,Object>, javax.script.Bindings

public class ProtectedBindings
extends Object
implements javax.script.Bindings


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
ProtectedBindings(javax.script.Bindings wrapped, Set<String> protectedKeys)
           
 
Method Summary
 void clear()
          The clear operation is not supported.
 boolean containsKey(Object key)
          
 boolean containsValue(Object value)
          
 Set<Map.Entry<String,Object>> entrySet()
          Returns a Set view of the mappings contains in this map.
 Object get(Object key)
          
 boolean isEmpty()
          
 Set<String> keySet()
          Returns a Set view of the keys contained in this map.
 Object put(String key, Object value)
          
 void putAll(Map<? extends String,? extends Object> toMerge)
          
 Object remove(Object key)
          
 int size()
          
 Collection<Object> values()
          Returns a Collection view of the values contained in this map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ProtectedBindings

public ProtectedBindings(javax.script.Bindings wrapped,
                         Set<String> protectedKeys)
Method Detail

put

public Object put(String key,
                  Object value)

Specified by:
put in interface Map<String,Object>
Specified by:
put in interface javax.script.Bindings
Throws:
IllegalArgumentException - if the key is protected

putAll

public void putAll(Map<? extends String,? extends Object> toMerge)

Specified by:
putAll in interface Map<String,Object>
Specified by:
putAll in interface javax.script.Bindings

remove

public Object remove(Object key)

Specified by:
remove in interface Map<String,Object>
Specified by:
remove in interface javax.script.Bindings
Throws:
IllegalArgumentException - if the key is protected

clear

public void clear()
The clear operation is not supported.

Specified by:
clear in interface Map<String,Object>

containsValue

public boolean containsValue(Object value)

Specified by:
containsValue in interface Map<String,Object>

entrySet

public Set<Map.Entry<String,Object>> entrySet()
Returns a Set view of the mappings contains in this map. The Set is unmodifiable.

Specified by:
entrySet in interface Map<String,Object>
Returns:
an unmodifiable Set view of the map

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface Map<String,Object>

keySet

public Set<String> keySet()
Returns a Set view of the keys contained in this map. The Set is unmodifiable.

Specified by:
keySet in interface Map<String,Object>
Returns:
an unmodifiable Set view of the map's keys

size

public int size()

Specified by:
size in interface Map<String,Object>

values

public Collection<Object> values()
Returns a Collection view of the values contained in this map. The Collection is unmodifiable.

Specified by:
values in interface Map<String,Object>
Returns:
an unmodifiable Collection view of the map's values

containsKey

public boolean containsKey(Object key)

Specified by:
containsKey in interface Map<String,Object>
Specified by:
containsKey in interface javax.script.Bindings

get

public Object get(Object key)

Specified by:
get in interface Map<String,Object>
Specified by:
get in interface javax.script.Bindings


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.