|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.internet2.middleware.ldappc.ConfigManager
public class ConfigManager
Class for accessing values from the Auth2Ldap configuration file.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface edu.internet2.middleware.ldappc.LdappcConfig |
|---|
LdappcConfig.GroupDNStructure |
| Field Summary | |
|---|---|
static String |
CONFIG_FILE_RESOURCE
Default configuration file resource name. |
static String |
JAXP_SCHEMA_LANGUAGE
JAXP schema language property name. |
static String |
JAXP_SCHEMA_SOURCE
JAXP schema source property name. |
static String |
PROPERTIES_FILE_RESOURCE
Default properties file resource name. |
static String |
PROPERTY_USE_RANGE_HANDLER
Property which defines whether or not the range search result handler is used |
static String |
SCHEMA_FILE_RESOURCE
Configuration Schema file resource name. |
static String |
W3C_XML_SCHEMA
JAXP schema language value for W3C XML Schema. |
| Fields inherited from interface edu.internet2.middleware.ldappc.LdappcConfig |
|---|
GROUPER_ID_ATTRIBUTE, GROUPER_NAME_ATTRIBUTE |
| Constructor Summary | |
|---|---|
ConfigManager()
|
|
ConfigManager(String pathToConfig)
Constructs an instance of ConfigManager using the configuration file identified by the uri. |
|
ConfigManager(String pathToConfig,
String pathToProperties)
Constructs an instance of ConfigManager using the given configuration file and properties file |
|
| Method Summary | |
|---|---|
void |
addSubjectHashEstimate(String source,
int size)
Sets the estimated size for a hash table listing groups to populate. |
Map<String,List<String>> |
getAttributeResolverMapping()
This method returns a possibly empty Map of the AttributeResolver
attribute name to LDAP attribute name mapping. |
String |
getAttributeResolverMappingLdapEmptyValue(String ldapAttribute)
This gets the value to store in the ldap attribute if there are no AttributeResolver attribute values to store there. |
Set<String> |
getAttributeResolverMappingObjectClass()
This sets objectclass that a Group entry must have in order to support the AttributeResolver attribute to LDAP attribute. |
boolean |
getBundleModifications()
Returns true if a group's attribute modifications should be performed in one LDAP operation. |
boolean |
getCreateGroupThenModifyMembers()
Returns true if the group should be created without members followed by a modification which adds member attributes, defaults to false. |
Map |
getGroupAttributeMapping()
This method returns a possibly empty Map of the Group attribute
name to LDAP attribute name mapping. |
String |
getGroupAttributeMappingLdapEmptyValue(String ldapAttribute)
This gets the value to store in the ldap attribute if there are no grouper attribute values to store there. |
Set<String> |
getGroupAttributeMappingObjectClass()
This gets the LDAP objectclass the Group entry must have to support the Grouper attribute to LDAP attribute mapping. |
Map |
getGroupAttrMatchingQueries()
This method returns a possibly empty Map of the Group attribute
name/value pairs for creating matching queries. |
String |
getGroupDnGrouperAttribute()
This returns the Grouper group attribute whose value is the Group RND value. |
String |
getGroupDnObjectClass()
Returns the name of the object class for the Group entry when getGroupDnStructure() returns LdappcConfig#GROUP_DN_FLAT . |
String |
getGroupDnRdnAttribute()
Returns the RDN attribute name for the Group entry. |
String |
getGroupDnRoot()
This returns the DN of the root entry being used for Group DNs. |
LdappcConfig.GroupDNStructure |
getGroupDnStructure()
This returns the defined Group DN structure. |
int |
getGroupHashEstimate()
Get the group hash table size estimate. |
String |
getGroupMembersDnListAttribute()
This gets the LDAP entry attribute containing the list of Member DNs which belong to the Group. |
String |
getGroupMembersDnListEmptyValue()
This gets the value to store in the group member DN list attribute if there are no member DNs to store there. |
String |
getGroupMembersDnListObjectClass()
This gets the object class to be added to the Group LDAP entry so support the Group members Dn list attribute. |
String |
getGroupMembersNameListAttribute()
This gets the LDAP entry attribute containing the list of Member names which belong to the Group. |
String |
getGroupMembersNameListEmptyValue()
This gets the value to store in the group member name list attribute if there are no member names to store there. |
String |
getGroupMembersNameListNamingAttribute(String source)
This method returns the Subject attribute name for creating the Member's name for the given source name. |
Map |
getGroupMembersNameListNamingAttributes()
This method returns a possibly empty Map of the Group members name
list source to subject attribute mapping used to determine a members name. |
String |
getGroupMembersNameListObjectClass()
This gets the object class to be added to the Group LDAP entry so support the Group members name list attribute. |
Set |
getGroupSubordinateStemQueries()
This method returns a possibly empty Set of the Group stems for
creating subordinate stem queries. |
Hashtable |
getLdapContextParameters()
This method returns a Hashtable of the LDAP parameters defined to
create the InitialContext. |
String |
getMemberGroupsListAttribute()
This gets the LDAP entry attribute name containing the list of Groups to which a Member belongs. |
String |
getMemberGroupsListObjectClass()
This returns the object class the Member's LDAP entry must have to support the member groups list attribute. |
String |
getMemberGroupsListTemporaryDirectory()
Directory for the membership updates temporary file. |
String |
getMemberGroupsNamingAttribute()
This gets the Grouper Group naming attribute to be used when creating the list of Groups to which Member belongs. |
boolean |
getProvisionGroupsTwoStep()
Returns true if groups should be provisioned in two steps. |
boolean |
getProvisionMemberGroups()
Returns true if member groups should be provisioned as members, false otherwise. |
boolean |
getProvisionMemberGroupsIgnoreQueries()
Returns true if member groups should be provisioned even if they are not in the set of groups to be provisioned, which reproduces the behavior of LDAPPC prior to 1.5.0. |
Set<String> |
getResolverQueries()
This method returns a possibly empty Set of the attribute resolver
data connector ids for returning the groups to be provisioned. |
int |
getSourceSubjectHashEstimate(String source)
This returns the size estimate for a hash table containing the subjects in this source that will be provisioned. |
Map<String,Integer> |
getSourceSubjectHashEstimates()
This returns a Map of size estimate for a hash table containing the
subjects in this source that will be provisioned. |
LdapSearchFilter |
getSourceSubjectLdapFilter(String source)
This returns the Subject LDAP filter for the given Source for the Source Subject identifiers. |
Map<String,LdapSearchFilter> |
getSourceSubjectLdapFilters()
This returns a Map of the Source to Subject LDAP filters for the
Source Subject identifiers. |
String |
getSourceSubjectNamingAttribute(String source)
This returns the Subject naming attribute for the given Source for the Source Subject identifiers. |
Map |
getSourceSubjectNamingAttributes()
This returns a Map of the Source to Subject naming attribute for
the Source Subject identifiers. |
static URL |
getSystemResourceURL(String resource,
boolean isRequired)
This returns a URL created by
ClassLoader.getSystemResource(java.lang.String) for
resource. |
boolean |
isGroupMembersDnListed()
This returns a boolean indicating if a Group Members LDAP entry DN list is to be maintained on the Groups LDAP entry. |
boolean |
isGroupMembersNameListed()
This returns a boolean indicating if a Group Members name list is to be maintained on the Groups LDAP entry. |
boolean |
isMemberGroupsListed()
This returns a boolean indicating if Member Groups list is to be maintained. |
boolean |
isRootElementFound()
This method returns true if the root element of the configuration file
was encountered. |
Iterator |
listSaxParseErrors()
This method returns the list, possibly empty, of the SAXParseExceptions created while parsing the configuration file. |
void |
resetGroupSubordinateStemQueries()
This method returns a new empty Set of the Group stems for creating
subordinate stem queries. |
protected void |
setBundleModifications(Boolean bundleModifications)
|
protected void |
setGroupDnStructure(LdappcConfig.GroupDNStructure structure)
|
void |
setGroupHashEstimate(int size)
Sets the estimated size for a hash table listing groups to populate. |
protected void |
setProvisionGroupsTwoStep(Boolean provisionGroupsTwoStep)
|
protected void |
setProvisionMemberGroups(Boolean provisionMemberGroups)
|
protected void |
setProvisionMemberGroupsIgnoreQueries(Boolean provisionMemberGroupsIgnoreQueries)
|
boolean |
useRangeSearchResultHandler()
Returns true if the RangeSearchResultHandler should be used
to process attributes returned from LDAP searches. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONFIG_FILE_RESOURCE
public static final String PROPERTIES_FILE_RESOURCE
public static final String SCHEMA_FILE_RESOURCE
public static final String JAXP_SCHEMA_LANGUAGE
public static final String JAXP_SCHEMA_SOURCE
public static final String W3C_XML_SCHEMA
public static final String PROPERTY_USE_RANGE_HANDLER
| Constructor Detail |
|---|
public ConfigManager()
throws ConfigurationException
ConfigurationException
public ConfigManager(String pathToConfig)
throws ConfigurationException
pathToConfig - path to configuration file
ConfigurationException - thrown if an error occurs loading the instance from the given uri.
public ConfigManager(String pathToConfig,
String pathToProperties)
throws ConfigurationException
pathToConfig - path to configuration fileldappcPropertiesFile - path to properties file
ConfigurationException| Method Detail |
|---|
public Iterator listSaxParseErrors()
SAXParseExceptions created while parsing the configuration file.
Vector of SAXParseExceptions
public static URL getSystemResourceURL(String resource,
boolean isRequired)
throws ConfigurationException
URL created by
ClassLoader.getSystemResource(java.lang.String) for
resource. If the resource is not found (i.e., URL is null) and
isRequired is true, this throws a
ConfigurationException.
resource - The resource nameisRequired - Boolean indicating if the resource is required
URL for the resource, possibly a null value.
ConfigurationException - thrown as defined above.public Hashtable getLdapContextParameters()
Hashtable of the LDAP parameters defined to
create the InitialContext. Each of the parameter names from the
configuration file that match, ignoring case, a constant name from
LdapContext have been converted to the actual value of the
LdapContext constant. This allows the returned Hashtable to
be used directly when creating an initial context.
getLdapContextParameters in interface LdappcConfigpublic Map getGroupAttrMatchingQueries()
Map of the Group attribute
name/value pairs for creating matching queries. The key for the map is the attribute
name, and the value is a Set of the attribute value strings.
getGroupAttrMatchingQueries in interface LdappcConfigpublic Set getGroupSubordinateStemQueries()
Set of the Group stems for
creating subordinate stem queries.
getGroupSubordinateStemQueries in interface LdappcConfigpublic void resetGroupSubordinateStemQueries()
Set of the Group stems for creating
subordinate stem queries. It is used only for testing to override the ldappc.xml file
values.
public LdappcConfig.GroupDNStructure getGroupDnStructure()
getGroupDnStructure in interface LdappcConfigedu.internet2.middleware.ldappc.LdappcConfig#GROUP_DN_FLAT or
edu.internet2.middleware.ldappc.LdappcConfig#GROUP_DN_BUSHYprotected void setGroupDnStructure(LdappcConfig.GroupDNStructure structure)
public String getGroupDnRoot()
getGroupDnRoot in interface LdappcConfigpublic String getGroupDnObjectClass()
getGroupDnStructure() returns LdappcConfig#GROUP_DN_FLAT .
getGroupDnObjectClass in interface LdappcConfigpublic String getGroupDnRdnAttribute()
getGroupDnRdnAttribute in interface LdappcConfigpublic String getGroupDnGrouperAttribute()
getGroupDnGrouperAttribute in interface LdappcConfigpublic Set<String> getGroupAttributeMappingObjectClass()
getGroupAttributeMappingObjectClass in interface LdappcConfignull if not defined.public Map getGroupAttributeMapping()
Map of the Group attribute
name to LDAP attribute name mapping.
getGroupAttributeMapping in interface LdappcConfigpublic String getGroupAttributeMappingLdapEmptyValue(String ldapAttribute)
getGroupAttributeMappingLdapEmptyValue in interface LdappcConfigldapAttribute - Name of the Ldap Attribute
null if not defined.public Map getSourceSubjectNamingAttributes()
Map of the Source to Subject naming attribute for
the Source Subject identifiers.
getSourceSubjectNamingAttributes in interface LdappcConfigpublic String getSourceSubjectNamingAttribute(String source)
getSourceSubjectNamingAttribute in interface LdappcConfigsource - Source name
null if the Source is not foundpublic Map<String,LdapSearchFilter> getSourceSubjectLdapFilters()
Map of the Source to Subject LDAP filters for the
Source Subject identifiers.
getSourceSubjectLdapFilters in interface LdappcConfig
public void addSubjectHashEstimate(String source,
int size)
source - Source name.size - Estimated cache size for this source.public Map<String,Integer> getSourceSubjectHashEstimates()
Map of size estimate for a hash table containing the
subjects in this source that will be provisioned.
getSourceSubjectHashEstimates in interface LdappcConfigpublic int getSourceSubjectHashEstimate(String source)
getSourceSubjectHashEstimate in interface LdappcConfigsource - Source name
public LdapSearchFilter getSourceSubjectLdapFilter(String source)
getSourceSubjectLdapFilter in interface LdappcConfigsource - Source name
null if the Source is not foundpublic void setGroupHashEstimate(int size)
size - Estimated cache size.public int getGroupHashEstimate()
getGroupHashEstimate in interface LdappcConfigpublic boolean isMemberGroupsListed()
isMemberGroupsListed in interface LdappcConfiggetMemberGroupsListAttribute(),
getMemberGroupsNamingAttribute()public String getMemberGroupsListObjectClass()
isMemberGroupsListed() returns false, the value
defined here has no meaning.
getMemberGroupsListObjectClass in interface LdappcConfignull if not defined.public String getMemberGroupsListAttribute()
isMemberGroupsListed() returns false, the value defined
here has no meaning.
getMemberGroupsListAttribute in interface LdappcConfigpublic String getMemberGroupsNamingAttribute()
isMemberGroupsListed() returns false, the
value defined here has no meaning.
getMemberGroupsNamingAttribute in interface LdappcConfigpublic String getMemberGroupsListTemporaryDirectory()
getMemberGroupsListTemporaryDirectory in interface LdappcConfigpublic boolean isGroupMembersDnListed()
isGroupMembersDnListed in interface LdappcConfiggetGroupMembersDnListObjectClass(),
getGroupMembersDnListAttribute()public String getGroupMembersDnListObjectClass()
isGroupMembersDnListed() returns false, the
value defined here has no meaning.
getGroupMembersDnListObjectClass in interface LdappcConfignull if not defined.public String getGroupMembersDnListAttribute()
isGroupMembersDnListed() returns false, the value defined here
has no meaning.
getGroupMembersDnListAttribute in interface LdappcConfigpublic String getGroupMembersDnListEmptyValue()
getGroupMembersDnListEmptyValue in interface LdappcConfignull if not defined.public boolean isGroupMembersNameListed()
isGroupMembersNameListed in interface LdappcConfiggetGroupMembersNameListAttribute(),
getGroupMembersNameListObjectClass(),
getGroupMembersNameListNamingAttribute(String),
getGroupMembersNameListNamingAttributes()public String getGroupMembersNameListObjectClass()
getGroupMembersNameListObjectClass in interface LdappcConfignull if not defined.public String getGroupMembersNameListAttribute()
isGroupMembersNameListed() returns false, the value defined
here has no meaning.
getGroupMembersNameListAttribute in interface LdappcConfigpublic String getGroupMembersNameListEmptyValue()
getGroupMembersNameListEmptyValue in interface LdappcConfignull if not defined.public String getGroupMembersNameListNamingAttribute(String source)
getGroupMembersNameListNamingAttribute in interface LdappcConfigsource - Source name
null if the source was
not found.public Map getGroupMembersNameListNamingAttributes()
Map of the Group members name
list source to subject attribute mapping used to determine a members name.
getGroupMembersNameListNamingAttributes in interface LdappcConfigpublic boolean isRootElementFound()
true if the root element of the configuration file
was encountered.
true if root element encountered, and false
otherwise.public boolean getCreateGroupThenModifyMembers()
LdappcConfig
getCreateGroupThenModifyMembers in interface LdappcConfigpublic boolean getProvisionMemberGroups()
LdappcConfig
getProvisionMemberGroups in interface LdappcConfigprotected void setProvisionMemberGroups(Boolean provisionMemberGroups)
public boolean getProvisionGroupsTwoStep()
LdappcConfig
getProvisionGroupsTwoStep in interface LdappcConfigprotected void setProvisionGroupsTwoStep(Boolean provisionGroupsTwoStep)
public boolean getBundleModifications()
LdappcConfig
getBundleModifications in interface LdappcConfigprotected void setBundleModifications(Boolean bundleModifications)
public Map<String,List<String>> getAttributeResolverMapping()
Map of the AttributeResolver
attribute name to LDAP attribute name mapping.
getAttributeResolverMapping in interface LdappcConfigpublic String getAttributeResolverMappingLdapEmptyValue(String ldapAttribute)
getAttributeResolverMappingLdapEmptyValue in interface LdappcConfigldapAttribute - Name of the Ldap Attribute
null if not defined.public Set<String> getAttributeResolverMappingObjectClass()
getAttributeResolverMappingObjectClass in interface LdappcConfigobjectClass - Object class to support the AttributeResolver attribute to LDAP attribute
map
null if not defined.public boolean useRangeSearchResultHandler()
LdappcConfigRangeSearchResultHandler should be used
to process attributes returned from LDAP searches. See
http://code.google.com/p/vt-middleware/wiki/vtldapAD
useRangeSearchResultHandler in interface LdappcConfigLdappcConfig.useRangeSearchResultHandler()public boolean getProvisionMemberGroupsIgnoreQueries()
LdappcConfigLdappcConfig.getProvisionMemberGroups() is true.
getProvisionMemberGroupsIgnoreQueries in interface LdappcConfigprotected void setProvisionMemberGroupsIgnoreQueries(Boolean provisionMemberGroupsIgnoreQueries)
public Set<String> getResolverQueries()
LdappcConfigSet of the attribute resolver
data connector ids for returning the groups to be provisioned.
getResolverQueries in interface LdappcConfig
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||