Package edu.vt.middleware.ldap.ed
Class EdContext
- java.lang.Object
-
- edu.vt.middleware.ldap.ed.EdContext
-
public final class EdContext extends Object
Generates ed client objects to interact with various ED directories.- Author:
- Middleware Services
-
-
Field Summary
Fields Modifier and Type Field Description static String
AFFILIATION_ATTR
Affiliation attribute for Enterprise Directory operations.static String
ALL_ATTR
All attributes available for Enterprise Directory operations.static String
BASE_DN
Base DN for Enterprise Directory operations.static String
ENTITLEMENT_FILTER
Entitlement filter for finding a specific entitlement object.static String
ENTITLEMENT_VIEWER_FILTER
Entitlement filter for finding a specific entitlement object by its service viewer.static String
ENTITLEMENTS_BASE_DN
Entitlements branch base DN for Enterprise Directory operations.static String
GROUP_FILTER
Group filter for finding a group.static String
GROUP_MEMBERSHIP_ATTR
Group membership attribute for Enterprise Directory group operations.static String
GROUPS_BASE_DN
Groups branch base DN for Enterprise Directory operations.static String
MEMBER_ATTR
Member attribute for Enterprise Directory group operations.static String
MEMBER_FILTER
Member filter for finding a group.static String
PEOPLE_BASE_DN
People branch base DN for Enterprise Directory operations.static String
SERVICES_BASE_DN
Services branch base DN for Enterprise Directory operations.static String
USER_FILTER
User filter for finding a person.static String
USERID_ATTR
User identifier attribute for Enterprise Directory operations.static String
UUGID_ATTR
Group identifier attribute for Enterprise Directory operations.static String
UUSID_ATTR
Service identifier attribute for Enterprise Directory operations.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.ldaptive.ConnectionConfig
createConnectionConfig(DirectoryType type, DirectoryEnv env)
Creates a connection config object with configuration options set for the specified directory.static EdAuthService
createEdAuthClient()
Creates an edauth client object capable of authentication and authorization operations on a production directory.static EdAuthService
createEdAuthClient(DirectoryEnv env)
Creates an edauth client object capable of authentication and authorization operations on the specified directory.static EdService
createEdSearchClient(DirectoryType type)
Creates an ed client object capable of interacting with the specified production directory.static EdService
createEdSearchClient(DirectoryType type, DirectoryEnv env)
Creates an ed search client object capable of interacting with the specified directory.static EdAuthService
createLoginClient(DirectoryEnv env)
Creates a login client object capable of authentication and authorization operations on the login directory.static DirectoryEnv
getDefaultEnvironment()
Get the default environment for all ED directory client objects created by the factory.protected static String
getLdapUrl(DirectoryType type, DirectoryEnv env)
Gets the ED directory host name for the given directory type and environment.protected static String
getTypeEnvName(DirectoryType type, DirectoryEnv env)
Creates a unique name of the form TYPE-ENV using the given directory type and environment.
-
-
-
Field Detail
-
BASE_DN
public static final String BASE_DN
Base DN for Enterprise Directory operations.- See Also:
- Constant Field Values
-
PEOPLE_BASE_DN
public static final String PEOPLE_BASE_DN
People branch base DN for Enterprise Directory operations.- See Also:
- Constant Field Values
-
GROUPS_BASE_DN
public static final String GROUPS_BASE_DN
Groups branch base DN for Enterprise Directory operations.- See Also:
- Constant Field Values
-
ENTITLEMENTS_BASE_DN
public static final String ENTITLEMENTS_BASE_DN
Entitlements branch base DN for Enterprise Directory operations.- See Also:
- Constant Field Values
-
SERVICES_BASE_DN
public static final String SERVICES_BASE_DN
Services branch base DN for Enterprise Directory operations.- See Also:
- Constant Field Values
-
ENTITLEMENT_FILTER
public static final String ENTITLEMENT_FILTER
Entitlement filter for finding a specific entitlement object.- See Also:
- Constant Field Values
-
ENTITLEMENT_VIEWER_FILTER
public static final String ENTITLEMENT_VIEWER_FILTER
Entitlement filter for finding a specific entitlement object by its service viewer.- See Also:
- Constant Field Values
-
USERID_ATTR
public static final String USERID_ATTR
User identifier attribute for Enterprise Directory operations.- See Also:
- Constant Field Values
-
USER_FILTER
public static final String USER_FILTER
User filter for finding a person.- See Also:
- Constant Field Values
-
UUGID_ATTR
public static final String UUGID_ATTR
Group identifier attribute for Enterprise Directory operations.- See Also:
- Constant Field Values
-
UUSID_ATTR
public static final String UUSID_ATTR
Service identifier attribute for Enterprise Directory operations.- See Also:
- Constant Field Values
-
GROUP_FILTER
public static final String GROUP_FILTER
Group filter for finding a group.- See Also:
- Constant Field Values
-
AFFILIATION_ATTR
public static final String AFFILIATION_ATTR
Affiliation attribute for Enterprise Directory operations.- See Also:
- Constant Field Values
-
GROUP_MEMBERSHIP_ATTR
public static final String GROUP_MEMBERSHIP_ATTR
Group membership attribute for Enterprise Directory group operations.- See Also:
- Constant Field Values
-
ALL_ATTR
public static final String ALL_ATTR
All attributes available for Enterprise Directory operations.- See Also:
- Constant Field Values
-
MEMBER_ATTR
public static final String MEMBER_ATTR
Member attribute for Enterprise Directory group operations.- See Also:
- Constant Field Values
-
MEMBER_FILTER
public static final String MEMBER_FILTER
Member filter for finding a group.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultEnvironment
public static DirectoryEnv getDefaultEnvironment()
Get the default environment for all ED directory client objects created by the factory.- Returns:
- Production directory environment.
-
createEdSearchClient
public static EdService createEdSearchClient(DirectoryType type)
Creates an ed client object capable of interacting with the specified production directory.- Parameters:
type
- Directory class type, e.g. EdAuth, EdId, EdLite.- Returns:
- An ED client object capable of performing operations on the specified directory instance.
-
createEdSearchClient
public static EdService createEdSearchClient(DirectoryType type, DirectoryEnv env)
Creates an ed search client object capable of interacting with the specified directory.- Parameters:
type
- Directory class type, e.g. EdAuth, EdId, EdLite.env
- Directory environment, e.g. dev, pprd, prod.- Returns:
- An ED client object capable of performing operations on the specified directory instance.
-
createEdAuthClient
public static EdAuthService createEdAuthClient()
Creates an edauth client object capable of authentication and authorization operations on a production directory.- Returns:
- An authentication/authorization-capable ED client.
-
createEdAuthClient
public static EdAuthService createEdAuthClient(DirectoryEnv env)
Creates an edauth client object capable of authentication and authorization operations on the specified directory.- Parameters:
env
- Directory environment, e.g. dev, pprd, prod.- Returns:
- An authentication/authorization-capable ED client.
-
createLoginClient
public static EdAuthService createLoginClient(DirectoryEnv env)
Creates a login client object capable of authentication and authorization operations on the login directory.- Parameters:
env
- Directory environment, e.g. dev, pprd, prod.- Returns:
- An authentication/authorization-capable ED client.
-
getLdapUrl
protected static String getLdapUrl(DirectoryType type, DirectoryEnv env)
Gets the ED directory host name for the given directory type and environment.- Parameters:
type
- Directory class type, e.g. EdAuth, EdId, EdLite.env
- Directory environment, e.g. dev, pprd, prod.- Returns:
- Fully-qualified DNS host name of requested directory.
-
createConnectionConfig
public static org.ldaptive.ConnectionConfig createConnectionConfig(DirectoryType type, DirectoryEnv env)
Creates a connection config object with configuration options set for the specified directory.- Parameters:
type
- Directory class type, e.g. EdAuth, EdId, EdLite.env
- Directory environment, e.g. dev, pprd, prod.- Returns:
- connection config object configured for the specified directory instance.
-
getTypeEnvName
protected static String getTypeEnvName(DirectoryType type, DirectoryEnv env)
Creates a unique name of the form TYPE-ENV using the given directory type and environment.- Parameters:
type
- Directory type.env
- Directory environment.- Returns:
- Unique name for the directory type/environment combination given of the form TYPE-ENV.
-
-