| 
 | ||||||||||
| 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 | |
|---|---|
| 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
LdapUserPrincipalDaoAdd a user to a group.
addGroup in interface LdapUserPrincipalDaouserPrincipalUid - 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
LdapUserPrincipalDaoRemove a user from a group.
removeGroup in interface LdapUserPrincipalDaouserPrincipalUid - 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
LdapUserPrincipalDaoAdd a user to a group.
addRole in interface LdapUserPrincipalDaouserPrincipalUid - 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
LdapUserPrincipalDaoRemove a user from a group.
removeRole in interface LdapUserPrincipalDaouserPrincipalUid - 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 LdapPrincipalDaoImplprincipalUid - The principal uid.
protected Principal makePrincipal(String principalUid)
Creates a GroupPrincipal object.
makePrincipal in class LdapPrincipalDaoImplprincipalUid - The principal uid.
public void addRoleToGroup(String groupPrincipalUid,
                           String rolePrincipalUid)
                    throws org.apache.jetspeed.security.SecurityException
LdapUserPrincipalDaoAdd a role to a group.
addRoleToGroup in interface LdapUserPrincipalDaogroupPrincipalUid - 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
LdapUserPrincipalDaoRemove a role from a group.
removeRoleFromGroup in interface LdapUserPrincipalDaogroupPrincipalUid - 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 LdapUserPrincipalDaouserPrincipalUid - 
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 LdapUserPrincipalDaogroupPrincipalUid - 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 LdapUserPrincipalDaouserPrincipalUid - 
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 LdapUserPrincipalDaogroupPrincipalUid - 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 LdapUserPrincipalDaogroupPrincipalUid - The group principal uid.
org.apache.jetspeed.security.SecurityException - A SecurityException.protected String[] getObjectClasses()
getObjectClasses in class AbstractLdapDaoprotected String[] getAttributes()
getAttributes in class AbstractLdapDaoprotected String getUidAttributeForPrincipal()
LdapPrincipalDaoImplBuilds the dn suffix.
getUidAttributeForPrincipal in class LdapPrincipalDaoImplprotected 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 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 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 | |||||||||