Package com.sun.identity.idm.common
Class IdRepoUtils
- java.lang.Object
-
- com.sun.identity.idm.common.IdRepoUtils
-
public class IdRepoUtils extends Object
This class provides common utility functions for IdRepo.
-
-
Constructor Summary
Constructors Constructor Description IdRepoUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,?>getAttrMapWithoutPasswordAttrs(Map<String,?> attrMap, Set<String> pwdAttrs)Returns an attribute map with all the password attributes being masked.static booleanhasIdRepoSchema(String idRepoType)Return true if specified IdRepo type has schemas.static voidloadIdRepoSchema(SSOToken ssoToken, String idRepoName, String realm, jakarta.servlet.ServletContext servletCtx)Loads schema to specified IdRepo.static Map<String,String>parseAttributeMapping(Set<String> mappings)Parses attribute mapping settings in the format of "from=to".static Map<IdType,Set<IdOperation>>parseSupportedTypesAndOperations(Set<String> typesAndOperations)Parses the incoming types and operations in string format to their domain object equivalent.
-
-
-
Method Detail
-
getAttrMapWithoutPasswordAttrs
public static Map<String,?> getAttrMapWithoutPasswordAttrs(Map<String,?> attrMap, Set<String> pwdAttrs)
Returns an attribute map with all the password attributes being masked.- Parameters:
attrMap- an attribute mappwdAttrs- a set of password attribute names- Returns:
- an attribute map with all the password attributes being masked.
-
hasIdRepoSchema
public static boolean hasIdRepoSchema(String idRepoType)
Return true if specified IdRepo type has schemas.- Parameters:
idRepoType- IdRepo type- Returns:
- true if specified IdRepo type has schemas
-
loadIdRepoSchema
public static void loadIdRepoSchema(SSOToken ssoToken, String idRepoName, String realm, jakarta.servlet.ServletContext servletCtx) throws IdRepoException
Loads schema to specified IdRepo.- Parameters:
ssoToken- single sign on token of authenticated user identityidRepoName- IdRepo namerealm- the realmservletCtx- the servlet context- Throws:
IdRepoException- If schema can't be loaded or there are repository related error conditions.
-
parseSupportedTypesAndOperations
public static Map<IdType,Set<IdOperation>> parseSupportedTypesAndOperations(Set<String> typesAndOperations)
Parses the incoming types and operations in string format to their domain object equivalent. For example:user=read,edit,service,deletewill be turned into USER identity type with READ, EDIT, SERVICE, DELETE operations.- Parameters:
typesAndOperations- The parsable type and operation lines (each line represents an identity type.- Returns:
- The parsed identity types and operation mappings.
-
parseAttributeMapping
public static Map<String,String> parseAttributeMapping(Set<String> mappings)
Parses attribute mapping settings in the format of "from=to". If there is no mapping provided, then this will be a mapping to itself.- Parameters:
mappings- A set of mappings that needs to be parsed- Returns:
- The processed mappings returned as a map.
-
-