@StableMinor(version="12.2", sinceVersion="11.0") public class ActiveDirectoryPrincipalReader extends Object implements IPrincipalReader
Constructor and Description |
---|
ActiveDirectoryPrincipalReader() |
Modifier and Type | Method and Description |
---|---|
protected String |
evaluateLoginExpression(String loginExpression,
Attributes userAttributes)
Evaluates an expression for resolving the login to be used for an user.
|
protected Collection<String> |
getCustomUserAttributes()
Returns the custom attributes to be read for each user.
|
protected String |
getGroupShortId(Attributes groupAttributes)
Returns the shortId for the group with the given attributes.
|
protected String |
getUserPrimaryLogin(Attributes userAttributes)
Returns the primary login for the user with the given attributes.
|
Map<String,String> |
read(Node reader)
Read users and groups and return them in string format in entries named userList and groupList of the map returned.
|
protected void |
readGroup(StringBuilder sbGroup,
SearchResult entry)
Read a group from a
SearchResult and stores the XML string in the given StringBuilder . |
protected String |
readGroups()
Returns a XML string containing the groups read from AD.
|
protected void |
readGroups(StringBuilder sbGroup,
LdapContext context,
boolean recursive)
Reads the groups using the given
LdapContext and stores the XML string in the given StringBuilder . |
protected void |
readUser(StringBuilder sbUser,
SearchResult entry)
Read a user from a
SearchResult and stores the XML string in the given StringBuilder . |
protected String |
readUsers()
Returns a XML string containing the users read from AD.
|
protected void |
readUsers(StringBuilder sbUser,
LdapContext context,
boolean recursive)
Reads the users from ActiveDirectory using the given
LdapContext and store the result XML string in the
given StringBuilder . |
public Map<String,String> read(Node reader) throws PortalException
IPrincipalReader
read
in interface IPrincipalReader
PortalException
protected String readUsers() throws PortalException
PortalException
protected String readGroups() throws PortalException
PortalException
protected void readUsers(StringBuilder sbUser, LdapContext context, boolean recursive) throws PortalException
LdapContext
and store the result XML string in the
given StringBuilder
. In the default implementation, this method is called by readUsers()
.sbUser
- the StringBuilder
that stores the users XML string.context
- the LdapContext
.PortalException
protected void readUser(StringBuilder sbUser, SearchResult entry) throws NamingException
SearchResult
and stores the XML string in the given StringBuilder
. In the
default implementation, this method is called from #readUsers(StringBuilder, LdapContext)
.sbUser
- the StringBuilder
.entry
- the SearchResult
.NamingException
protected Collection<String> getCustomUserAttributes()
protected String getUserPrimaryLogin(Attributes userAttributes) throws NamingException
userAttributes
- the user's attributes.NamingException
protected String evaluateLoginExpression(String loginExpression, Attributes userAttributes)
loginExpression
- the login expression.userAttributes
- the user's attributes.protected String getGroupShortId(Attributes groupAttributes) throws NamingException
groupAttributes
- the group's attributes.NamingException
protected void readGroups(StringBuilder sbGroup, LdapContext context, boolean recursive) throws PortalException
LdapContext
and stores the XML string in the given StringBuilder
.
In the default implementation, this method is called by readGroups()
.sbGroup
- the StringBuilder
.context
- the LdapContext
.PortalException
protected void readGroup(StringBuilder sbGroup, SearchResult entry) throws NamingException
SearchResult
and stores the XML string in the given StringBuilder
. In the
default implementation, this method is called from #readGroups(StringBuilder, LdapContext)
.sbUser
- the StringBuilder
.entry
- the SearchResult
.NamingException
LumisXP 12.2.0.200122 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.