com.liferay.portal.security.ldap
Class PortalLDAPUtil
java.lang.Object
com.liferay.portal.security.ldap.PortalLDAPUtil
public class PortalLDAPUtil
- extends java.lang.Object
View Source
- Author:
- Michael Young, Brian Wing Shun Chan, Jerry Niu, Scott Lee, Hervé Ménage
Method Summary |
static void |
exportToLDAP(com.liferay.portal.model.Contact contact)
|
static void |
exportToLDAP(com.liferay.portal.model.User user)
|
static java.lang.String |
getAuthSearchFilter(long companyId,
java.lang.String emailAddress,
java.lang.String screenName,
java.lang.String userId)
|
static javax.naming.ldap.LdapContext |
getContext(long companyId)
|
static javax.naming.ldap.LdapContext |
getContext(long companyId,
java.lang.String providerURL,
java.lang.String pricipal,
java.lang.String credentials)
|
static javax.naming.directory.Attributes |
getGroupAttributes(long companyId,
javax.naming.ldap.LdapContext ctx,
java.lang.String fullDistinguishedName)
|
static javax.naming.directory.Attributes |
getGroupAttributes(long companyId,
javax.naming.ldap.LdapContext ctx,
java.lang.String fullDistinguishedName,
boolean includeReferenceAttributes)
|
static java.util.Properties |
getGroupMappings(long companyId)
|
static javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> |
getGroups(long companyId,
javax.naming.ldap.LdapContext ctx,
int maxResults)
|
static javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> |
getGroups(long companyId,
javax.naming.ldap.LdapContext ctx,
int maxResults,
java.lang.String baseDN,
java.lang.String groupFilter)
|
static java.lang.String |
getNameInNamespace(long companyId,
javax.naming.Binding binding)
|
static javax.naming.Binding |
getUser(long companyId,
java.lang.String screenName)
|
static javax.naming.directory.Attributes |
getUserAttributes(long companyId,
javax.naming.ldap.LdapContext ctx,
java.lang.String fullDistinguishedName)
|
static java.util.Properties |
getUserMappings(long companyId)
|
static javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> |
getUsers(long companyId,
javax.naming.ldap.LdapContext ctx,
int maxResults)
|
static javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> |
getUsers(long companyId,
javax.naming.ldap.LdapContext ctx,
int maxResults,
java.lang.String baseDN,
java.lang.String userFilter)
|
static java.lang.String |
getUsersDN(long companyId)
|
static boolean |
hasUser(long companyId,
java.lang.String screenName)
|
static void |
importFromLDAP()
|
static void |
importFromLDAP(long companyId)
|
static com.liferay.portal.model.UserGroup |
importLDAPGroup(long companyId,
javax.naming.ldap.LdapContext ctx,
javax.naming.directory.Attributes attrs,
boolean importGroupMembership)
|
static com.liferay.portal.model.User |
importLDAPUser(long companyId,
javax.naming.ldap.LdapContext ctx,
javax.naming.directory.Attributes attrs,
java.lang.String password,
boolean importGroupMembership)
|
static boolean |
isAuthEnabled(long companyId)
|
static boolean |
isExportEnabled(long companyId)
|
static boolean |
isImportEnabled(long companyId)
|
static boolean |
isImportOnStartup(long companyId)
|
static boolean |
isNtlmEnabled(long companyId)
|
static boolean |
isPasswordPolicyEnabled(long companyId)
|
static boolean |
isSiteMinderEnabled(long companyId)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IMPORT_BY_USER
public static final java.lang.String IMPORT_BY_USER
- See Also:
- Constant Field Values
IMPORT_BY_GROUP
public static final java.lang.String IMPORT_BY_GROUP
- See Also:
- Constant Field Values
PortalLDAPUtil
public PortalLDAPUtil()
exportToLDAP
public static void exportToLDAP(com.liferay.portal.model.Contact contact)
throws java.lang.Exception
- Throws:
java.lang.Exception
exportToLDAP
public static void exportToLDAP(com.liferay.portal.model.User user)
throws java.lang.Exception
- Throws:
java.lang.Exception
getAuthSearchFilter
public static java.lang.String getAuthSearchFilter(long companyId,
java.lang.String emailAddress,
java.lang.String screenName,
java.lang.String userId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getContext
public static javax.naming.ldap.LdapContext getContext(long companyId)
throws java.lang.Exception
- Throws:
java.lang.Exception
getContext
public static javax.naming.ldap.LdapContext getContext(long companyId,
java.lang.String providerURL,
java.lang.String pricipal,
java.lang.String credentials)
throws java.lang.Exception
- Throws:
java.lang.Exception
getGroupAttributes
public static javax.naming.directory.Attributes getGroupAttributes(long companyId,
javax.naming.ldap.LdapContext ctx,
java.lang.String fullDistinguishedName)
throws java.lang.Exception
- Throws:
java.lang.Exception
getGroupAttributes
public static javax.naming.directory.Attributes getGroupAttributes(long companyId,
javax.naming.ldap.LdapContext ctx,
java.lang.String fullDistinguishedName,
boolean includeReferenceAttributes)
throws java.lang.Exception
- Throws:
java.lang.Exception
getGroupMappings
public static java.util.Properties getGroupMappings(long companyId)
throws java.lang.Exception
- Throws:
java.lang.Exception
getGroups
public static javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> getGroups(long companyId,
javax.naming.ldap.LdapContext ctx,
int maxResults)
throws java.lang.Exception
- Throws:
java.lang.Exception
getGroups
public static javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> getGroups(long companyId,
javax.naming.ldap.LdapContext ctx,
int maxResults,
java.lang.String baseDN,
java.lang.String groupFilter)
throws java.lang.Exception
- Throws:
java.lang.Exception
getNameInNamespace
public static java.lang.String getNameInNamespace(long companyId,
javax.naming.Binding binding)
throws java.lang.Exception
- Throws:
java.lang.Exception
getUser
public static javax.naming.Binding getUser(long companyId,
java.lang.String screenName)
throws java.lang.Exception
- Throws:
java.lang.Exception
getUserAttributes
public static javax.naming.directory.Attributes getUserAttributes(long companyId,
javax.naming.ldap.LdapContext ctx,
java.lang.String fullDistinguishedName)
throws java.lang.Exception
- Throws:
java.lang.Exception
getUserMappings
public static java.util.Properties getUserMappings(long companyId)
throws java.lang.Exception
- Throws:
java.lang.Exception
getUsers
public static javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> getUsers(long companyId,
javax.naming.ldap.LdapContext ctx,
int maxResults)
throws java.lang.Exception
- Throws:
java.lang.Exception
getUsers
public static javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> getUsers(long companyId,
javax.naming.ldap.LdapContext ctx,
int maxResults,
java.lang.String baseDN,
java.lang.String userFilter)
throws java.lang.Exception
- Throws:
java.lang.Exception
getUsersDN
public static java.lang.String getUsersDN(long companyId)
throws java.lang.Exception
- Throws:
java.lang.Exception
hasUser
public static boolean hasUser(long companyId,
java.lang.String screenName)
throws java.lang.Exception
- Throws:
java.lang.Exception
importFromLDAP
public static void importFromLDAP()
throws java.lang.Exception
- Throws:
java.lang.Exception
importFromLDAP
public static void importFromLDAP(long companyId)
throws java.lang.Exception
- Throws:
java.lang.Exception
importLDAPGroup
public static com.liferay.portal.model.UserGroup importLDAPGroup(long companyId,
javax.naming.ldap.LdapContext ctx,
javax.naming.directory.Attributes attrs,
boolean importGroupMembership)
throws java.lang.Exception
- Throws:
java.lang.Exception
importLDAPUser
public static com.liferay.portal.model.User importLDAPUser(long companyId,
javax.naming.ldap.LdapContext ctx,
javax.naming.directory.Attributes attrs,
java.lang.String password,
boolean importGroupMembership)
throws java.lang.Exception
- Throws:
java.lang.Exception
isAuthEnabled
public static boolean isAuthEnabled(long companyId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
isExportEnabled
public static boolean isExportEnabled(long companyId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
isImportEnabled
public static boolean isImportEnabled(long companyId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
isImportOnStartup
public static boolean isImportOnStartup(long companyId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
isNtlmEnabled
public static boolean isNtlmEnabled(long companyId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
isPasswordPolicyEnabled
public static boolean isPasswordPolicyEnabled(long companyId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
isSiteMinderEnabled
public static boolean isSiteMinderEnabled(long companyId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException