public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static UserModel |
convertUserModel(it.eng.rdlab.um.ldap.user.bean.LdapUserModel ldapUserModel)
Converts the LDAPUserModel to UserModel
|
static String |
generateGroupsDN(String organizationName)
Generates the groups' distinguished name under an organization
|
static String |
generatePeopleDN(String organizationName)
Generates the people's distinguished name under an organization
|
static String |
generateRolesDN(String organizationName)
Generates the roles' distinguished name under an organization
|
static org.codehaus.jackson.map.ObjectMapper |
getMapper()
Chooses JAXB as the annotation for the serialization/deserialization
|
static String |
getOrganizationNameFromDN(String organizationDn)
Gets the organization's name from distinguished name
|
static String |
groupDNBuilder(String groupId,
String organizationName)
Builds the group's distinguished name
|
static void |
initLdap(String adminUsername,
String adminPassword,
String ldapUrl)
Initializes the LDAP server with admin's credential and LDAP URL
|
static String |
organizationDNBuilder(String organizationName)
Builds the organization's distinguished name
|
static String |
roleDNBuilder(String roleId,
String organizationName)
Builds the role's distinguished name
|
static String |
userDNBuilder(String userId,
String organizationName)
Builds the user's distinguished name
|
public static String organizationDNBuilder(String organizationName)
organizationName - Stringpublic static String userDNBuilder(String userId, String organizationName)
userId - StringorganizationName - Stringpublic static String roleDNBuilder(String roleId, String organizationName)
roleId - StringorganizationName - Stringpublic static String groupDNBuilder(String groupId, String organizationName)
groupId - StringorganizationName - Stringpublic static String getOrganizationNameFromDN(String organizationDn)
organizationDn - Stringpublic static void initLdap(String adminUsername, String adminPassword, String ldapUrl) throws NamingException
adminUsername - StringadminPassword - StringldapUrl - StringNamingExceptionpublic static UserModel convertUserModel(it.eng.rdlab.um.ldap.user.bean.LdapUserModel ldapUserModel)
ldapUserModel - LdapUserModelpublic static String generatePeopleDN(String organizationName)
organizationName - Stringpublic static String generateGroupsDN(String organizationName)
organizationName - Stringpublic static String generateRolesDN(String organizationName)
organizationName - Stringpublic static org.codehaus.jackson.map.ObjectMapper getMapper()
Copyright © 2014. All Rights Reserved.