private ClaimManager getClaimManager(String tenantDomain, UserRealm realm) throws FrameworkException { ClaimManager claimManager = null; try { claimManager = realm.getClaimManager(); } catch (UserStoreException e) { throw new FrameworkException("Error occurred while retrieving the ClaimManager " + "from Realm for " + tenantDomain + " to handle local claims", e); } return claimManager; }
private ClaimManager getClaimManager(String tenantDomain, UserRealm realm) throws FrameworkException { ClaimManager claimManager = null; try { claimManager = realm.getClaimManager(); } catch (UserStoreException e) { throw new FrameworkException("Error occurred while retrieving the ClaimManager " + "from Realm for " + tenantDomain + " to handle local claims", e); } return claimManager; }
private ClaimManager getClaimManager(String tenantDomain, UserRealm realm) throws FrameworkException { ClaimManager claimManager = null; try { claimManager = realm.getClaimManager(); } catch (UserStoreException e) { throw new FrameworkException("Error occurred while retrieving the ClaimManager " + "from Realm for " + tenantDomain + " to handle local claims", e); } return claimManager; }
private ClaimManager getClaimManager() throws UserStoreException { try { UserRealm realm = super.getUserRealm(); if (realm == null) { throw new UserStoreException(NULL_REALM_MESSAGE); } return realm.getClaimManager(); } catch (Exception e) { throw new UserStoreException(e); } } }
public ClaimMapping getClaimMapping(String claimURI) throws ClaimManagementException { ClaimMapping claimMapping = null; ClaimManager claimManager; try { UserRealm realm = getRealm(); claimManager = realm.getClaimManager(); if (claimManager != null) { claimMapping = claimManager.getClaimMapping(claimURI); } } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while retrieving claim", e); } return claimMapping; }
public ClaimMapping getClaimMapping(String claimURI) throws ClaimManagementException { ClaimMapping claimMapping = null; ClaimManager claimManager; try { UserRealm realm = getRealm(); claimManager = realm.getClaimManager(); if (claimManager != null) { claimMapping = claimManager.getClaimMapping(claimURI); } } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while retrieving claim", e); } return claimMapping; }
/** * @return * @throws UserStoreException */ private Claim[] getAllSupportedClaims(UserRealm realm, String dialectUri) throws org.wso2.carbon.user.api.UserStoreException { ClaimMapping[] claims = null; List<Claim> reqClaims = null; claims = realm.getClaimManager().getAllSupportClaimMappingsByDefault(); reqClaims = new ArrayList<Claim>(); for (int i = 0; i < claims.length; i++) { if (dialectUri.equals(claims[i].getClaim().getDialectURI()) && (claims[i] != null && claims[i].getClaim().getDisplayTag() != null && !claims[i].getClaim().getClaimUri().equals(IdentityConstants.CLAIM_PPID))) { reqClaims.add((Claim) claims[i].getClaim()); } } return reqClaims.toArray(new Claim[reqClaims.size()]); }
/** * @return * @throws UserStoreException */ private Claim[] getAllSupportedClaims(UserRealm realm, String dialectUri) throws org.wso2.carbon.user.api.UserStoreException { ClaimMapping[] claims = null; List<Claim> reqClaims = null; claims = realm.getClaimManager().getAllSupportClaimMappingsByDefault(); reqClaims = new ArrayList<Claim>(); for (int i = 0; i < claims.length; i++) { if (dialectUri.equals(claims[i].getClaim().getDialectURI()) && (claims[i] != null && claims[i].getClaim().getDisplayTag() != null && !claims[i].getClaim().getClaimUri().equals(IdentityConstants.CLAIM_PPID))) { reqClaims.add((Claim) claims[i].getClaim()); } } return reqClaims.toArray(new Claim[reqClaims.size()]); }
/** * @return * @throws ClaimManagementException */ public ClaimMapping[] getAllSupportedClaimMappings(String dialectUri) throws ClaimManagementException { ClaimManager claimManager; try { UserRealm realm = getRealm(); claimManager = realm.getClaimManager(); if (claimManager == null) { // There can be cases - we get a request for an external user store - where we don' // have a claims administrator. return new ClaimMapping[0]; } return claimManager.getAllClaimMappings(dialectUri); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while loading supported claims", e); } }
/** * @param mapping * @throws ClaimManagementException */ public void addNewClaimMapping(ClaimMapping mapping) throws ClaimManagementException { ClaimManager claimManager = null; try { UserRealm realm = getRealm(); claimManager = realm.getClaimManager(); if (claimManager != null) { // There can be cases - we get a request for an external user store - where we don' // have a claims administrator. claimManager.addNewClaimMapping(mapping); } } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while adding new claim mapping", e); } }
/** * @return * @throws ClaimManagementException */ public ClaimMapping[] getAllSupportedClaimMappings() throws ClaimManagementException { ClaimManager claimManager; try { UserRealm realm = getRealm(); claimManager = realm.getClaimManager(); if (claimManager == null) { // There can be cases - we get a request for an external user store - where we don' // have a claims administrator. return new ClaimMapping[0]; } return claimManager.getAllSupportClaimMappingsByDefault(); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while loading supported claims", e); } }
/** * @param mapping * @throws ClaimManagementException */ public void addNewClaimMapping(ClaimMapping mapping) throws ClaimManagementException { ClaimManager claimManager = null; try { UserRealm realm = getRealm(); claimManager = realm.getClaimManager(); if (claimManager != null) { // There can be cases - we get a request for an external user store - where we don' // have a claims administrator. claimManager.addNewClaimMapping(mapping); } } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while adding new claim mapping", e); } }
/** * @return * @throws ClaimManagementException */ public ClaimMapping[] getAllClaimMappings() throws ClaimManagementException { ClaimManager claimManager; try { UserRealm realm = getRealm(); claimManager = realm.getClaimManager(); if (claimManager == null) { // There can be cases - we get a request for an external user store - where we don' // have a claims administrator. return new ClaimMapping[0]; } return claimManager.getAllClaimMappings(); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while loading supported claims", e); } }
/** * @return * @throws ClaimManagementException */ public ClaimMapping[] getAllSupportedClaimMappings() throws ClaimManagementException { ClaimManager claimManager; try { UserRealm realm = getRealm(); claimManager = realm.getClaimManager(); if (claimManager == null) { // There can be cases - we get a request for an external user store - where we don' // have a claims administrator. return new ClaimMapping[0]; } return claimManager.getAllSupportClaimMappingsByDefault(); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while loading supported claims", e); } }
/** * @param mappings */ public void addNewClaimDialect(ClaimDialect mappings) throws ClaimManagementException { ClaimMapping[] mapping; ClaimManager claimManager; claimManager = null; try { UserRealm realm = getRealm(); claimManager = realm.getClaimManager(); if (claimManager != null) { mapping = mappings.getClaimMapping(); for (ClaimMapping aMapping : mapping) { claimManager.addNewClaimMapping(aMapping); } } } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while removing new claim mapping", e); } }
/** * @param mappings */ public void addNewClaimDialect(ClaimDialect mappings) throws ClaimManagementException { ClaimMapping[] mapping; ClaimManager claimManager; claimManager = null; try { UserRealm realm = getRealm(); claimManager = realm.getClaimManager(); if (claimManager != null) { mapping = mappings.getClaimMapping(); for (ClaimMapping aMapping : mapping) { claimManager.addNewClaimMapping(aMapping); } } } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while removing new claim mapping", e); } }
public ClaimMapping[] getAllClaimMappings(String tenantDomain) throws ClaimManagementException { ClaimManager claimManager; try { UserRealm realm = AnonymousSessionUtil.getRealmByTenantDomain( ClaimManagementServiceComponent.getRegistryService(), ClaimManagementServiceComponent.getRealmService(), tenantDomain); claimManager = realm.getClaimManager(); if (claimManager == null) { // There can be cases - we get a request for an external user store - where we don' // have a claims administrator. return new ClaimMapping[0]; } return claimManager.getAllClaimMappings(); } catch (org.wso2.carbon.user.api.UserStoreException | CarbonException e) { throw new ClaimManagementException("Error occurred while loading claims mapping for tenant " + tenantDomain, e); } }
public ClaimMapping[] getAllClaimMappings(String tenantDomain) throws ClaimManagementException { ClaimManager claimManager; try { UserRealm realm = AnonymousSessionUtil.getRealmByTenantDomain( ClaimManagementServiceComponent.getRegistryService(), ClaimManagementServiceComponent.getRealmService(), tenantDomain); claimManager = realm.getClaimManager(); if (claimManager == null) { // There can be cases - we get a request for an external user store - where we don' // have a claims administrator. return new ClaimMapping[0]; } return claimManager.getAllClaimMappings(); } catch (org.wso2.carbon.user.api.UserStoreException | CarbonException e) { throw new ClaimManagementException("Error occurred while loading claims mapping for tenant " + tenantDomain, e); } }
public ClaimMapping[] getAllClaimMappings(String dialectURI, String tenantDomain) throws ClaimManagementException { ClaimManager claimManager; try { UserRealm realm = AnonymousSessionUtil.getRealmByTenantDomain( ClaimManagementServiceComponent.getRegistryService(), ClaimManagementServiceComponent.getRealmService(), tenantDomain); claimManager = realm.getClaimManager(); if (claimManager == null) { // There can be cases - we get a request for an external user store - where we don' // have a claims administrator. return new ClaimMapping[0]; } return claimManager.getAllClaimMappings(dialectURI); } catch (CarbonException | org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while loading all claim mappings for tenant " + tenantDomain, e); } }
public ClaimMapping[] getAllClaimMappings(String dialectURI, String tenantDomain) throws ClaimManagementException { ClaimManager claimManager; try { UserRealm realm = AnonymousSessionUtil.getRealmByTenantDomain( ClaimManagementServiceComponent.getRegistryService(), ClaimManagementServiceComponent.getRealmService(), tenantDomain); claimManager = realm.getClaimManager(); if (claimManager == null) { // There can be cases - we get a request for an external user store - where we don' // have a claims administrator. return new ClaimMapping[0]; } return claimManager.getAllClaimMappings(dialectURI); } catch (CarbonException | org.wso2.carbon.user.api.UserStoreException e) { throw new ClaimManagementException("Error occurred while loading all claim mappings for tenant " + tenantDomain, e); } }