Liferay 6.1.2-ce-ga3

com.liferay.portal.security.ldap
Class PortalLDAPUtil

java.lang.Object
  extended by com.liferay.portal.security.ldap.PortalLDAPUtil

public class PortalLDAPUtil
extends Object


Constructor Summary
PortalLDAPUtil()
           
 
Method Summary
static LdapContext getContext(long ldapServerId, long companyId)
           
static LdapContext getContext(long companyId, String providerURL, String principal, String credentials)
           
static Binding getGroup(long ldapServerId, long companyId, String groupName)
           
static Attributes getGroupAttributes(long ldapServerId, long companyId, LdapContext ldapContext, String fullDistinguishedName)
           
static Attributes getGroupAttributes(long ldapServerId, long companyId, LdapContext ldapContext, String fullDistinguishedName, boolean includeReferenceAttributes)
           
static byte[] getGroups(long companyId, LdapContext ldapContext, byte[] cookie, int maxResults, String baseDN, String groupFilter, List<SearchResult> searchResults)
           
static byte[] getGroups(long companyId, LdapContext ldapContext, byte[] cookie, int maxResults, String baseDN, String groupFilter, String[] attributeIds, List<SearchResult> searchResults)
           
static byte[] getGroups(long ldapServerId, long companyId, LdapContext ldapContext, byte[] cookie, int maxResults, List<SearchResult> searchResults)
           
static byte[] getGroups(long ldapServerId, long companyId, LdapContext ldapContext, byte[] cookie, int maxResults, String[] attributeIds, List<SearchResult> searchResults)
           
static String getGroupsDN(long ldapServerId, long companyId)
           
static long getLdapServerId(long companyId, String screenName, String emailAddress)
           
static Attribute getMultivaluedAttribute(long companyId, LdapContext ldapContext, String baseDN, String filter, Attribute attribute)
           
static String getNameInNamespace(long ldapServerId, long companyId, Binding binding)
           
static Binding getUser(long ldapServerId, long companyId, String screenName, String emailAddress)
           
static Attributes getUserAttributes(long ldapServerId, long companyId, LdapContext ldapContext, String fullDistinguishedName)
           
static byte[] getUsers(long companyId, LdapContext ldapContext, byte[] cookie, int maxResults, String baseDN, String userFilter, List<SearchResult> searchResults)
           
static byte[] getUsers(long companyId, LdapContext ldapContext, byte[] cookie, int maxResults, String baseDN, String userFilter, String[] attributeIds, List<SearchResult> searchResults)
           
static byte[] getUsers(long ldapServerId, long companyId, LdapContext ldapContext, byte[] cookie, int maxResults, List<SearchResult> searchResults)
           
static byte[] getUsers(long ldapServerId, long companyId, LdapContext ldapContext, byte[] cookie, int maxResults, String[] attributeIds, List<SearchResult> searchResults)
           
static String getUsersDN(long ldapServerId, long companyId)
           
static boolean hasUser(long ldapServerId, long companyId, String screenName, String emailAddress)
           
static boolean isGroupMember(long ldapServerId, long companyId, String groupDN, String userDN)
           
static boolean isUserGroupMember(long ldapServerId, long companyId, String groupDN, String userDN)
           
static byte[] searchLDAP(long companyId, LdapContext ldapContext, byte[] cookie, int maxResults, String baseDN, String filter, String[] attributeIds, List<SearchResult> searchResults)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalLDAPUtil

public PortalLDAPUtil()
Method Detail

getContext

public static LdapContext getContext(long ldapServerId,
                                     long companyId)
                              throws Exception
Throws:
Exception

getContext

public static LdapContext getContext(long companyId,
                                     String providerURL,
                                     String principal,
                                     String credentials)
                              throws Exception
Throws:
Exception

getGroup

public static Binding getGroup(long ldapServerId,
                               long companyId,
                               String groupName)
                        throws Exception
Throws:
Exception

getGroupAttributes

public static Attributes getGroupAttributes(long ldapServerId,
                                            long companyId,
                                            LdapContext ldapContext,
                                            String fullDistinguishedName)
                                     throws Exception
Throws:
Exception

getGroupAttributes

public static Attributes getGroupAttributes(long ldapServerId,
                                            long companyId,
                                            LdapContext ldapContext,
                                            String fullDistinguishedName,
                                            boolean includeReferenceAttributes)
                                     throws Exception
Throws:
Exception

getGroups

public static byte[] getGroups(long companyId,
                               LdapContext ldapContext,
                               byte[] cookie,
                               int maxResults,
                               String baseDN,
                               String groupFilter,
                               List<SearchResult> searchResults)
                        throws Exception
Throws:
Exception

getGroups

public static byte[] getGroups(long companyId,
                               LdapContext ldapContext,
                               byte[] cookie,
                               int maxResults,
                               String baseDN,
                               String groupFilter,
                               String[] attributeIds,
                               List<SearchResult> searchResults)
                        throws Exception
Throws:
Exception

getGroups

public static byte[] getGroups(long ldapServerId,
                               long companyId,
                               LdapContext ldapContext,
                               byte[] cookie,
                               int maxResults,
                               List<SearchResult> searchResults)
                        throws Exception
Throws:
Exception

getGroups

public static byte[] getGroups(long ldapServerId,
                               long companyId,
                               LdapContext ldapContext,
                               byte[] cookie,
                               int maxResults,
                               String[] attributeIds,
                               List<SearchResult> searchResults)
                        throws Exception
Throws:
Exception

getGroupsDN

public static String getGroupsDN(long ldapServerId,
                                 long companyId)
                          throws Exception
Throws:
Exception

getLdapServerId

public static long getLdapServerId(long companyId,
                                   String screenName,
                                   String emailAddress)
                            throws Exception
Throws:
Exception

getMultivaluedAttribute

public static Attribute getMultivaluedAttribute(long companyId,
                                                LdapContext ldapContext,
                                                String baseDN,
                                                String filter,
                                                Attribute attribute)
                                         throws Exception
Throws:
Exception

getNameInNamespace

public static String getNameInNamespace(long ldapServerId,
                                        long companyId,
                                        Binding binding)
                                 throws Exception
Throws:
Exception

getUser

public static Binding getUser(long ldapServerId,
                              long companyId,
                              String screenName,
                              String emailAddress)
                       throws Exception
Throws:
Exception

getUserAttributes

public static Attributes getUserAttributes(long ldapServerId,
                                           long companyId,
                                           LdapContext ldapContext,
                                           String fullDistinguishedName)
                                    throws Exception
Throws:
Exception

getUsers

public static byte[] getUsers(long companyId,
                              LdapContext ldapContext,
                              byte[] cookie,
                              int maxResults,
                              String baseDN,
                              String userFilter,
                              List<SearchResult> searchResults)
                       throws Exception
Throws:
Exception

getUsers

public static byte[] getUsers(long companyId,
                              LdapContext ldapContext,
                              byte[] cookie,
                              int maxResults,
                              String baseDN,
                              String userFilter,
                              String[] attributeIds,
                              List<SearchResult> searchResults)
                       throws Exception
Throws:
Exception

getUsers

public static byte[] getUsers(long ldapServerId,
                              long companyId,
                              LdapContext ldapContext,
                              byte[] cookie,
                              int maxResults,
                              List<SearchResult> searchResults)
                       throws Exception
Throws:
Exception

getUsers

public static byte[] getUsers(long ldapServerId,
                              long companyId,
                              LdapContext ldapContext,
                              byte[] cookie,
                              int maxResults,
                              String[] attributeIds,
                              List<SearchResult> searchResults)
                       throws Exception
Throws:
Exception

getUsersDN

public static String getUsersDN(long ldapServerId,
                                long companyId)
                         throws Exception
Throws:
Exception

hasUser

public static boolean hasUser(long ldapServerId,
                              long companyId,
                              String screenName,
                              String emailAddress)
                       throws Exception
Throws:
Exception

isGroupMember

public static boolean isGroupMember(long ldapServerId,
                                    long companyId,
                                    String groupDN,
                                    String userDN)
                             throws Exception
Throws:
Exception

isUserGroupMember

public static boolean isUserGroupMember(long ldapServerId,
                                        long companyId,
                                        String groupDN,
                                        String userDN)
                                 throws Exception
Throws:
Exception

searchLDAP

public static byte[] searchLDAP(long companyId,
                                LdapContext ldapContext,
                                byte[] cookie,
                                int maxResults,
                                String baseDN,
                                String filter,
                                String[] attributeIds,
                                List<SearchResult> searchResults)
                         throws Exception
Throws:
Exception

Liferay 6.1.2-ce-ga3