|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao
org.apache.jetspeed.security.spi.impl.ldap.LdapPrincipalDaoImpl
org.apache.jetspeed.security.spi.impl.ldap.LdapUserPrincipalDaoImpl
public class LdapUserPrincipalDaoImpl
| Field Summary |
|---|
| Fields inherited from class org.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao |
|---|
ctx |
| Constructor Summary | |
|---|---|
LdapUserPrincipalDaoImpl()
Default constructor. |
|
LdapUserPrincipalDaoImpl(LdapBindingConfig ldapConfig)
Initializes the dao. |
|
| Method Summary | |
|---|---|
void |
addGroup(java.lang.String userPrincipalUid,
java.lang.String groupPrincipalUid)
Add a user to a group. |
void |
addRole(java.lang.String userPrincipalUid,
java.lang.String rolePrincipalUid)
Add a user to a group. |
void |
addRoleToGroup(java.lang.String groupPrincipalUid,
java.lang.String rolePrincipalUid)
Add a role to a group. |
protected javax.naming.directory.Attributes |
defineLdapAttributes(java.lang.String principalUid)
A template method for defining the attributes for a particular LDAP class. |
protected java.lang.String[] |
getAttributes()
|
protected java.lang.String |
getDnSuffix()
Builds the dn suffix. |
protected java.lang.String |
getEntryPrefix()
A template method that returns the LDAP entry prefix of the concrete DAO. |
java.lang.String[] |
getGroupUidsForUser(java.lang.String userPrincipalUid)
Return the list of group IDs for a particular user |
protected java.lang.String[] |
getObjectClasses()
|
java.lang.String[] |
getRolesForGroup(java.lang.String groupPrincipalUid)
Return an array of the roles that belong to a group. |
java.lang.String[] |
getRoleUidsForUser(java.lang.String userPrincipalUid)
Returns the role IDs for a particular user Looks up the user, and extracts the rolemembership attr (ex : uniquemember) |
protected java.lang.String |
getSearchSuffix()
A template method that returns the LDAP entry prefix of the concrete DAO. |
protected java.lang.String |
getUidAttributeForPrincipal()
Builds the dn suffix. |
java.lang.String[] |
getUserUidsForGroup(java.lang.String groupPrincipalUid)
Return an array of the user principal UIDS that belong to a group. |
java.lang.String[] |
getUserUidsForRole(java.lang.String rolePrincipalUid)
Return an array of the user principal UIDS that belong to a group. |
protected java.security.Principal |
makePrincipal(java.lang.String principalUid)
Creates a GroupPrincipal object. |
void |
removeGroup(java.lang.String userPrincipalUid,
java.lang.String groupPrincipalUid)
Remove a user from a group. |
void |
removeRole(java.lang.String userPrincipalUid,
java.lang.String rolePrincipalUid)
Remove a user from a group. |
void |
removeRoleFromGroup(java.lang.String groupPrincipalUid,
java.lang.String rolePrincipalUid)
Remove a role from a group. |
| Methods inherited from class org.apache.jetspeed.security.spi.impl.ldap.LdapPrincipalDaoImpl |
|---|
convertUidToLdapAcceptableName, create, delete, find, getAttribute, getGroupDN, getGroupDN, getRoleDN, getRoleDN, getSearchDomain, getUserDN, getUserDN, parseAttr |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.jetspeed.security.spi.impl.ldap.LdapPrincipalDao |
|---|
convertUidToLdapAcceptableName, create, delete, find |
| Methods inherited from interface org.apache.jetspeed.security.spi.impl.ldap.LdapReadOnlyPrincipalDao |
|---|
lookupByUid |
| Constructor Detail |
|---|
public LdapUserPrincipalDaoImpl()
throws SecurityException
Default constructor.
SecurityException - A SecurityException.
public LdapUserPrincipalDaoImpl(LdapBindingConfig ldapConfig)
throws SecurityException
Initializes the dao.
ldapConfig - Holds the ldap binding configuration.
SecurityException - A SecurityException.| Method Detail |
|---|
public void addGroup(java.lang.String userPrincipalUid,
java.lang.String groupPrincipalUid)
throws SecurityException
LdapUserPrincipalDaoAdd a user to a group.
addGroup in interface LdapUserPrincipalDaouserPrincipalUid - The user principal.groupPrincipalUid - The group principal.
SecurityException - A SecurityException.LdapUserPrincipalDao.addGroup(java.lang.String,
java.lang.String)
public void removeGroup(java.lang.String userPrincipalUid,
java.lang.String groupPrincipalUid)
throws SecurityException
LdapUserPrincipalDaoRemove a user from a group.
removeGroup in interface LdapUserPrincipalDaouserPrincipalUid - The user principal.groupPrincipalUid - The group principal.
SecurityException - A SecurityException.LdapUserPrincipalDao.removeGroup(java.lang.String,
java.lang.String)
public void addRole(java.lang.String userPrincipalUid,
java.lang.String rolePrincipalUid)
throws SecurityException
LdapUserPrincipalDaoAdd a user to a group.
addRole in interface LdapUserPrincipalDaouserPrincipalUid - The user principal.rolePrincipalUid - The role principal.
SecurityException - A SecurityException.LdapUserPrincipalDao.addGroup(java.lang.String,
java.lang.String)
public void removeRole(java.lang.String userPrincipalUid,
java.lang.String rolePrincipalUid)
throws SecurityException
LdapUserPrincipalDaoRemove a user from a group.
removeRole in interface LdapUserPrincipalDaouserPrincipalUid - The user principal.rolePrincipalUid - The role principal.
SecurityException - A SecurityException.LdapUserPrincipalDao.removeGroup(java.lang.String,
java.lang.String)protected javax.naming.directory.Attributes defineLdapAttributes(java.lang.String principalUid)
A template method for defining the attributes for a particular LDAP class.
defineLdapAttributes in class LdapPrincipalDaoImplprincipalUid - The principal uid.
protected java.security.Principal makePrincipal(java.lang.String principalUid)
Creates a GroupPrincipal object.
makePrincipal in class LdapPrincipalDaoImplprincipalUid - The principal uid.
public void addRoleToGroup(java.lang.String groupPrincipalUid,
java.lang.String rolePrincipalUid)
throws SecurityException
LdapUserPrincipalDaoAdd a role to a group.
addRoleToGroup in interface LdapUserPrincipalDaogroupPrincipalUid - The group principal.rolePrincipalUid - The role principal.
SecurityException - A SecurityException.LdapUserPrincipalDao.addGroup(java.lang.String,
java.lang.String)
public void removeRoleFromGroup(java.lang.String groupPrincipalUid,
java.lang.String rolePrincipalUid)
throws SecurityException
LdapUserPrincipalDaoRemove a role from a group.
removeRoleFromGroup in interface LdapUserPrincipalDaogroupPrincipalUid - The group principal.rolePrincipalUid - The role principal.
SecurityException - A SecurityException.LdapUserPrincipalDao.removeGroup(java.lang.String,
java.lang.String)
public java.lang.String[] getGroupUidsForUser(java.lang.String userPrincipalUid)
throws SecurityException
getGroupUidsForUser in interface LdapUserPrincipalDaouserPrincipalUid -
SecurityException
public java.lang.String[] getRolesForGroup(java.lang.String groupPrincipalUid)
throws SecurityException
Return an array of the roles that belong to a group.
getRolesForGroup in interface LdapUserPrincipalDaogroupPrincipalUid - The group principal uid.
SecurityException - A SecurityException.
public java.lang.String[] getRoleUidsForUser(java.lang.String userPrincipalUid)
throws SecurityException
getRoleUidsForUser in interface LdapUserPrincipalDaouserPrincipalUid -
SecurityException
public java.lang.String[] getUserUidsForGroup(java.lang.String groupPrincipalUid)
throws SecurityException
Return an array of the user principal UIDS that belong to a group.
getUserUidsForGroup in interface LdapUserPrincipalDaogroupPrincipalUid - The group principal uid.
SecurityException - A SecurityException.
public java.lang.String[] getUserUidsForRole(java.lang.String rolePrincipalUid)
throws SecurityException
Return an array of the user principal UIDS that belong to a group.
getUserUidsForRole in interface LdapUserPrincipalDaogroupPrincipalUid - The group principal uid.
SecurityException - A SecurityException.protected java.lang.String[] getObjectClasses()
getObjectClasses in class AbstractLdapDaoprotected java.lang.String[] getAttributes()
getAttributes in class AbstractLdapDaoprotected java.lang.String getUidAttributeForPrincipal()
LdapPrincipalDaoImplBuilds the dn suffix.
getUidAttributeForPrincipal in class LdapPrincipalDaoImplprotected java.lang.String getEntryPrefix()
AbstractLdapDaoA template method that returns the LDAP entry prefix of the concrete DAO.
TODO : this should be in spring config
getEntryPrefix in class AbstractLdapDaoprotected java.lang.String getSearchSuffix()
AbstractLdapDaoA template method that returns the LDAP entry prefix of the concrete DAO.
TODO : this should be in spring config
getSearchSuffix in class AbstractLdapDaoprotected java.lang.String getDnSuffix()
LdapPrincipalDaoImplBuilds the dn suffix.
getDnSuffix in class LdapPrincipalDaoImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||