|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 | |
---|---|
private LdapMembershipDao |
membership
|
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(String userPrincipalUid,
String groupPrincipalUid)
Add a user to a group. |
void |
addRole(String userPrincipalUid,
String rolePrincipalUid)
Add a user to a group. |
void |
addRoleToGroup(String groupPrincipalUid,
String rolePrincipalUid)
Add a role to a group. |
protected Attributes |
defineLdapAttributes(String principalUid)
A template method for defining the attributes for a particular LDAP class. |
protected String[] |
getAttributes()
|
protected String |
getDnSuffix()
Builds the dn suffix. |
protected String |
getEntryPrefix()
A template method that returns the LDAP entry prefix of the concrete DAO. |
String[] |
getGroupUidsForUser(String userPrincipalUid)
Return the list of group IDs for a particular user |
protected String[] |
getObjectClasses()
|
String[] |
getRolesForGroup(String groupPrincipalUid)
Return an array of the roles that belong to a group. |
String[] |
getRoleUidsForUser(String userPrincipalUid)
Returns the role IDs for a particular user Looks up the user, and extracts the rolemembership attr (ex : uniquemember) |
protected String |
getSearchSuffix()
A template method that returns the LDAP entry prefix of the concrete DAO. |
protected String |
getUidAttributeForPrincipal()
Builds the dn suffix. |
String[] |
getUserUidsForGroup(String groupPrincipalUid)
Return an array of the user principal UIDS that belong to a group. |
String[] |
getUserUidsForRole(String rolePrincipalUid)
Return an array of the user principal UIDS that belong to a group. |
protected Principal |
makePrincipal(String principalUid)
Creates a GroupPrincipal object. |
private void |
modifyRoleGroupByGroup(String groupPrincipalUid,
String rolePrincipalUid,
int operationType)
Replace or delete the user group attribute. |
private void |
modifyRoleGroupByRole(String groupPrincipalUid,
String rolePrincipalUid,
int operationType)
Replace or delete the user group attribute. |
private void |
modifyUserGroupByGroup(String userPrincipalUid,
String groupPrincipalUid,
int operationType)
Replace or delete the user group attribute. |
private void |
modifyUserGroupByUser(String userPrincipalUid,
String groupPrincipalUid,
int operationType)
Replace or delete the user group attribute. |
private void |
modifyUserRoleByRole(String userPrincipalUid,
String rolePrincipalUid,
int operationType)
Replace or delete the role attribute. |
private void |
modifyUserRoleByUser(String userPrincipalUid,
String rolePrincipalUid,
int operationType)
Replace or delete the role attribute. |
void |
removeGroup(String userPrincipalUid,
String groupPrincipalUid)
Remove a user from a group. |
void |
removeRole(String userPrincipalUid,
String rolePrincipalUid)
Remove a user from a group. |
void |
removeRoleFromGroup(String groupPrincipalUid,
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 |
Field Detail |
---|
private LdapMembershipDao membership
Constructor Detail |
---|
public LdapUserPrincipalDaoImpl() throws org.apache.jetspeed.security.SecurityException
Default constructor.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.public LdapUserPrincipalDaoImpl(LdapBindingConfig ldapConfig) throws org.apache.jetspeed.security.SecurityException
Initializes the dao.
ldapConfig
- Holds the ldap binding configuration.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.Method Detail |
---|
public void addGroup(String userPrincipalUid, String groupPrincipalUid) throws org.apache.jetspeed.security.SecurityException
LdapUserPrincipalDao
Add a user to a group.
addGroup
in interface LdapUserPrincipalDao
userPrincipalUid
- The user principal.groupPrincipalUid
- The group principal.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.LdapUserPrincipalDao.addGroup(java.lang.String,
java.lang.String)
private void modifyUserGroupByGroup(String userPrincipalUid, String groupPrincipalUid, int operationType) throws org.apache.jetspeed.security.SecurityException
Replace or delete the user group attribute.
userPrincipalUid
- groupPrincipalUid
- operationType
- whether to replace or remove the specified user group from the user
org.apache.jetspeed.security.SecurityException
- A SecurityException
.private void modifyUserGroupByUser(String userPrincipalUid, String groupPrincipalUid, int operationType) throws org.apache.jetspeed.security.SecurityException
Replace or delete the user group attribute.
userPrincipalUid
- groupPrincipalUid
- operationType
- whether to replace or remove the specified user group from the user
org.apache.jetspeed.security.SecurityException
- A SecurityException
.public void removeGroup(String userPrincipalUid, String groupPrincipalUid) throws org.apache.jetspeed.security.SecurityException
LdapUserPrincipalDao
Remove a user from a group.
removeGroup
in interface LdapUserPrincipalDao
userPrincipalUid
- The user principal.groupPrincipalUid
- The group principal.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.LdapUserPrincipalDao.removeGroup(java.lang.String,
java.lang.String)
public void addRole(String userPrincipalUid, String rolePrincipalUid) throws org.apache.jetspeed.security.SecurityException
LdapUserPrincipalDao
Add a user to a group.
addRole
in interface LdapUserPrincipalDao
userPrincipalUid
- The user principal.rolePrincipalUid
- The role principal.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.LdapUserPrincipalDao.addGroup(java.lang.String,
java.lang.String)
private void modifyUserRoleByUser(String userPrincipalUid, String rolePrincipalUid, int operationType) throws org.apache.jetspeed.security.SecurityException
Replace or delete the role attribute.
userPrincipalUid
- rolePrincipalUid
- operationType
- whether to replace or remove the specified user group from the user
org.apache.jetspeed.security.SecurityException
- A SecurityException
.private void modifyUserRoleByRole(String userPrincipalUid, String rolePrincipalUid, int operationType) throws org.apache.jetspeed.security.SecurityException
Replace or delete the role attribute.
userPrincipalUid
- rolePrincipalUid
- operationType
- whether to replace or remove the specified user group from the user
org.apache.jetspeed.security.SecurityException
- A SecurityException
.public void removeRole(String userPrincipalUid, String rolePrincipalUid) throws org.apache.jetspeed.security.SecurityException
LdapUserPrincipalDao
Remove a user from a group.
removeRole
in interface LdapUserPrincipalDao
userPrincipalUid
- The user principal.rolePrincipalUid
- The role principal.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.LdapUserPrincipalDao.removeGroup(java.lang.String,
java.lang.String)
protected Attributes defineLdapAttributes(String principalUid)
A template method for defining the attributes for a particular LDAP class.
defineLdapAttributes
in class LdapPrincipalDaoImpl
principalUid
- The principal uid.
protected Principal makePrincipal(String principalUid)
Creates a GroupPrincipal object.
makePrincipal
in class LdapPrincipalDaoImpl
principalUid
- The principal uid.
public void addRoleToGroup(String groupPrincipalUid, String rolePrincipalUid) throws org.apache.jetspeed.security.SecurityException
LdapUserPrincipalDao
Add a role to a group.
addRoleToGroup
in interface LdapUserPrincipalDao
groupPrincipalUid
- The group principal.rolePrincipalUid
- The role principal.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.LdapUserPrincipalDao.addGroup(java.lang.String,
java.lang.String)
private void modifyRoleGroupByRole(String groupPrincipalUid, String rolePrincipalUid, int operationType) throws org.apache.jetspeed.security.SecurityException
Replace or delete the user group attribute.
userPrincipalUid
- groupPrincipalUid
- operationType
- whether to replace or remove the specified user group from the user
org.apache.jetspeed.security.SecurityException
- A SecurityException
.private void modifyRoleGroupByGroup(String groupPrincipalUid, String rolePrincipalUid, int operationType) throws org.apache.jetspeed.security.SecurityException
Replace or delete the user group attribute.
userPrincipalUid
- groupPrincipalUid
- operationType
- whether to replace or remove the specified user group from the user
org.apache.jetspeed.security.SecurityException
- A SecurityException
.public void removeRoleFromGroup(String groupPrincipalUid, String rolePrincipalUid) throws org.apache.jetspeed.security.SecurityException
LdapUserPrincipalDao
Remove a role from a group.
removeRoleFromGroup
in interface LdapUserPrincipalDao
groupPrincipalUid
- The group principal.rolePrincipalUid
- The role principal.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.LdapUserPrincipalDao.removeGroup(java.lang.String,
java.lang.String)
public String[] getGroupUidsForUser(String userPrincipalUid) throws org.apache.jetspeed.security.SecurityException
getGroupUidsForUser
in interface LdapUserPrincipalDao
userPrincipalUid
-
org.apache.jetspeed.security.SecurityException
public String[] getRolesForGroup(String groupPrincipalUid) throws org.apache.jetspeed.security.SecurityException
Return an array of the roles that belong to a group.
getRolesForGroup
in interface LdapUserPrincipalDao
groupPrincipalUid
- The group principal uid.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.public String[] getRoleUidsForUser(String userPrincipalUid) throws org.apache.jetspeed.security.SecurityException
getRoleUidsForUser
in interface LdapUserPrincipalDao
userPrincipalUid
-
org.apache.jetspeed.security.SecurityException
public String[] getUserUidsForGroup(String groupPrincipalUid) throws org.apache.jetspeed.security.SecurityException
Return an array of the user principal UIDS that belong to a group.
getUserUidsForGroup
in interface LdapUserPrincipalDao
groupPrincipalUid
- The group principal uid.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.public String[] getUserUidsForRole(String rolePrincipalUid) throws org.apache.jetspeed.security.SecurityException
Return an array of the user principal UIDS that belong to a group.
getUserUidsForRole
in interface LdapUserPrincipalDao
groupPrincipalUid
- The group principal uid.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.protected String[] getObjectClasses()
getObjectClasses
in class AbstractLdapDao
protected String[] getAttributes()
getAttributes
in class AbstractLdapDao
protected String getUidAttributeForPrincipal()
LdapPrincipalDaoImpl
Builds the dn suffix.
getUidAttributeForPrincipal
in class LdapPrincipalDaoImpl
protected String getEntryPrefix()
AbstractLdapDao
A template method that returns the LDAP entry prefix of the concrete DAO.
TODO : this should be in spring config
getEntryPrefix
in class AbstractLdapDao
protected String getSearchSuffix()
AbstractLdapDao
A template method that returns the LDAP entry prefix of the concrete DAO.
TODO : this should be in spring config
getSearchSuffix
in class AbstractLdapDao
protected String getDnSuffix()
LdapPrincipalDaoImpl
Builds the dn suffix.
getDnSuffix
in class LdapPrincipalDaoImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |