ome.api
Interface ILdap

All Superinterfaces:
ServiceInterface
All Known Implementing Classes:
LdapImpl

public interface ILdap
extends ServiceInterface

Administration interface providing access to admin-only functionality as well as JMX-based server access and selected user functions. Most methods require membership in privileged groups. Methods which return Experimenter or ExperimenterGroup instances fetch and load all related instances of ExperimenterGroup or Experimenter, respectively.

Since:
OME3.0
Version:
3.0 (Internal version: $Revision: 1552 $ $Date: 2007-05-23 09:43:33 +0100 (Wed, 23 May 2007) $)
Author:

Josh Moore      josh.moore@gmx.de

Method Summary
 String findDN(String username)
          Searchs unique Distinguished Name - String in LDAP for Common Name equals username.
 ome.model.meta.Experimenter findExperimenter(String username)
          Searchs Experimenter by unique Distinguished Name - String in LDAP for Common Name equals username.
 boolean getSetting()
          Gets config value from properties.
 List<ome.model.meta.Experimenter> searchAll()
          Searchs all Experimenter list on LDAP for attribute objectClass = person.
 List<ome.model.meta.Experimenter> searchByAttribute(String dn, String attribute, String value)
          Searchs all Experimenter in LDAP for specyfied attribute
 List<ome.model.meta.Experimenter> searchByAttributes(String dn, String[] attributes, String[] values)
          Searchs all Experimenter in LDAP for specyfied attributes.
 ome.model.meta.Experimenter searchByDN(String userdn)
          Searchs one Experimenter in LDAP for specyfied Distinguished Name - String
 List<String> searchDnInGroups(String attr, String value)
          Searchs Distinguished Name - String in groups
 void setDN(Long experimenterID, String dn)
          Searchs all Experimenter in LDAP for objectClass = person
 

Method Detail

searchAll

List<ome.model.meta.Experimenter> searchAll()
Searchs all Experimenter list on LDAP for attribute objectClass = person.

Returns:
all Experimenter list.

searchDnInGroups

List<String> searchDnInGroups(String attr,
                              String value)
Searchs Distinguished Name - String in groups

Parameters:
attr - - String name of memeber attribute. Never null or empty.
value - - user's DN which should be set on value for attribute. Never null or empty.
Returns:
List of groups which contains DN.

searchByAttribute

List<ome.model.meta.Experimenter> searchByAttribute(String dn,
                                                    String attribute,
                                                    String value)
Searchs all Experimenter in LDAP for specyfied attribute

Parameters:
dn - - Distinguished Name - String base for search. Never null, should be net.sf.ldaptemplate.support.DistinguishedName#EMPTY_PATH.
attr - - String name of attribute. Never null or empty.
value - - String expected value of attribute. Never null or empty.
Returns:
List of Experimenters.

searchByAttributes

List<ome.model.meta.Experimenter> searchByAttributes(String dn,
                                                     String[] attributes,
                                                     String[] values)
Searchs all Experimenter in LDAP for specyfied attributes. Attributes should be specyfied in String [] and their values should be set in equivalets String [].

Parameters:
dn - - net.sf.ldaptemplate.support.DistinguishedName base for search. Never null, should be net.sf.ldaptemplate.support.DistinguishedName#EMPTY_PATH.
attr - - String [] name of attribute. Never null or empty.
value - - String [] expected value of attribute. Never null or empty.
Returns:
List of Experimenters.

searchByDN

ome.model.meta.Experimenter searchByDN(String userdn)
Searchs one Experimenter in LDAP for specyfied Distinguished Name - String

Parameters:
userdn - unique Distinguished Name - String of user, Never null or empty.
Returns:
an Experimenter.

findDN

String findDN(String username)
Searchs unique Distinguished Name - String 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.

Parameters:
username - Name of the Experimenter equals CommonName.
Returns:
an String Distinguished Name. Never null.
Throws:
ome.conditions.ApiUsageException - if more then one 'cn' under the specified base.

findExperimenter

ome.model.meta.Experimenter findExperimenter(String username)
Searchs Experimenter by unique Distinguished Name - String 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.

Parameters:
username - Name of the Experimenter equals CommonName.
Returns:
an Experimenter. Never null.
Throws:
ome.conditions.ApiUsageException - if more then one 'cn' under the specified base.

setDN

void setDN(Long experimenterID,
           String dn)
Searchs all Experimenter in LDAP for objectClass = person

Parameters:
omeName - Name of the Experimenter
Throws:
ome.conditions.ApiUsageException - if omeName does not exist.

getSetting

boolean getSetting()
Gets config value from properties.

Returns:
boolean


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.