|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILDAPUtils
Defines a set of LDAP operations.
Method Summary | |
---|---|
void |
addGroup(LDAPGroup newGroup)
Adds a new group to the LDAP tree. |
void |
addGroupAttribute(String commonName,
String attributeName,
Object value)
Adds an attribute to a given group. |
void |
addUser(LDAPUser newUser)
Adds a new user to the LDAP tree. |
void |
addUserAttribute(String loginName,
String attributeName,
Object value)
Adds an attribute to a given user. |
void |
addUserToGroup(String groupCN,
String userLogin)
Adds a user from a given group. |
void |
changePassword(String loginName,
String newPassword)
Changes the password for a given user. |
int |
countAllfUsers(String groupId)
Counts all users of a given group. |
int |
countAllGroups()
Counts all groups in the LDAP directory |
int |
countAllGroupsOfUser(String loginName)
Counts all groups of a user |
int |
countAllUsers()
Counts all users in the LDAP directory |
int |
countUsers(Map<String,String> attributes)
Count users in the LDAP directory which match the provided attributes |
Set<LDAPGroup> |
findAllGroups()
Returns the list of all groups. |
Set<LDAPUser> |
findAllUsers()
Returns the list of all users. |
LDAPGroup |
findGroupByCommonName(String cn)
Returns the group with a given common name. |
LDAPGroup |
findGroupByDistinguishedName(String dn)
Returns the group with a given distinguished name. |
Set<LDAPGroup> |
findGroups(int rowsPerPage,
int pageToReturn)
Finds a subset of all the groups, according to the parameters |
Set<LDAPGroup> |
findGroupsOfUser(String loginName)
Returns the list of a given user's groups. |
Set<LDAPGroup> |
findGroupsOfUserPagination(String loginName,
int rowsPerPage,
int pageToReturn)
Returns the list of a given user's groups, with pagination |
LDAPUser |
findUserByDistinguishedName(String dn)
Returns the user with a given distinguished name. |
LDAPUser |
findUserByLogin(String loginName)
Returns the user with a given login name. |
Set<LDAPUser> |
findUsers(int rowsPerPage,
int pageToReturn)
Finds a subset of all the users, according to the parameters |
Set<LDAPUser> |
findUsersByAttribute(String attribute,
String value)
Returns the list of users with a given attribute value. |
Set<LDAPUser> |
findUsersByAttributes(Map<String,String> attributes)
Finds a set of LDAP users that match all of the specified criteria |
Set<LDAPUser> |
findUsersByAttributes(Map<String,String> attributes,
int rowsPerPage,
int pageToReturn)
Finds a set of LDAP users that match all of the specified criteria |
Set<LDAPUser> |
findUsersByEmail(String value)
Returns the list of users with a given email attribute value. |
Map<String,LDAPUser> |
findUsersInGroup(String groupCN)
Checks if a given user belongs to a given group. |
Set<LDAPGroup> |
getChildGroupsByCN(String commonName)
Returns the list of groups that belong to a parent group given its common name. |
Set<LDAPGroup> |
getChildGroupsByDN(String distinguishedName)
Returns the list of groups that belong to a parent group given its distinguished name. |
LDAPConfigurations |
getConfigurations()
Inspector for the LDAP configurations object. |
Object |
getGroupAttribute(String attributeName,
String commonName)
Returns a given attribute or null of it doesn't exists. |
String |
getGroupAttributeName()
Gets the name attribute name |
Map<String,Object> |
getGroupAttributes(String commonName)
Returns the attribute map. |
String |
getMailAttributeName()
Gets the mail attribute name |
String |
getNameAttributeName()
Gets the name attribute name |
String |
getNonAvailableValue()
Get the Non Available Message. |
List<String> |
getUnchangeableLDAPAttributes()
Get the list of the LDAP unchangeable attributes |
Object |
getUserAttribute(String attributeName,
String loginName)
Returns a given attribute or null of it doesn't exists. |
Map<String,Object> |
getUserAttributes(String loginName)
Returns the attribute map. |
String |
getUserLoginAttributeName()
Gets the user login attribute name |
String |
getUserParentGroupAttributeName()
Returns the parent group attribute name. |
boolean |
groupContainsAttribute(String attributeName,
String commonName)
Checks if a given attribute belongs to the entity. |
boolean |
groupExists(String groupCN)
Checks if a given group exists on the LDAP tree. |
boolean |
isIdentityValid(String loginName,
String suppliedPassword)
Checks if the supplied password matches the one defined for a user with a given ID. |
boolean |
isReadOnly()
Get the ldap readOnly configuration value. |
boolean |
isUserInGroup(String groupCN,
String userLogin)
Checks if a given user belongs to a given group. |
void |
removeGroup(String groupCN)
Removes an existing group from the LDAP tree. |
void |
removeGroupAttribute(String commonName,
String attributeName)
Removes an attribute from a given group. |
void |
removeUser(String loginName)
Removes an existing user from the LDAP tree. |
void |
removeUserAttribute(String loginName,
String attributeName)
Removes an attribute from a given user. |
void |
removeUserFromGroup(String groupCN,
String userLogin)
Removes a user from a given group. |
void |
resetConfigurations()
Resets the LDAP configurations. |
void |
setGroupAttribute(String loginName,
String attributeName,
Object value)
Sets a given attribute value. |
void |
setLogger(pt.digitalis.log.ILogWrapper logger)
Set the API logger |
void |
setUserAttribute(String loginName,
String attributeName,
Object value)
Sets the a given attribute value. |
void |
updateGroup(LDAPGroup groupToUpdate,
String groupID)
Updates an existing group on the LDAP tree. |
void |
updateUser(LDAPUser userToUpdate,
String userLogin)
Updates an existing user on the LDAP tree. |
boolean |
userContainsAttribute(String attributeName,
String loginName)
Checks if a given attribute belongs to the entity. |
boolean |
userExists(String loginName)
Checks if a user exists on the LDAP tree. |
Method Detail |
---|
void addGroup(LDAPGroup newGroup) throws LDAPOperationException
newGroup
- the group to add
LDAPOperationException
- if the group can't be createdvoid addGroupAttribute(String commonName, String attributeName, Object value) throws LDAPOperationException
commonName
- the group's common nameattributeName
- the attribute namevalue
- the attribute value
LDAPOperationException
void addUser(LDAPUser newUser) throws LDAPOperationException
newUser
- the new user to add to the LDAP server
LDAPOperationException
- if the user can't be createdvoid addUserAttribute(String loginName, String attributeName, Object value) throws LDAPOperationException
loginName
- the user login nameattributeName
- the attribute namevalue
- the attribute value
LDAPOperationException
- if the attribute can't be addedvoid addUserToGroup(String groupCN, String userLogin) throws LDAPOperationException
groupCN
- the CN of the groupuserLogin
- the login name of the user to add
LDAPOperationException
- if the user groups can't be addedvoid changePassword(String loginName, String newPassword) throws LDAPOperationException
loginName
- the login name of the user to change the passwordnewPassword
- the new password to set
LDAPOperationException
- if the operation cannot be executedint countAllfUsers(String groupId) throws LDAPOperationException
groupId
- The group identifier
LDAPOperationException
int countAllGroups() throws NamingException, LDAPOperationException
NamingException
LDAPOperationException
int countAllGroupsOfUser(String loginName) throws NamingException, LDAPOperationException
loginName
- The user login name
NamingException
LDAPOperationException
int countAllUsers() throws NamingException, LDAPOperationException
NamingException
LDAPOperationException
int countUsers(Map<String,String> attributes) throws LDAPOperationException
attributes
- The attributes to be considered in the search
LDAPOperationException
- if the operation can't be executedSet<LDAPGroup> findAllGroups() throws LDAPOperationException
LDAPOperationException
- if the operation can't be executedSet<LDAPUser> findAllUsers() throws LDAPOperationException
LDAPOperationException
- if the operation can't be executedLDAPGroup findGroupByCommonName(String cn) throws LDAPOperationException
cn
- the group's common name
LDAPOperationException
- if the operation cannot be executedLDAPGroup findGroupByDistinguishedName(String dn) throws LDAPOperationException
dn
- the group's distinguished name
LDAPOperationException
- if the operation cannot be executedSet<LDAPGroup> findGroups(int rowsPerPage, int pageToReturn) throws LDAPOperationException
rowsPerPage
- The number of rows per pagepageToReturn
- The page number to return
LDAPOperationException
- if the operation cannot be executed.Set<LDAPGroup> findGroupsOfUser(String loginName) throws LDAPOperationException
loginName
- the user's login name
LDAPOperationException
- if the operation can't be executedSet<LDAPGroup> findGroupsOfUserPagination(String loginName, int rowsPerPage, int pageToReturn) throws LDAPOperationException
loginName
- the user's login namerowsPerPage
- The number of results per pagepageToReturn
- The page number to return
LDAPOperationException
- if the operation can't be executedLDAPUser findUserByDistinguishedName(String dn) throws LDAPOperationException
dn
- the user's login name
LDAPOperationException
- if the operation cannot be executedLDAPUser findUserByLogin(String loginName) throws LDAPOperationException
loginName
- the user's login name
LDAPOperationException
- if the operation cannot be executedSet<LDAPUser> findUsers(int rowsPerPage, int pageToReturn) throws LDAPOperationException
rowsPerPage
- The number of rows per pagepageToReturn
- The page number to return
LDAPOperationException
- if the operation cannot be executedSet<LDAPUser> findUsersByAttribute(String attribute, String value) throws LDAPOperationException
attribute
- the attribute to searchvalue
- the value for the attribute
LDAPOperationException
- if the operation cannot be executedSet<LDAPUser> findUsersByAttributes(Map<String,String> attributes) throws LDAPOperationException
attributes
- A map of (attribute, attribute value) pairs
LDAPOperationException
- if the operation cannot be executedSet<LDAPUser> findUsersByAttributes(Map<String,String> attributes, int rowsPerPage, int pageToReturn) throws LDAPOperationException
attributes
- A map of (attribute, attribute value) pairsrowsPerPage
- The number of results per pagepageToReturn
- The number of the page to return
LDAPOperationException
- if the operation cannot be executedSet<LDAPUser> findUsersByEmail(String value) throws LDAPOperationException
value
- the value for the attribute email
LDAPOperationException
- if the operation cannot be executedMap<String,LDAPUser> findUsersInGroup(String groupCN) throws LDAPOperationException
groupCN
- the group's CN
LDAPOperationException
- if the operation can't be executedSet<LDAPGroup> getChildGroupsByCN(String commonName) throws LDAPOperationException
commonName
- the parent group's common name
LDAPOperationException
- if the operation can't be executedSet<LDAPGroup> getChildGroupsByDN(String distinguishedName) throws LDAPOperationException
distinguishedName
- the parent group's distinguished name
LDAPOperationException
- if the operation can't be executedLDAPConfigurations getConfigurations()
Object getGroupAttribute(String attributeName, String commonName) throws LDAPOperationException
attributeName
- the attribute namecommonName
- the group common name
LDAPOperationException
- if the user attribute can't be fetchedString getGroupAttributeName()
Map<String,Object> getGroupAttributes(String commonName) throws LDAPOperationException
commonName
- the group common name
LDAPOperationException
- if the user attributes can't be fetchedString getMailAttributeName()
String getNameAttributeName()
String getNonAvailableValue()
List<String> getUnchangeableLDAPAttributes()
Object getUserAttribute(String attributeName, String loginName) throws LDAPOperationException
attributeName
- the attribute nameloginName
- the user login name
LDAPOperationException
- if the user attribute can't be fetchedMap<String,Object> getUserAttributes(String loginName) throws LDAPOperationException
loginName
- the user login name
LDAPOperationException
- if the user attributes can't be fetchedString getUserLoginAttributeName()
String getUserParentGroupAttributeName()
boolean groupContainsAttribute(String attributeName, String commonName) throws LDAPOperationException
attributeName
- the attribute namecommonName
- the group common name
LDAPOperationException
- if the user attribute can't be fetchedboolean groupExists(String groupCN) throws LDAPOperationException
groupCN
- the group's CN
LDAPOperationException
- if the operation can't be executedboolean isIdentityValid(String loginName, String suppliedPassword) throws LDAPOperationException
loginName
- the user IDsuppliedPassword
- the supplied user password
LDAPOperationException
- if the operation cannot be executedboolean isReadOnly()
boolean isUserInGroup(String groupCN, String userLogin) throws LDAPOperationException
groupCN
- the group's CNuserLogin
- the user's login name
LDAPOperationException
- if the operation can't be executedvoid removeGroup(String groupCN) throws LDAPOperationException
groupCN
- the group to add
LDAPOperationException
- if the group can't be removedvoid removeGroupAttribute(String commonName, String attributeName) throws LDAPOperationException
commonName
- the group's common nameattributeName
- the attribute name
LDAPOperationException
void removeUser(String loginName) throws LDAPOperationException
loginName
- the id of the user to remove
LDAPOperationException
- if the user can't be removedvoid removeUserAttribute(String loginName, String attributeName) throws LDAPOperationException
loginName
- the user login nameattributeName
- the attribute name
LDAPOperationException
- if the attribute can't be addedvoid removeUserFromGroup(String groupCN, String userLogin) throws LDAPOperationException
groupCN
- the CN of the groupuserLogin
- the login name of the user to remove
LDAPOperationException
- if the user groups can't be removedvoid resetConfigurations()
void setGroupAttribute(String loginName, String attributeName, Object value) throws LDAPOperationException
loginName
- the user login nameattributeName
- the attribute namevalue
- the attribute value
LDAPOperationException
- if the attribute can't be setvoid setLogger(pt.digitalis.log.ILogWrapper logger)
logger
- the new logger value to setvoid setUserAttribute(String loginName, String attributeName, Object value) throws LDAPOperationException
loginName
- the user login nameattributeName
- the attribute namevalue
- the attribute value
LDAPOperationException
- if the attribute can't be setvoid updateGroup(LDAPGroup groupToUpdate, String groupID) throws LDAPOperationException
groupToUpdate
- the user to updategroupID
- the group ID
LDAPOperationException
- if the group cannot be updatedvoid updateUser(LDAPUser userToUpdate, String userLogin) throws LDAPOperationException
userToUpdate
- the user to updateuserLogin
- the user's original login
LDAPOperationException
- if the operation cannot be executedboolean userContainsAttribute(String attributeName, String loginName) throws LDAPOperationException
attributeName
- the attribute nameloginName
- the user login name
LDAPOperationException
- if the user attribute can't be fetchedboolean userExists(String loginName) throws LDAPOperationException
loginName
- the ID of the user
LDAPOperationException
- if the operation cannot be executed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |