com.wewebu.ow.server.util.ldap
Class OwADSchemaInterpreter

java.lang.Object
  extended by com.wewebu.ow.server.util.ldap.OwBasicLdapSchemaInterpreter
      extended by com.wewebu.ow.server.util.ldap.OwADSchemaInterpreter
All Implemented Interfaces:
OwLdapSchemaInterpreter

public class OwADSchemaInterpreter
extends OwBasicLdapSchemaInterpreter

Microsoft's Active Directory schema LDAP interpreter.

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

Field Summary
 
Fields inherited from class com.wewebu.ow.server.util.ldap.OwBasicLdapSchemaInterpreter
DISTINGUISHED_NAME, GROUP_REFERENCE_ATTRIBUTE_PROPERTY, GROUPS_DIRECTORY_PROPERTY, GROUPS_OBJECT_CLASS_PROPERTY, LDAP_COUNT_LIMIT_PROPERTY, LOGIN_QUERY_NAME, NAME_LONGNAME_PROPERTY, NAME_MEMBER_OF_PROPERTY, NAME_OBJECTGUID_PROPERTY, NAME_SHORTNAME_PROPERTY, USER_DISPLAY_NAME_PROPERTY, USER_GROUP_REFERENCE_PROPERTY
 
Constructor Summary
OwADSchemaInterpreter()
           
 
Method Summary
 OwObjectCollection findGroupsMatching(OwLdapConnection connection, String pattern)
          Search for groups that match the pattern.
 OwObjectCollection findUserMatching(OwLdapConnection connection, String pattern)
           
 Collection<String> getAllShortGroupNames(OwLdapConnection connection_p)
          Reads all groups from the LDAP (e.g.
protected  String getDisplayNameAttName(OwLdapConnection connection_p)
           
protected  String getObjectIdAttribute(OwLdapConnection connection_p)
           
 String getRecordId(String dname, OwLdapConnection connection)
           
 Collection<String> getShortGroupNames(OwLdapConnection connection_p)
          Returns the group names of the user.
 String getUserId(OwLdapConnection connection_p)
          Returns a unique ID of the user
protected  String getUserLoginAttribute(OwLdapConnection connection_p)
           
 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
 
Methods inherited from class com.wewebu.ow.server.util.ldap.OwBasicLdapSchemaInterpreter
findDistinguishedNameAnonymously, findUserByDNAnonymously, findUserByIdAnonymously, findUserByLoginAnonymously, getUserDisplayName, getUserDisplayName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwADSchemaInterpreter

public OwADSchemaInterpreter()
Method Detail

getAllShortGroupNames

public Collection<String> getAllShortGroupNames(OwLdapConnection connection_p)
                                         throws OwAuthenticationException,
                                                OwConfigurationException,
                                                OwInvalidOperationException
Description copied from interface: OwLdapSchemaInterpreter
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

public Collection<String> getShortGroupNames(OwLdapConnection connection_p)
                                      throws OwAuthenticationException,
                                             OwConfigurationException,
                                             OwInvalidOperationException
Description copied from interface: OwLdapSchemaInterpreter
Returns the group names of the user.

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

getDisplayNameAttName

protected String getDisplayNameAttName(OwLdapConnection connection_p)
Specified by:
getDisplayNameAttName in class OwBasicLdapSchemaInterpreter

getUserShortName

public String getUserShortName(OwLdapConnection connection_p)
                        throws OwAuthenticationException,
                               OwConfigurationException,
                               OwInvalidOperationException
Description copied from interface: OwLdapSchemaInterpreter
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.
OwConfigurationException - possible cause: the LDAP connector is not set up correctly in the bootstrap.xml (Authentication node)
OwInvalidOperationException - thrown when the "name" attribute cannot be resolved.

getUserLongName

public String getUserLongName(OwLdapConnection connection_p)
                       throws OwAuthenticationException,
                              OwConfigurationException,
                              OwInvalidOperationException
Description copied from interface: OwLdapSchemaInterpreter
Gets the user's long name

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

getUserId

public String getUserId(OwLdapConnection connection_p)
                 throws OwAuthenticationException,
                        OwInvalidOperationException,
                        OwConfigurationException
Description copied from interface: OwLdapSchemaInterpreter
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

public void init(Properties ldapProperties_p,
                 Properties adminLdapProperties_p)
          throws OwConfigurationException
Description copied from interface: OwLdapSchemaInterpreter
Properties initialization method used to make schema specific initializations of the directory properties

Specified by:
init in interface OwLdapSchemaInterpreter
Overrides:
init in class OwBasicLdapSchemaInterpreter
Parameters:
ldapProperties_p - user based properties
adminLdapProperties_p - admin user based properties
Throws:
OwConfigurationException

getObjectIdAttribute

protected String getObjectIdAttribute(OwLdapConnection connection_p)
Specified by:
getObjectIdAttribute in class OwBasicLdapSchemaInterpreter

findUserMatching

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

findGroupsMatching

public OwObjectCollection findGroupsMatching(OwLdapConnection connection,
                                             String pattern)
                                      throws OwException
Description copied from interface: OwLdapSchemaInterpreter
Search for groups that match the pattern.

Returns:
a collection of OwUserInfo representing groups that match the pattern.
Throws:
OwException

getRecordId

public String getRecordId(String dname,
                          OwLdapConnection connection)
                   throws OwException
Specified by:
getRecordId in interface OwLdapSchemaInterpreter
Overrides:
getRecordId in class OwBasicLdapSchemaInterpreter
Returns:
the value of the LDAP attribute that is configured to be used as OWD ID.
Throws:
OwException

getUserLoginAttribute

protected String getUserLoginAttribute(OwLdapConnection connection_p)
Specified by:
getUserLoginAttribute in class OwBasicLdapSchemaInterpreter


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.