@Transactional(readOnly=true) public class LdapImpl extends AbstractLevel2Service implements ILdap, org.springframework.context.ApplicationContextAware
SecuritySystem, 
Permissions| Modifier and Type | Class and Description | 
|---|---|
| class  | LdapImpl.GroupLoaderData class which stores the state of the  NewUserGroupBeanandNewUserGroupOwnerBeanoperations. | 
iQuery, iUpdate, metadata, queryFactory, sec| Constructor and Description | 
|---|
| LdapImpl(org.springframework.ldap.core.ContextSource ctx,
        org.springframework.ldap.core.LdapOperations ldap,
        Roles roles,
        LdapConfig config,
        RoleProvider roleProvider,
        SqlAction sql) | 
| Modifier and Type | Method and Description | 
|---|---|
| Experimenter | createUser(String username)Creates an  Experimenterbased on the supplied LDAP username. | 
| Experimenter | createUser(String username,
          String password)Creates an  Experimenterbased on the supplied LDAP username. | 
| Experimenter | createUser(String username,
          String password,
          boolean checkPassword)Creates an  Experimenterbased on the supplied LDAP username. | 
| boolean | createUserFromLdap(String username,
                  String password)Deprecated.  | 
| List<Experimenter> | discover()Discovers and lists  Experimenters who are present
 in the remote LDAP server and in the local DB but have theldapproperty set tofalse. | 
| List<ExperimenterGroup> | discoverGroups()Discovers and lists  ExperimenterGroups which are
 present in the remote LDAP server and in the local DB but have theldapproperty set tofalse. | 
| String | findDN(String username)Searches unique Distinguished Name -  Stringin LDAP for
 Common Name equals username. | 
| Experimenter | findExperimenter(String username)Searches Experimenter by unique Distinguished Name -
  Stringin LDAP for Common Name equals username. | 
| ExperimenterGroup | findGroup(String groupname)Looks up a specific  ExperimenterGroupin LDAP
 using the provided group name. | 
| String | findGroupDN(String groupname)Looks up the DN for a group. | 
| Class<? extends ServiceInterface> | getServiceInterface() | 
| boolean | getSetting()Gets config value from properties. | 
| List<Long> | loadLdapGroups(String username,
              org.springframework.ldap.core.DistinguishedName dn)Deprecated.  | 
| String | lookupLdapAuthExperimenter(Long id)Queries the LDAP server and returns the DN for the specified OMERO user
 ID. | 
| List<Map<String,Object>> | lookupLdapAuthExperimenters()Queries the LDAP server and returns the DN for all OMERO users that have
 the  ldapflag enabled. | 
| List<Experimenter> | searchAll()Searches all  Experimenterlist on LDAP for
 attribute objectClass = person. | 
| List<Experimenter> | searchByAttribute(String dns,
                 String attr,
                 String value)Searches all  Experimenterin LDAP for specified
 attribute | 
| List<Experimenter> | searchByAttributes(String dn,
                  String[] attributes,
                  String[] values)Searches all  Experimenterin LDAP for specified
 attributes. | 
| Experimenter | searchByDN(String dns)Searches one  Experimenterin LDAP for specified
 Distinguished Name -String | 
| List<String> | searchDnInGroups(String attr,
                String value)Searches Distinguished Name -  Stringin groups | 
| void | setApplicationContext(org.springframework.context.ApplicationContext arg0)Set the ApplicationContext that this object runs in. | 
| void | setDN(Long experimenterID,
     String dn)Deprecated.  | 
| void | synchronizeLdapUser(String username) | 
| boolean | validatePassword(String dn,
                String password)Validates password for base. | 
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setSecuritySystem, setUpdateServicepublic LdapImpl(org.springframework.ldap.core.ContextSource ctx,
        org.springframework.ldap.core.LdapOperations ldap,
        Roles roles,
        LdapConfig config,
        RoleProvider roleProvider,
        SqlAction sql)
public void setApplicationContext(org.springframework.context.ApplicationContext arg0)
                           throws org.springframework.beans.BeansException
org.springframework.context.ApplicationContextAwareInvoked after population of normal bean properties but before an init callback such
 as InitializingBean.afterPropertiesSet()
 or a custom init-method. Invoked after ResourceLoaderAware.setResourceLoader(org.springframework.core.io.ResourceLoader),
 ApplicationEventPublisherAware.setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher) and
 MessageSourceAware, if applicable.
setApplicationContext in interface org.springframework.context.ApplicationContextAwarearg0 - the ApplicationContext object to be used by this objectorg.springframework.context.ApplicationContextException - in case of context initialization errorsorg.springframework.beans.BeansException - if thrown by application context methodsBeanInitializationExceptionpublic Class<? extends ServiceInterface> getServiceInterface()
getServiceInterface in interface SelfConfigurableServicepublic List<Experimenter> searchAll()
ILdapExperimenter list on LDAP for
 attribute objectClass = person.public List<Experimenter> searchByAttribute(String dns, String attr, String value)
ILdapExperimenter in LDAP for specified
 attributesearchByAttribute in interface ILdapdns - - Distinguished Name - String base for
            search. Never null, should be
            net.sf.ldaptemplate.support.DistinguishedName#EMPTY_PATH
            .value - - String expected value of attribute. Never null or empty.public Experimenter searchByDN(String dns)
ILdapExperimenter in LDAP for specified
 Distinguished Name - StringsearchByDN in interface ILdapdns - unique Distinguished Name - String of user,
            Never null or empty.public String findDN(String username)
ILdapString in LDAP for
 Common Name equals username. Common Name should be unique under the
 specified base. If list of cn's contains more then one DN will return
 exception.public String findGroupDN(String groupname)
ILdapfindGroupDN in interface ILdappublic Experimenter findExperimenter(String username)
ILdapString in LDAP for Common Name equals username. Common
 Name should be unique under the specified base. If list of cn's contains
 more then one DN will return exception.findExperimenter in interface ILdapusername - Name of the Experimenter equals CommonName.public ExperimenterGroup findGroup(String groupname)
ILdapExperimenterGroup in LDAP
 using the provided group name. It is expected that the group name will be
 unique in the searched LDAP base tree. If more than one group with the
 specified name has been found, an exception will be thrown.public List<String> searchDnInGroups(String attr, String value)
ILdapString in groupssearchDnInGroups in interface ILdapattr - - String name of member attribute. Never null or empty.value - - user's DN which should be set on value for attribute. Never
            null or empty.public List<Experimenter> searchByAttributes(String dn, String[] attributes, String[] values)
ILdapExperimenter in LDAP for specified
 attributes. Attributes should be specified in String [] and their values
 should be set in equivalent String [].searchByAttributes in interface ILdapdn - - net.sf.ldaptemplate.support.DistinguishedName base
            for search. Never null, should be
            net.sf.ldaptemplate.support.DistinguishedName#EMPTY_PATH
            .@Transactional(readOnly=false) @Deprecated public void setDN(Long experimenterID, String dn)
ILdapdn column in the password
 table to the supplied string, for the supplied
 Experimenter ID.public boolean getSetting()
ILdapgetSetting in interface ILdappublic void synchronizeLdapUser(String username)
@Deprecated @Transactional(readOnly=false) public boolean createUserFromLdap(String username, String password)
Experimenter based on the supplied LDAP username.
 Doesn't validate the user's password and can be only executed by admin
 users.username - The user's LDAP username.password - The user's LDAP password, not null.@Transactional(readOnly=false) public Experimenter createUser(String username)
Experimenter based on the supplied LDAP username.
 Doesn't validate the user's password and can be only executed by admin
 users.createUser in interface ILdapusername - The user's LDAP username.Experimenter object.public Experimenter createUser(String username, String password)
Experimenter based on the supplied LDAP username.
 Enforces user password validation.username - The user's LDAP username.password - The user's LDAP password, not null.Experimenter object.public Experimenter createUser(String username, String password, boolean checkPassword)
Experimenter based on the supplied LDAP username.
 A boolean flag controls if password checks should be performed.username - The user's LDAP username.password - The user's password.checkPassword - Flag indicating if password check should be performed.Experimenter object.@Deprecated public List<Long> loadLdapGroups(String username, org.springframework.ldap.core.DistinguishedName dn)
public boolean validatePassword(String dn, String password)
public List<Map<String,Object>> lookupLdapAuthExperimenters()
ldap flag enabled.public String lookupLdapAuthExperimenter(Long id)
ldap flag enabled.id - The user ID.public List<Experimenter> discover()
ILdapExperimenters who are present
 in the remote LDAP server and in the local DB but have the
 ldap property set to false.public List<ExperimenterGroup> discoverGroups()
ILdapExperimenterGroups which are
 present in the remote LDAP server and in the local DB but have the
 ldap property set to false.discoverGroups in interface ILdap
                
                
Version: 5.1.4-ice35-b55
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.