|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectome.logic.AbstractLevel2Service
ome.logic.LdapImpl
@Transactional(readOnly=true) public class LdapImpl
Provides methods for administering user accounts, passwords, as well as methods which require special privileges. Developer note: As can be expected, to perform these privileged the Admin service has access to several resources that should not be generally used while developing services. Misuse could circumvent security or auditing.
SecuritySystem
,
Permissions
Field Summary |
---|
Fields inherited from class ome.logic.AbstractLevel2Service |
---|
iQuery, iUpdate, metadata, queryFactory, sec |
Constructor Summary | |
---|---|
LdapImpl(org.springframework.ldap.core.ContextSource ctx,
org.springframework.ldap.core.LdapOperations ldap,
Roles roles,
LdapConfig config,
RoleProvider roleProvider,
ome.util.SqlAction sql)
|
Method Summary | |
---|---|
boolean |
createUserFromLdap(String username,
String password)
Gets user from LDAP for checking him by requirements and setting his details on DB |
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. |
Class<? extends ServiceInterface> |
getServiceInterface()
|
boolean |
getSetting()
Gets config value from properties. |
List<Long> |
loadLdapGroups(String username,
org.springframework.ldap.core.DistinguishedName dn)
|
String |
lookupLdapAuthExperimenter(Long id)
|
List<Map<String,Object>> |
lookupLdapAuthExperimenters()
|
List<ome.model.meta.Experimenter> |
searchAll()
Searchs all Experimenter list on LDAP for
attribute objectClass = person. |
List<ome.model.meta.Experimenter> |
searchByAttribute(String dns,
String attr,
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 dns)
Searchs one Experimenter in LDAP for specyfied
Distinguished Name - String |
List<String> |
searchDnInGroups(String attr,
String value)
Searchs Distinguished Name - String in groups |
void |
setApplicationContext(org.springframework.context.ApplicationContext arg0)
|
void |
setDN(Long experimenterID,
String dn)
Searchs all Experimenter in LDAP for objectClass =
person |
void |
synchronizeLdapUser(String username)
|
boolean |
validatePassword(String dn,
String password)
Validates password for base. |
Methods inherited from class ome.logic.AbstractLevel2Service |
---|
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setSecuritySystem, setUpdateService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LdapImpl(org.springframework.ldap.core.ContextSource ctx, org.springframework.ldap.core.LdapOperations ldap, Roles roles, LdapConfig config, RoleProvider roleProvider, ome.util.SqlAction sql)
Method Detail |
---|
public void setApplicationContext(org.springframework.context.ApplicationContext arg0) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public Class<? extends ServiceInterface> getServiceInterface()
getServiceInterface
in interface SelfConfigurableService
public List<ome.model.meta.Experimenter> searchAll()
ILdap
Experimenter
list on LDAP for
attribute objectClass = person.
searchAll
in interface ILdap
public List<ome.model.meta.Experimenter> searchByAttribute(String dns, String attr, String value)
ILdap
Experimenter
in LDAP for specyfied
attribute
searchByAttribute
in interface ILdap
dns
- -
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 ome.model.meta.Experimenter searchByDN(String dns)
ILdap
Experimenter
in LDAP for specyfied
Distinguished Name - String
searchByDN
in interface ILdap
dns
- unique Distinguished Name - String
of user, Never null or empty.
public String findDN(String username)
ILdap
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.
findDN
in interface ILdap
username
- Name of the Experimenter equals CommonName.
public ome.model.meta.Experimenter findExperimenter(String username)
ILdap
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.
findExperimenter
in interface ILdap
username
- Name of the Experimenter equals CommonName.
public List<String> searchDnInGroups(String attr, String value)
ILdap
String
in groups
searchDnInGroups
in interface ILdap
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.
public List<ome.model.meta.Experimenter> searchByAttributes(String dn, String[] attributes, String[] values)
ILdap
Experimenter
in LDAP for specyfied
attributes. Attributes should be specyfied in String [] and their values
should be set in equivalets String [].
searchByAttributes
in interface ILdap
dn
- -
net.sf.ldaptemplate.support.DistinguishedName
base for
search. Never null, should be
net.sf.ldaptemplate.support.DistinguishedName#EMPTY_PATH
.
@Transactional(readOnly=false) public void setDN(Long experimenterID, String dn)
ILdap
Experimenter
in LDAP for objectClass =
person
setDN
in interface ILdap
public boolean getSetting()
ILdap
getSetting
in interface ILdap
public void synchronizeLdapUser(String username)
public boolean createUserFromLdap(String username, String password)
ServiceFactory
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()
public String lookupLdapAuthExperimenter(Long id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: 4.3.3-00d1137e-b2894
Copyright © 2009 The University of Dundee. All Rights Reserved.