Class ClaimsMgtUtil
- java.lang.Object
-
- org.wso2.carbon.stratos.common.util.ClaimsMgtUtil
-
public class ClaimsMgtUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ClaimsMgtUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetAdminUserNameFromTenantId(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId)Method to get the name of the admin user given the tenant idstatic StringgetClaimfromUserStoreManager(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId, String claim)Get the claims from the user store managerstatic StringgetFirstName(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId)gets first namestatic StringgetFirstNamefromUserStoreManager(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId)Gets first name from the user store managerstatic StringgetLastName(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId)gets last namestatic StringgetLastNamefromUserStoreManager(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId)Gets last name from the user store managerstatic String[]getNames(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId)Gets the first name of a tenant admin to address him/her in the notificationsstatic String[]getNamesfromFullName(org.wso2.carbon.user.core.service.RealmService realmService, String fullName)Let's split the givenname into two.
-
-
-
Method Detail
-
getFirstName
public static String getFirstName(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId) throws Exception
gets first name- Parameters:
tenant- tenanttenantId- tenant id- Returns:
- first name
- Throws:
Exception- if error in getting the first name
-
getLastName
public static String getLastName(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId) throws Exception
gets last name- Parameters:
tenant- tenanttenantId- tenant id- Returns:
- last name
- Throws:
Exception- if error in getting the last name
-
getNames
public static String[] getNames(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId) throws Exception
Gets the first name of a tenant admin to address him/her in the notifications- Parameters:
tenant- tenanttenantId- tenant Id- Returns:
- first name / calling name
- Throws:
Exception- if unable to retrieve the admin name
-
getAdminUserNameFromTenantId
public static String getAdminUserNameFromTenantId(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId) throws Exception
Method to get the name of the admin user given the tenant id- Parameters:
tenantId- tenant id- Returns:
- admin user name
- Throws:
Exception- UserStoreException
-
getNamesfromFullName
public static String[] getNamesfromFullName(org.wso2.carbon.user.core.service.RealmService realmService, String fullName)
Let's split the givenname into two.- Parameters:
fullName- full name of the tenant admin- Returns:
- first name
-
getClaimfromUserStoreManager
public static String getClaimfromUserStoreManager(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId, String claim) throws org.wso2.carbon.user.core.UserStoreException
Get the claims from the user store manager- Parameters:
tenant- tenant informationtenantId- tenantIdclaim- claim name- Returns:
- claim value
- Throws:
org.wso2.carbon.user.core.UserStoreException- exception in getting the user store manager
-
getFirstNamefromUserStoreManager
public static String getFirstNamefromUserStoreManager(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId) throws org.wso2.carbon.user.core.UserStoreException
Gets first name from the user store manager- Parameters:
tenant- tenanttenantId- tenant id- Returns:
- first name
- Throws:
org.wso2.carbon.user.core.UserStoreException- , if error in getting the claim GIVEN_NAME
-
getLastNamefromUserStoreManager
public static String getLastNamefromUserStoreManager(org.wso2.carbon.user.core.service.RealmService realmService, int tenantId) throws org.wso2.carbon.user.core.UserStoreException
Gets last name from the user store manager- Parameters:
tenant- tenanttenantId- tenant id- Returns:
- last name
- Throws:
org.wso2.carbon.user.core.UserStoreException- , if error in getting the claim SURNAME
-
-