public abstract class LDAPService extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
LDAPService() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
addCountry(DirContext ctx,
String dn)
Adds the country branch of the given DN to the Context.
|
protected boolean |
addDc(DirContext ctx,
String dn)
Adds the DC branch of the given DN to the Context.
|
protected boolean |
addOrg(DirContext ctx,
String dn)
Adds the organization branch of the given DN to the Context.
|
protected boolean |
addOrgUnit(DirContext ctx,
String dn)
Adds the organization unit of the given DN to the Context.
|
protected boolean |
checkAttribute(DirContext ctx,
String dn,
String attributeName,
String attributeValue)
check the attribute for a given subject
|
protected boolean |
constructTree(DirContext ctx,
String dn)
Constructs the necessary LDAP tree for the given DN Assuming CILogon
format:
"CN=Benjamin Leinfelder A515,O=University of Chicago,C=US,DC=cilogon,DC=org"
or LDAP format:
"uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org"
|
protected List<Object> |
getAttributeValues(DirContext ctx,
String dn,
String attributeName) |
String |
getBase() |
String |
getEnumerationValueString(NamingEnumeration namingEnum)
return the next value of a NamingEnumeration, or empty String if there are
not any more.
|
protected String |
parseAttribute(String original,
String attribute) |
protected boolean |
removeEntry(DirContext ctx,
String dn) |
void |
setBase(String base) |
protected boolean removeEntry(DirContext ctx, String dn)
protected boolean checkAttribute(DirContext ctx, String dn, String attributeName, String attributeValue)
dn
- attributeName
- attributeValue
- for considerations on special characters
protected List<Object> getAttributeValues(DirContext ctx, String dn, String attributeName) throws NamingException
NamingException
protected boolean constructTree(DirContext ctx, String dn) throws NamingException
dn
- the full DN from CILogonNamingException
protected boolean addOrg(DirContext ctx, String dn) throws NamingException
dn:
- the DN for the Organization being addedNamingException
protected boolean addOrgUnit(DirContext ctx, String dn) throws NamingException
dn:
- the DN for the Organizational Unit being addedNamingException
protected boolean addDc(DirContext ctx, String dn) throws NamingException
dn:
- the DN for the DC being addedNamingException
protected boolean addCountry(DirContext ctx, String dn) throws NamingException
dn
- the DN of the country being addedNamingException
public String getEnumerationValueString(NamingEnumeration namingEnum) throws NamingException
namingEnum
- NamingException
public String getBase()
public void setBase(String base)
Copyright © 2020. All rights reserved.