org.apache.sling.jackrabbit.usermanager.resource
Class AuthorizableValueMap

java.lang.Object
  extended by org.apache.sling.jackrabbit.usermanager.resource.AuthorizableValueMap
All Implemented Interfaces:
java.util.Map<java.lang.String,java.lang.Object>, ValueMap

public class AuthorizableValueMap
extends java.lang.Object
implements ValueMap

ValueMap implementation for Authorizable Resources


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from interface org.apache.sling.api.resource.ValueMap
EMPTY
 
Constructor Summary
AuthorizableValueMap(org.apache.jackrabbit.api.security.user.Authorizable authorizable)
           
 
Method Summary
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
           
 java.lang.Object get(java.lang.Object key)
           
<T> T
get(java.lang.String name, java.lang.Class<T> type)
          Get a named property and convert it into the given type.
<T> T
get(java.lang.String name, T defaultValue)
          Get a named property and convert it into the given type.
 boolean isEmpty()
           
 java.util.Set<java.lang.String> keySet()
           
 java.lang.Object put(java.lang.String arg0, java.lang.Object arg1)
           
 void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> arg0)
           
protected  java.lang.Object read(java.lang.String key)
           
protected  void readFully()
           
 java.lang.Object remove(java.lang.Object arg0)
           
 int size()
           
 java.util.Collection<java.lang.Object> values()
           
protected  java.lang.Object valuesToJavaObject(javax.jcr.Value[] values)
           
 
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

AuthorizableValueMap

public AuthorizableValueMap(org.apache.jackrabbit.api.security.user.Authorizable authorizable)
Method Detail

get

public <T> T get(java.lang.String name,
                 java.lang.Class<T> type)
Description copied from interface: ValueMap
Get a named property and convert it into the given type.

Specified by:
get in interface ValueMap
Parameters:
name - The name of the property
type - The class of the type
Returns:
Return named value converted to type T or null if non existing or can't be converted.

get

public <T> T get(java.lang.String name,
                 T defaultValue)
Description copied from interface: ValueMap
Get a named property and convert it into the given type.

Specified by:
get in interface ValueMap
Parameters:
name - The name of the property
defaultValue - The default value to use if the named property does not exist or cannot be converted to the requested type. The default value is also used to define the type to convert the value to. If this is null any existing propert is not converted.
Returns:
Return named value converted to type T or the default value if non existing or can't be converted.

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map<java.lang.String,java.lang.Object>

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map<java.lang.String,java.lang.Object>

entrySet

public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
Specified by:
entrySet in interface java.util.Map<java.lang.String,java.lang.Object>

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map<java.lang.String,java.lang.Object>

keySet

public java.util.Set<java.lang.String> keySet()
Specified by:
keySet in interface java.util.Map<java.lang.String,java.lang.Object>

size

public int size()
Specified by:
size in interface java.util.Map<java.lang.String,java.lang.Object>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map<java.lang.String,java.lang.Object>

values

public java.util.Collection<java.lang.Object> values()
Specified by:
values in interface java.util.Map<java.lang.String,java.lang.Object>

read

protected java.lang.Object read(java.lang.String key)

valuesToJavaObject

protected java.lang.Object valuesToJavaObject(javax.jcr.Value[] values)
                                       throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

readFully

protected void readFully()

remove

public java.lang.Object remove(java.lang.Object arg0)
Specified by:
remove in interface java.util.Map<java.lang.String,java.lang.Object>

clear

public void clear()
Specified by:
clear in interface java.util.Map<java.lang.String,java.lang.Object>

put

public java.lang.Object put(java.lang.String arg0,
                            java.lang.Object arg1)
Specified by:
put in interface java.util.Map<java.lang.String,java.lang.Object>

putAll

public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> arg0)
Specified by:
putAll in interface java.util.Map<java.lang.String,java.lang.Object>


Copyright © 2007-2009. All Rights Reserved.