Class ServiceUser
- java.lang.Object
-
- com.composum.sling.core.usermanagement.service.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classServiceUser.ServicePrincipal
-
Field Summary
Fields Modifier and Type Field Description protected Stringidprotected org.apache.sling.serviceusermapping.Mappingmappingprotected Stringpathprotected Principalprincipalstatic StringSERVICE_USER_ROOTprotected StringserviceInfoprotected StringserviceName
-
Constructor Summary
Constructors Constructor Description ServiceUser(Authorizables.Context context, org.apache.sling.serviceusermapping.Mapping mapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<org.apache.jackrabbit.api.security.user.Group>declaredMemberOf()StringgetID()StringgetPath()PrincipalgetPrincipal()javax.jcr.Value[]getProperty(String relPath)Iterator<String>getPropertyNames()Iterator<String>getPropertyNames(String relPath)StringgetServiceInfo()StringgetServiceName()booleanhasProperty(String relPath)voidinitialize(Authorizables.Context context)to avoid a possible endless loop during construction the relations are set up in a separate stepbooleanisGroup()Iterator<org.apache.jackrabbit.api.security.user.Group>memberOf()voidremove()booleanremoveProperty(String relPath)voidsetProperty(String relPath, javax.jcr.Value value)voidsetProperty(String relPath, javax.jcr.Value[] value)
-
-
-
Field Detail
-
SERVICE_USER_ROOT
public static final String SERVICE_USER_ROOT
- See Also:
- Constant Field Values
-
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:
getIDin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
isGroup
public boolean isGroup()
- Specified by:
isGroupin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
getPrincipal
public Principal getPrincipal()
- Specified by:
getPrincipalin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
declaredMemberOf
public Iterator<org.apache.jackrabbit.api.security.user.Group> declaredMemberOf()
- Specified by:
declaredMemberOfin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
memberOf
public Iterator<org.apache.jackrabbit.api.security.user.Group> memberOf()
- Specified by:
memberOfin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
remove
public void remove() throws javax.jcr.RepositoryException- Specified by:
removein interfaceorg.apache.jackrabbit.api.security.user.Authorizable- Throws:
javax.jcr.RepositoryException
-
getPropertyNames
public Iterator<String> getPropertyNames()
- Specified by:
getPropertyNamesin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
getPropertyNames
public Iterator<String> getPropertyNames(String relPath)
- Specified by:
getPropertyNamesin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
hasProperty
public boolean hasProperty(String relPath)
- Specified by:
hasPropertyin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
setProperty
public void setProperty(String relPath, javax.jcr.Value value)
- Specified by:
setPropertyin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
setProperty
public void setProperty(String relPath, javax.jcr.Value[] value)
- Specified by:
setPropertyin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
getProperty
public javax.jcr.Value[] getProperty(String relPath)
- Specified by:
getPropertyin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
removeProperty
public boolean removeProperty(String relPath)
- Specified by:
removePropertyin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
getPath
public String getPath()
- Specified by:
getPathin interfaceorg.apache.jackrabbit.api.security.user.Authorizable
-
-