public static ProtocolMapperModel createClaimMapper(String name, String tokenClaimName, String claimType, String mapperId) { ProtocolMapperModel mapper = new ProtocolMapperModel(); mapper.setName(name); mapper.setProtocolMapper(mapperId); mapper.setProtocol(CASLoginProtocol.LOGIN_PROTOCOL); Map<String, String> config = new HashMap<String, String>(); config.put(OIDCAttributeMapperHelper.TOKEN_CLAIM_NAME, tokenClaimName); config.put(OIDCAttributeMapperHelper.JSON_TYPE, claimType); mapper.setConfig(config); return mapper; }
protected ProtocolMapperModel entityToModel(ProtocolMapperEntity entity) { ProtocolMapperModel mapping = new ProtocolMapperModel(); mapping.setId(entity.getId()); mapping.setName(entity.getName()); mapping.setProtocol(entity.getProtocol()); mapping.setProtocolMapper(entity.getProtocolMapper()); Map<String, String> config = new HashMap<String, String>(); if (entity.getConfig() != null) config.putAll(entity.getConfig()); mapping.setConfig(config); return mapping; }
protected ProtocolMapperModel entityToModel(ProtocolMapperEntity entity) { ProtocolMapperModel mapping = new ProtocolMapperModel(); mapping.setId(entity.getId()); mapping.setName(entity.getName()); mapping.setProtocol(entity.getProtocol()); mapping.setProtocolMapper(entity.getProtocolMapper()); Map<String, String> config = new HashMap<String, String>(); if (entity.getConfig() != null) config.putAll(entity.getConfig()); mapping.setConfig(config); return mapping; }
@Override public Set<ProtocolMapperModel> getProtocolMappers() { Set<ProtocolMapperModel> mappings = new HashSet<ProtocolMapperModel>(); for (ProtocolMapperEntity entity : this.entity.getProtocolMappers()) { ProtocolMapperModel mapping = new ProtocolMapperModel(); mapping.setId(entity.getId()); mapping.setName(entity.getName()); mapping.setProtocol(entity.getProtocol()); mapping.setProtocolMapper(entity.getProtocolMapper()); Map<String, String> config = new HashMap<String, String>(); if (entity.getConfig() != null) { config.putAll(entity.getConfig()); } mapping.setConfig(config); mappings.add(mapping); } return mappings; }
@Override public Set<ProtocolMapperModel> getProtocolMappers() { Set<ProtocolMapperModel> mappings = new HashSet<ProtocolMapperModel>(); for (ProtocolMapperEntity entity : this.entity.getProtocolMappers()) { ProtocolMapperModel mapping = new ProtocolMapperModel(); mapping.setId(entity.getId()); mapping.setName(entity.getName()); mapping.setProtocol(entity.getProtocol()); mapping.setProtocolMapper(entity.getProtocolMapper()); Map<String, String> config = new HashMap<String, String>(); if (entity.getConfig() != null) { config.putAll(entity.getConfig()); } mapping.setConfig(config); mappings.add(mapping); } return mappings; }
protected ProtocolMapperModel entityToModel(ProtocolMapperEntity entity) { ProtocolMapperModel mapping = new ProtocolMapperModel(); mapping.setId(entity.getId()); mapping.setName(entity.getName()); mapping.setProtocol(entity.getProtocol()); mapping.setProtocolMapper(entity.getProtocolMapper()); mapping.setConsentRequired(entity.isConsentRequired()); mapping.setConsentText(entity.getConsentText()); Map<String, String> config = new HashMap<String, String>(); if (entity.getConfig() != null) config.putAll(entity.getConfig()); mapping.setConfig(config); return mapping; }
protected ProtocolMapperModel entityToModel(ProtocolMapperEntity entity) { ProtocolMapperModel mapping = new ProtocolMapperModel(); mapping.setId(entity.getId()); mapping.setName(entity.getName()); mapping.setProtocol(entity.getProtocol()); mapping.setProtocolMapper(entity.getProtocolMapper()); mapping.setConsentRequired(entity.isConsentRequired()); mapping.setConsentText(entity.getConsentText()); Map<String, String> config = new HashMap<String, String>(); if (entity.getConfig() != null) config.putAll(entity.getConfig()); mapping.setConfig(config); return mapping; }
@Override public Set<ProtocolMapperModel> getProtocolMappers() { Set<ProtocolMapperModel> result = new HashSet<ProtocolMapperModel>(); for (ProtocolMapperEntity entity : getMongoEntity().getProtocolMappers()) { ProtocolMapperModel mapping = new ProtocolMapperModel(); mapping.setId(entity.getId()); mapping.setName(entity.getName()); mapping.setProtocol(entity.getProtocol()); mapping.setProtocolMapper(entity.getProtocolMapper()); mapping.setConsentRequired(entity.isConsentRequired()); mapping.setConsentText(entity.getConsentText()); Map<String, String> config = new HashMap<String, String>(); if (entity.getConfig() != null) { config.putAll(entity.getConfig()); } mapping.setConfig(config); result.add(mapping); } return result; }
@Override public Set<ProtocolMapperModel> getProtocolMappers() { Set<ProtocolMapperModel> result = new HashSet<ProtocolMapperModel>(); for (ProtocolMapperEntity entity : getMongoEntity().getProtocolMappers()) { ProtocolMapperModel mapping = new ProtocolMapperModel(); mapping.setId(entity.getId()); mapping.setName(entity.getName()); mapping.setProtocol(entity.getProtocol()); mapping.setProtocolMapper(entity.getProtocolMapper()); mapping.setConsentRequired(entity.isConsentRequired()); mapping.setConsentText(entity.getConsentText()); Map<String, String> config = new HashMap<String, String>(); if (entity.getConfig() != null) { config.putAll(entity.getConfig()); } mapping.setConfig(config); result.add(mapping); } return result; }
public static ProtocolMapperModel toModel(ProtocolMapperRepresentation rep) { ProtocolMapperModel model = new ProtocolMapperModel(); model.setId(rep.getId()); model.setName(rep.getName()); model.setConsentRequired(rep.isConsentRequired()); model.setConsentText(rep.getConsentText()); model.setProtocol(rep.getProtocol()); model.setProtocolMapper(rep.getProtocolMapper()); model.setConfig(rep.getConfig()); return model; }