|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.bnl.gums.persistence.PersistenceFactory gov.bnl.gums.persistence.LDAPPersistenceFactory
public class LDAPPersistenceFactory
Constructor Summary | |
---|---|
LDAPPersistenceFactory()
Create a new ldap persistence factory. |
|
LDAPPersistenceFactory(Configuration configuration)
Create a new ldap persistence factory with a configuration. |
|
LDAPPersistenceFactory(Configuration configuration,
String name)
Create a new ldap persistence factory with a configuration and a name. |
Method Summary | |
---|---|
void |
addMapEntry(String userDN,
String account,
String mapName,
String mapDN)
Adds a userDN -> account mapping entry in the "map=mapName" LDAP map. |
void |
addToSecondaryGroup(String account,
String groupname)
Adds the account to the given secondary group. |
void |
addUserGroupEntry(String userDN,
String groupName,
String groupDN)
Adds a certificate DN to the group "group=groupName". |
void |
changeEmail(String account,
String email)
Changes the email for the given account. |
void |
changeGroupID(String account,
String groupname)
Changes the primary gid for the given account. |
PersistenceFactory |
clone(Configuration configuration)
Create a clone of itself |
void |
createAccountInMap(String account,
String mapName,
String mapDN)
Creates an account in the map "map=mapName", without having a userDN: this is useful for pools of accounts. |
protected DirContext |
createGroupContext()
|
protected DirContext |
createGumsContext()
Create a new LDAP DirContext based on the configuration. |
void |
createMap(String mapName,
String mapDN)
Creates a new "map=mapName" entry in the LDAP GUMS tree. |
protected DirContext |
createPeopleContext()
|
void |
createUserGroup(String groupName,
String groupDN)
Creates a new "group=groupName" entry in the LDAP GUMS tree. |
boolean |
destroyAccountInMap(String account,
String mapName,
String mapDN)
Deletes the account in map. |
void |
destroyMap(String mapName,
String mapDN)
Deletes the "map=mapName" map in the LDAP GUMS tree. |
String |
getAccountField()
|
String |
getCaCertFile()
|
String |
getEmailField()
|
String |
getGidNumberField()
|
String |
getGroupCnField()
|
String |
getGroupField()
|
String |
getGroupIdField()
|
String |
getGroupTree()
|
String |
getGumsObject()
|
String |
getGumsTree()
|
String |
getMemberAccountField()
|
String |
getMemberUidField()
|
String |
getPeopleTree()
|
String |
getTrustStorePassword()
|
String |
getType()
|
static String |
getTypeStatic()
|
String |
getUidField()
|
boolean |
isSynch()
This property forces the update for account pools at every access. |
boolean |
isSynchGroups()
|
void |
releaseContext(DirContext context)
Returns the LDAP DirContext to the pool, so that it can be reused. |
boolean |
removeMapEntry(String userDN,
String mapName,
String mapDN)
Removes a userDN -> acount mapping entry in the "map=mapName LDAP map. |
void |
removeUserGroupEntry(String userDN,
String groupName,
String groupDN)
Removes a certificate DN to the group "group=groupName". |
AccountPoolMapperDB |
retrieveAccountPoolMapperDB(String nameAndGroups)
|
ConfigurationDB |
retrieveConfigurationDB()
|
String |
retrieveEmail(String uid)
|
DirContext |
retrieveGroupContext()
|
DirContext |
retrieveGumsDirContext()
|
ManualAccountMapperDB |
retrieveManualAccountMapperDB(String name)
|
ManualUserGroupDB |
retrieveManualUserGroupDB(String name)
|
DirContext |
retrievePeopleContext()
|
UserGroupDB |
retrieveUserGroupDB(String name)
|
void |
setAccountField(String accountField)
|
void |
setCaCertFile(String caCertFile)
|
void |
setEmailField(String emailField)
|
void |
setGidNumberField(String gidNumberField)
|
void |
setGroupCnField(String groupCnField)
|
void |
setGroupField(String groupField)
|
void |
setGroupIdField(String groupIdField)
|
void |
setGroupTree(String groupTree)
|
void |
setGumsTree(String gumsTree)
|
void |
setMemberAccountField(String memberAccountField)
|
void |
setMemberUidField(String memberUidField)
|
void |
setPeopleTree(String peopleTree)
|
void |
setProperties(Properties properties)
Sets the list of properties to be used to connect to LDAP, that is to create the JNDI context. |
void |
setSynch(boolean synch)
This property forces the update for account pools at every access. |
void |
setSynchGroups(boolean synchGroups)
|
void |
setTrustStorePassword(String trustStorePassword)
|
void |
setUidField(String uidField)
|
String |
toXML()
Get XML representation of this object for writing to gums.config |
Methods inherited from class gov.bnl.gums.persistence.PersistenceFactory |
---|
getConfiguration, getDescription, getName, getProperties, getStoreConfig, setConfiguration, setDescription, setName, setStoreConfig |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LDAPPersistenceFactory()
public LDAPPersistenceFactory(Configuration configuration)
configuration
- public LDAPPersistenceFactory(Configuration configuration, String name)
configuration
- name
- Method Detail |
---|
public static String getTypeStatic()
public void addMapEntry(String userDN, String account, String mapName, String mapDN)
userDN
- the certificate DN of the user (i.e. "/DC=org/DC=doegrids/OU=People/CN=John Smith")account
- the account to whith to map the DN (i.e. "carcassi")mapName
- the name of the map (i.e. "usatlasSpecialMap")mapDN
- the map DN (i.e. "map=usatlasSpecialMap, ou=GUMS")public void addToSecondaryGroup(String account, String groupname)
account
- the account to add to the secondary group (i.e. "carcassi")groupname
- the secondary group name (i.e. "usatlas")public void addUserGroupEntry(String userDN, String groupName, String groupDN)
userDN
- the certificate DN of the user (i.e. "/DC=org/DC=doegrids/OU=People/CN=John Smith")groupName
- the name of the group (i.e. "usatlas")groupDN
- the group DN (i.e. "group=usatlas, ou=GUMS")public void changeEmail(String account, String email)
account
- the account to change the primary group (i.e. "carcassi")email
- public void changeGroupID(String account, String groupname)
account
- the account to change the primary group (i.e. "carcassi")groupname
- the primary group name (i.e. "usatlas")public PersistenceFactory clone(Configuration configuration)
PersistenceFactory
clone
in class PersistenceFactory
public void createAccountInMap(String account, String mapName, String mapDN)
account
- the account to whith to map the DN (i.e. "grid0001")mapName
- the name of the map (i.e. "usatlasSpecialMap")mapDN
- the map DN (i.e. "map=usatlasSpecialMap, ou=GUMS")public void createMap(String mapName, String mapDN)
mapName
- the name of the map (i.e. "usatlasSpecialMap")mapDN
- the map DN (i.e. "map=usatlasSpecialMap, ou=GUMS")public void createUserGroup(String groupName, String groupDN)
groupName
- the name of the group (i.e. "usatlas")groupDN
- the group DN (i.e. "group=usatlas, ou=GUMS")public boolean destroyAccountInMap(String account, String mapName, String mapDN)
mapName
- the name of the map (i.e. "usatlasSpecialMap")mapDN
- the map DN (i.e. "map=usatlasSpecialMap, ou=GUMS")public void destroyMap(String mapName, String mapDN)
mapName
- the name of the map (i.e. "usatlasSpecialMap")mapDN
- the map DN (i.e. "map=usatlasSpecialMap, ou=GUMS")public String getAccountField()
public String getCaCertFile()
public String getEmailField()
public String getGidNumberField()
public String getGroupCnField()
public String getGroupField()
public String getGroupIdField()
public String getGroupTree()
public String getGumsObject()
public String getGumsTree()
public String getMemberAccountField()
public String getMemberUidField()
public String getPeopleTree()
public String getTrustStorePassword()
public String getType()
getType
in class PersistenceFactory
public String getUidField()
public boolean isSynch()
public boolean isSynchGroups()
public void releaseContext(DirContext context)
context
- the LDAP context to be returnedpublic boolean removeMapEntry(String userDN, String mapName, String mapDN)
userDN
- the certificate DN of the user (i.e. "/DC=org/DC=doegrids/OU=People/CN=Gabriele Carcassi 12345")mapName
- the name of the map (i.e. "usatlasSpecialMap")mapDN
- the map DN (i.e. "map=usatlasSpecialMap")
public void removeUserGroupEntry(String userDN, String groupName, String groupDN)
userDN
- the certificate DN of the user (i.e. "/DC=org/DC=doegrids/OU=People/CN=Gabriele Carcassi 12345")groupName
- the name of the group (i.e. "usatlas")groupDN
- the group DN (i.e. "group=usatlas")public AccountPoolMapperDB retrieveAccountPoolMapperDB(String nameAndGroups)
retrieveAccountPoolMapperDB
in class PersistenceFactory
public ConfigurationDB retrieveConfigurationDB()
retrieveConfigurationDB
in class PersistenceFactory
public String retrieveEmail(String uid)
public DirContext retrieveGroupContext()
public DirContext retrieveGumsDirContext()
public ManualAccountMapperDB retrieveManualAccountMapperDB(String name)
retrieveManualAccountMapperDB
in class PersistenceFactory
public ManualUserGroupDB retrieveManualUserGroupDB(String name)
retrieveManualUserGroupDB
in class PersistenceFactory
public DirContext retrievePeopleContext()
public UserGroupDB retrieveUserGroupDB(String name)
retrieveUserGroupDB
in class PersistenceFactory
public void setAccountField(String accountField)
public void setCaCertFile(String caCertFile)
public void setEmailField(String emailField)
public void setGidNumberField(String gidNumberField)
public void setGroupCnField(String groupCnField)
public void setGroupField(String groupField)
public void setGroupIdField(String groupIdField)
public void setGroupTree(String groupTree)
public void setGumsTree(String gumsTree)
public void setMemberAccountField(String memberAccountField)
public void setMemberUidField(String memberUidField)
public void setPeopleTree(String peopleTree)
public void setProperties(Properties properties)
setProperties
in class PersistenceFactory
properties
- a set of JNDI propertiespublic void setSynch(boolean synch)
synchGroups
- if information is updated every time accounts from the pool are returned.public void setSynchGroups(boolean synchGroups)
public void setTrustStorePassword(String trustStorePassword)
public void setUidField(String uidField)
public String toXML()
PersistenceFactory
toXML
in class PersistenceFactory
protected DirContext createGroupContext()
protected DirContext createGumsContext()
protected DirContext createPeopleContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |