public interface ServiceUserWrapper
Modifier and Type | Method and Description |
---|---|
ResourceResolver |
getServiceResourceResolver(ResourceResolverFactory factory,
java.util.Map<java.lang.String,java.lang.Object> authInfo)
Returns a new ResourceResolver for the given service user alias.
|
Session |
impersonateFromService(SlingRepository repo,
java.lang.String alias,
Credentials cred) |
Session |
loginService(SlingRepository repo,
java.lang.String alias)
Returns a new session for the given service user alias.
|
Session loginService(SlingRepository repo, java.lang.String alias) throws LoginException, RepositoryException
repo
- The Sling repository.alias
- The alias, may be null if only one service user is configured for the bundle providing the
repository instance.LoginException
- If the service user cannot be logged in.RepositoryException
- If other repository errors are encountered while creating the session.Session impersonateFromService(SlingRepository repo, java.lang.String alias, Credentials cred) throws LoginException, RepositoryException
LoginException
RepositoryException
ResourceResolver getServiceResourceResolver(ResourceResolverFactory factory, java.util.Map<java.lang.String,java.lang.Object> authInfo) throws LoginException
factory
- The ResourceResolverFactory.authInfo
- authInfo map containing the ResourceResolverFactory.SUBSERVICE value naming the alias to use.LoginException
- If the service user cannot be logged in.Copyright © 2010 - 2020 Adobe. All Rights Reserved