Class BaseAuthorizableValueMap

  • All Implemented Interfaces:
    Map<String,​Object>, org.apache.sling.api.resource.ValueMap
    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 Detail

      • log

        protected final org.slf4j.Logger log
        default log
      • fullyRead

        protected boolean fullyRead
      • authorizable

        protected org.apache.jackrabbit.api.security.user.Authorizable authorizable
    • 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:
        get in interface org.apache.sling.api.resource.ValueMap
      • get

        public <T> T get​(String name,
                         T defaultValue)
        Specified by:
        get in interface org.apache.sling.api.resource.ValueMap
      • 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.
        Overrides:
        toString in class Object
      • convertToType

        protected <T> T convertToType​(String name,
                                      Class<T> type)