Class BaseAuthorizableValueMap
- java.lang.Object
-
- org.apache.sling.jackrabbit.usermanager.impl.resource.BaseAuthorizableValueMap
-
- Direct Known Subclasses:
AuthorizableValueMap,NestedAuthorizableValueMap
public abstract class BaseAuthorizableValueMap extends Object implements org.apache.sling.api.resource.ValueMap
base implementation for ValueMap implementations for Authorizable Resources
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.jackrabbit.api.security.user.Authorizableauthorizableprotected Map<String,Object>cacheprotected booleanfullyReadprotected org.slf4j.Loggerlogdefault logprotected SystemUserManagerPathssystemUserManagerPaths
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseAuthorizableValueMap(org.apache.jackrabbit.api.security.user.Authorizable authorizable, SystemUserManagerPaths systemUserManagerPaths)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)protected <T> TconvertToType(String name, Class<T> type)Set<Map.Entry<String,Object>>entrySet()Objectget(Object key)<T> Tget(String name, Class<T> type)<T> Tget(String name, T defaultValue)booleanisEmpty()Set<String>keySet()Objectput(String arg0, Object arg1)voidputAll(Map<? extends String,? extends Object> arg0)protected abstract Objectread(String key)protected abstract voidreadFully()protected ObjectreadPropertyAndCache(String key, String relPath)Objectremove(Object arg0)intsize()static ObjecttoJavaObject(javax.jcr.Value value)Converts a JCR Value to a corresponding Java ObjectStringtoString()Reads the authorizable map completely and returns the string representation of the cached properties.Collection<Object>values()protected ObjectvaluesToJavaObject(javax.jcr.Value[] values)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
log
protected final org.slf4j.Logger log
default log
-
fullyRead
protected boolean fullyRead
-
authorizable
protected org.apache.jackrabbit.api.security.user.Authorizable authorizable
-
systemUserManagerPaths
protected final SystemUserManagerPaths systemUserManagerPaths
-
-
Constructor Detail
-
BaseAuthorizableValueMap
protected BaseAuthorizableValueMap(org.apache.jackrabbit.api.security.user.Authorizable authorizable, SystemUserManagerPaths systemUserManagerPaths)
-
-
Method Detail
-
get
public <T> T get(String name, Class<T> type)
- Specified by:
getin interfaceorg.apache.sling.api.resource.ValueMap
-
get
public <T> T get(String name, T defaultValue)
- Specified by:
getin interfaceorg.apache.sling.api.resource.ValueMap
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<String,Object>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<String,Object>
-
readPropertyAndCache
protected Object readPropertyAndCache(String key, String relPath) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
toJavaObject
public static Object toJavaObject(javax.jcr.Value value) throws javax.jcr.RepositoryException
Converts a JCR Value to a corresponding Java Object- Parameters:
value- the JCR Value to convert- Returns:
- the Java Object
- Throws:
javax.jcr.RepositoryException- if the value cannot be converted
-
valuesToJavaObject
protected Object valuesToJavaObject(javax.jcr.Value[] values) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
readFully
protected abstract void readFully()
-
toString
public String toString()
Reads the authorizable map completely and returns the string representation of the cached properties.
-
-