Class ServiceUser

  • All Implemented Interfaces:
    org.apache.jackrabbit.api.security.user.Authorizable

    public class ServiceUser
    extends Object
    implements org.apache.jackrabbit.api.security.user.Authorizable
    an Authorizable facade to represent a service user (bundle or subservice) as a member of an Authorizable set
    • Field Detail

      • serviceName

        protected final String serviceName
      • serviceInfo

        protected final String serviceInfo
      • id

        protected final String id
      • path

        protected final String path
      • mapping

        protected final org.apache.sling.serviceusermapping.Mapping mapping
      • principal

        protected final Principal principal
    • Constructor Detail

      • ServiceUser

        public ServiceUser​(Authorizables.Context context,
                           org.apache.sling.serviceusermapping.Mapping mapping)
                    throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
    • Method Detail

      • initialize

        public void initialize​(Authorizables.Context context)
                        throws javax.jcr.RepositoryException
        to avoid a possible endless loop during construction the relations are set up in a separate step
        Throws:
        javax.jcr.RepositoryException
      • getServiceName

        public String getServiceName()
      • getServiceInfo

        public String getServiceInfo()
      • getID

        public String getID()
        Specified by:
        getID in interface org.apache.jackrabbit.api.security.user.Authorizable
      • isGroup

        public boolean isGroup()
        Specified by:
        isGroup in interface org.apache.jackrabbit.api.security.user.Authorizable
      • getPrincipal

        public Principal getPrincipal()
        Specified by:
        getPrincipal in interface org.apache.jackrabbit.api.security.user.Authorizable
      • declaredMemberOf

        public Iterator<org.apache.jackrabbit.api.security.user.Group> declaredMemberOf()
        Specified by:
        declaredMemberOf in interface org.apache.jackrabbit.api.security.user.Authorizable
      • memberOf

        public Iterator<org.apache.jackrabbit.api.security.user.Group> memberOf()
        Specified by:
        memberOf in interface org.apache.jackrabbit.api.security.user.Authorizable
      • remove

        public void remove()
                    throws javax.jcr.RepositoryException
        Specified by:
        remove in interface org.apache.jackrabbit.api.security.user.Authorizable
        Throws:
        javax.jcr.RepositoryException
      • getPropertyNames

        public Iterator<String> getPropertyNames()
        Specified by:
        getPropertyNames in interface org.apache.jackrabbit.api.security.user.Authorizable
      • getPropertyNames

        public Iterator<String> getPropertyNames​(String relPath)
        Specified by:
        getPropertyNames in interface org.apache.jackrabbit.api.security.user.Authorizable
      • hasProperty

        public boolean hasProperty​(String relPath)
        Specified by:
        hasProperty in interface org.apache.jackrabbit.api.security.user.Authorizable
      • setProperty

        public void setProperty​(String relPath,
                                javax.jcr.Value value)
        Specified by:
        setProperty in interface org.apache.jackrabbit.api.security.user.Authorizable
      • setProperty

        public void setProperty​(String relPath,
                                javax.jcr.Value[] value)
        Specified by:
        setProperty in interface org.apache.jackrabbit.api.security.user.Authorizable
      • getProperty

        public javax.jcr.Value[] getProperty​(String relPath)
        Specified by:
        getProperty in interface org.apache.jackrabbit.api.security.user.Authorizable
      • removeProperty

        public boolean removeProperty​(String relPath)
        Specified by:
        removeProperty in interface org.apache.jackrabbit.api.security.user.Authorizable
      • getPath

        public String getPath()
        Specified by:
        getPath in interface org.apache.jackrabbit.api.security.user.Authorizable