com.wewebu.ow.server.util.ldap
Interface OwLdapSchemaInterpreter

All Known Implementing Classes:
OwADSchemaInterpreter, OwBasicLdapSchemaInterpreter, OwStandardSchemaInterpreter

public interface OwLdapSchemaInterpreter

Schema base LDAP strategy interface. Defines OwLdapConnector operations that are LDAP-schema dependent.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
3.1.0.0

Method Summary
 String findDistinguishedNameAnonymously(String user_p, OwLdapConnection connection_p)
          Returns the full distinguished name for the login user to use for authentication later.
 OwObjectCollection findGroupsMatching(OwLdapConnection connection, String pattern)
          Search for groups that match the pattern.
 OwUserInfo findUserByDNAnonymously(String strID_p, OwLdapConnection connection)
          Finds a user by its Distinguished Name.
 OwUserInfo findUserByIdAnonymously(String strID_p, OwLdapConnection connection)
          Finds a user by its ID.
 OwUserInfo findUserByLoginAnonymously(String strID_p, OwLdapConnection connection)
           
 OwObjectCollection findUserMatching(OwLdapConnection connection, String pattern)
           
 Collection<String> getAllShortGroupNames(OwLdapConnection connection_p)
          Reads all groups from the LDAP (e.g.
 String getRecordId(String dname, OwLdapConnection connection)
           
 Collection<String> getShortGroupNames(OwLdapConnection connection_p)
          Returns the group names of the user.
 String getUserDisplayName(OwLdapConnection connection_p)
          Get the user display name, or a null value.
 String getUserDisplayName(String dname, OwLdapConnection connection)
           
 String getUserId(OwLdapConnection connection_p)
          Returns a unique ID of the user
 String getUserLongName(OwLdapConnection connection_p)
          Gets the user's long name
 String getUserShortName(OwLdapConnection connection_p)
          Get the user short name, or a null value.
 void init(Properties ldapProperties_p, Properties adminLdapProperties_p)
          Properties initialization method used to make schema specific initializations of the directory properties
 

Method Detail

findDistinguishedNameAnonymously

String findDistinguishedNameAnonymously(String user_p,
                                        OwLdapConnection connection_p)
                                        throws OwAuthenticationException,
                                               OwConfigurationException
Returns the full distinguished name for the login user to use for authentication later.

Parameters:
user_p - representing the login name for the user being searched
Returns:
String representing the full distinguished name for the login passed to the method
Throws:
OwAuthenticationException - the user that wants to login is not available in the LDAP
OwConfigurationException - possible cause: the LDAP connector is not set up correctly in the bootstrap.xml (Authentication node)

getAllShortGroupNames

Collection<String> getAllShortGroupNames(OwLdapConnection connection_p)
                                         throws OwAuthenticationException,
                                                OwConfigurationException,
                                                OwInvalidOperationException
Reads all groups from the LDAP (e.g. CN=Builtin)

Returns:
List of the group names
Throws:
OwAuthenticationException - LDAP authorization Exception
OwConfigurationException - possible cause: the LDAP connector is not set up correctly in the bootstrap.xml (Authentication node)
OwInvalidOperationException - if the operation could no be performed due to errors during LDAP access

getShortGroupNames

Collection<String> getShortGroupNames(OwLdapConnection connection_p)
                                      throws OwAuthenticationException,
                                             OwConfigurationException,
                                             OwInvalidOperationException
Returns the group names of the user.

Returns:
List of the group names
Throws:
OwAuthenticationException - LDAP authorization Exception
OwInvalidOperationException - if the operation could no be performed due to errors during LDAP access
OwConfigurationException - possible cause: the LDAP connector is not set up correctly in the bootstrap.xml (Authentication node)

getUserDisplayName

String getUserDisplayName(OwLdapConnection connection_p)
                          throws OwAuthenticationException,
                                 OwConfigurationException,
                                 OwInvalidOperationException
Get the user display name, or a null value.

Returns:
the user short name, or a null value.
Throws:
OwAuthenticationException - thrown when the user is not authenticated.
OwInvalidOperationException - thrown when the "displayName" attribute cannot be resolved.
OwConfigurationException - possible cause: the LDAP connector is not set up correctly in the bootstrap.xml (Authentication node)

getUserShortName

String getUserShortName(OwLdapConnection connection_p)
                        throws OwAuthenticationException,
                               OwConfigurationException,
                               OwInvalidOperationException
Get the user short name, or a null value.

Returns:
the user short name, or a null value.
Throws:
OwAuthenticationException - thrown when the user is not authenticated.
OwInvalidOperationException - thrown when the "name" attribute cannot be resolved.
OwConfigurationException - possible cause: the LDAP connector is not set up correctly in the bootstrap.xml (Authentication node)

getUserLongName

String getUserLongName(OwLdapConnection connection_p)
                       throws OwAuthenticationException,
                              OwConfigurationException,
                              OwInvalidOperationException
Gets the user's long name

Returns:
a String
Throws:
OwAuthenticationException - LDAP authorization Exception
OwInvalidOperationException - invalid LDAP operation
OwConfigurationException - possible cause: the LDAP connector is not set up correctly in the bootstrap.xml (Authentication node)

getUserId

String getUserId(OwLdapConnection connection_p)
                 throws OwAuthenticationException,
                        OwInvalidOperationException,
                        OwConfigurationException
Returns a unique ID of the user

Returns:
a String
Throws:
OwAuthenticationException - LDAP authorization Exception
OwInvalidOperationException - invalid LDAP operation
OwConfigurationException - possible cause: the LDAP connector is not set up correctly in the bootstrap.xml (Authentication node)

init

void init(Properties ldapProperties_p,
          Properties adminLdapProperties_p)
          throws OwConfigurationException
Properties initialization method used to make schema specific initializations of the directory properties

Parameters:
ldapProperties_p - user based properties
adminLdapProperties_p - admin user based properties
Throws:
OwConfigurationException

findUserByDNAnonymously

OwUserInfo findUserByDNAnonymously(String strID_p,
                                   OwLdapConnection connection)
                                   throws OwException
Finds a user by its Distinguished Name.

Parameters:
strID_p -
connection -
Returns:
user with the given DN.
Throws:
OwException - Throws OwObjectNotFoundException if no user was found.

findUserByIdAnonymously

OwUserInfo findUserByIdAnonymously(String strID_p,
                                   OwLdapConnection connection)
                                   throws OwException
Finds a user by its ID.

Parameters:
strID_p -
connection -
Returns:
user with the given DN.
Throws:
OwException - Throws OwObjectNotFoundException if no user was found.

findUserMatching

OwObjectCollection findUserMatching(OwLdapConnection connection,
                                    String pattern)
                                    throws OwException
Parameters:
connection -
pattern -
Returns:
A list of user names.
Throws:
OwException

findGroupsMatching

OwObjectCollection findGroupsMatching(OwLdapConnection connection,
                                      String pattern)
                                      throws OwException
Search for groups that match the pattern.

Parameters:
connection -
pattern -
Returns:
a collection of OwUserInfo representing groups that match the pattern.
Throws:
OwException
Since:
4.1.1.0

getUserDisplayName

String getUserDisplayName(String dname,
                          OwLdapConnection connection)
                          throws OwException
Parameters:
dname - User DN.
connection -
Returns:
the display name of the given user.
Throws:
OwException

getRecordId

String getRecordId(String dname,
                   OwLdapConnection connection)
                   throws OwException
Parameters:
dname -
connection -
Returns:
the value of the LDAP attribute that is configured to be used as OWD ID.
Throws:
OwException

findUserByLoginAnonymously

OwUserInfo findUserByLoginAnonymously(String strID_p,
                                      OwLdapConnection connection)
                                      throws OwException
Throws:
OwException


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.