Commit c4cf36b3 authored by michael.simon's avatar michael.simon
Browse files

change most occurenced of RegisterException to UserUpdateException

parent 796b1446
......@@ -28,7 +28,7 @@ public class PFAccountServiceImpl implements PFAccountService {
public PFAccount findById(String id, ServiceEntity serviceEntity) throws RegisterException {
serviceEntity = serviceService.findByIdWithServiceProps(serviceEntity.getId());
PFWorker pfWorker = new PFWorker(new PropertyReader(serviceEntity.getServiceProps()), null);
PFWorker pfWorker = new PFWorker(PropertyReader.newRegisterPropReader(serviceEntity), null);
return pfWorker.getAccountInfoById(id);
}
......@@ -36,7 +36,7 @@ public class PFAccountServiceImpl implements PFAccountService {
public PFAccount findByUsername(String username, ServiceEntity serviceEntity) throws RegisterException {
serviceEntity = serviceService.findByIdWithServiceProps(serviceEntity.getId());
PFWorker pfWorker = new PFWorker(new PropertyReader(serviceEntity.getServiceProps()), null);
PFWorker pfWorker = new PFWorker(PropertyReader.newRegisterPropReader(serviceEntity), null);
return pfWorker.getAccountInfoByUsername(username);
}
......@@ -44,7 +44,7 @@ public class PFAccountServiceImpl implements PFAccountService {
public PFAccount update(PFAccount account, ServiceEntity serviceEntity) throws RegisterException {
serviceEntity = serviceService.findByIdWithServiceProps(serviceEntity.getId());
PFWorker pfWorker = new PFWorker(new PropertyReader(serviceEntity.getServiceProps()), null);
PFWorker pfWorker = new PFWorker(PropertyReader.newRegisterPropReader(serviceEntity), null);
return pfWorker.storeAccount(account);
}
}
......@@ -43,6 +43,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import edu.kit.scc.webreg.audit.Auditor;
import edu.kit.scc.webreg.entity.AuditStatus;
import edu.kit.scc.webreg.exc.PropertyReaderException;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.service.reg.ldap.PropertyReader;
......@@ -67,9 +68,13 @@ public class PFWorker {
public PFWorker(PropertyReader prop, Auditor auditor) throws RegisterException {
this.auditor = auditor;
pfApiUrl = prop.readProp("pf_api_url");
pfApiUsername = prop.readProp("pf_api_username");
pfApiPassword = prop.readProp("pf_api_password");
try {
pfApiUrl = prop.readProp("pf_api_url");
pfApiUsername = prop.readProp("pf_api_username");
pfApiPassword = prop.readProp("pf_api_password");
} catch (PropertyReaderException e) {
throw new RegisterException(e);
}
RequestConfig defaultRequestConfig = RequestConfig.custom()
.setConnectionRequestTimeout(5000)
......
......@@ -29,12 +29,12 @@ public class PowerFolderRegisterWorkflow implements RegisterUserWorkflow, Infota
public void registerUser(UserEntity user, ServiceEntity service,
RegistryEntity registry, Auditor auditor) throws RegisterException {
PropertyReader prop = new PropertyReader(service.getServiceProps());
PropertyReader prop = PropertyReader.newRegisterPropReader(service);
PFWorker pfWorker = new PFWorker(prop, auditor);
String spaceAllowed;
if (prop.hasProp("space_allowed"))
spaceAllowed = prop.readProp("space_allowed");
spaceAllowed = prop.readPropOrNull("space_allowed");
else
spaceAllowed = "" + 1024L * 1024L * 1024L * 10L;
......@@ -70,7 +70,7 @@ public class PowerFolderRegisterWorkflow implements RegisterUserWorkflow, Infota
public void deregisterUser(UserEntity user, ServiceEntity service,
RegistryEntity registry, Auditor auditor) throws RegisterException {
PropertyReader prop = new PropertyReader(service.getServiceProps());
PropertyReader prop = PropertyReader.newRegisterPropReader(service);
PFWorker pfWorker = new PFWorker(prop, auditor);
String userId = registry.getRegistryValues().get("powerfolderId");
......@@ -106,7 +106,7 @@ public class PowerFolderRegisterWorkflow implements RegisterUserWorkflow, Infota
@Override
public Infotainment getInfo(RegistryEntity registry, UserEntity user, ServiceEntity service) throws RegisterException {
PropertyReader prop = new PropertyReader(service.getServiceProps());
PropertyReader prop = PropertyReader.newRegisterPropReader(service);
PFWorker pfWorker = new PFWorker(prop, null);
......@@ -136,5 +136,4 @@ public class PowerFolderRegisterWorkflow implements RegisterUserWorkflow, Infota
return info;
}
}
......@@ -9,7 +9,8 @@ import edu.kit.scc.webreg.entity.AuditStatus;
import edu.kit.scc.webreg.entity.as.ASUserAttrEntity;
import edu.kit.scc.webreg.entity.as.ASUserAttrValueEntity;
import edu.kit.scc.webreg.entity.as.ASUserAttrValueStringEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.PropertyReaderException;
import edu.kit.scc.webreg.exc.UserUpdateException;
import edu.kit.scc.webreg.service.reg.ldap.PropertyReader;
public abstract class AbstractAttributeSourceWorkflow implements AttributeSourceWorkflow {
......@@ -21,8 +22,12 @@ public abstract class AbstractAttributeSourceWorkflow implements AttributeSource
protected PropertyReader prop;
public void init(ASUserAttrEntity asUserAttr)
throws RegisterException {
prop = new PropertyReader(asUserAttr.getAttributeSource().getAsProps());
throws UserUpdateException {
try {
prop = new PropertyReader(asUserAttr.getAttributeSource().getAsProps());
} catch (PropertyReaderException e) {
throw new UserUpdateException(e);
}
}
protected Boolean createOrUpdateValue(String key, Object o, ASUserAttrEntity asUserAttr, ASUserAttrValueDao asValueDao, AttributeSourceAuditor auditor) {
......
......@@ -5,11 +5,11 @@ import java.io.Serializable;
import edu.kit.scc.webreg.audit.AttributeSourceAuditor;
import edu.kit.scc.webreg.dao.as.ASUserAttrValueDao;
import edu.kit.scc.webreg.entity.as.ASUserAttrEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
public interface AttributeSourceWorkflow extends Serializable {
Boolean pollUserAttributes(ASUserAttrEntity asUserAttr,
ASUserAttrValueDao asValueDao, AttributeSourceAuditor auditor)
throws RegisterException;
throws UserUpdateException;
}
......@@ -31,7 +31,8 @@ import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.entity.as.ASUserAttrEntity;
import edu.kit.scc.webreg.entity.as.AttributeSourceEntity;
import edu.kit.scc.webreg.entity.as.AttributeSourceQueryStatus;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.PropertyReaderException;
import edu.kit.scc.webreg.exc.UserUpdateException;
public class HttpUrlSingleAttributeSource extends
AbstractAttributeSourceWorkflow {
......@@ -39,16 +40,21 @@ public class HttpUrlSingleAttributeSource extends
private static final long serialVersionUID = 1L;
@Override
public Boolean pollUserAttributes(ASUserAttrEntity asUserAttr, ASUserAttrValueDao asValueDao, AttributeSourceAuditor auditor) throws RegisterException {
public Boolean pollUserAttributes(ASUserAttrEntity asUserAttr, ASUserAttrValueDao asValueDao, AttributeSourceAuditor auditor) throws UserUpdateException {
Boolean changed = false;
init(asUserAttr);
String urlTemplate;
try {
urlTemplate = prop.readProp("url_template");
} catch (PropertyReaderException e1) {
throw new UserUpdateException(e1);
}
UserEntity user = asUserAttr.getUser();
AttributeSourceEntity attributeSource = asUserAttr.getAttributeSource();
String urlTemplate = prop.readProp("url_template");
VelocityEngine engine = new VelocityEngine();
engine.setProperty("runtime.log.logsystem.log4j.logger", "root");
......@@ -129,9 +135,9 @@ public class HttpUrlSingleAttributeSource extends
asUserAttr.setQueryMessage(e.getMessage());
}
} catch (ParseException e) {
throw new RegisterException(e);
throw new UserUpdateException(e);
} catch (IOException e) {
throw new RegisterException(e);
throw new UserUpdateException(e);
}
}
}
......
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.exc;
public class PropertyReaderException extends Exception {
private static final long serialVersionUID = 1L;
public PropertyReaderException() {
super();
}
public PropertyReaderException(String arg0, Throwable arg1) {
super(arg0, arg1);
}
public PropertyReaderException(String arg0) {
super(arg0);
}
public PropertyReaderException(Throwable arg0) {
super(arg0);
}
}
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.exc;
public class UserUpdateException extends Exception {
private static final long serialVersionUID = 1L;
public UserUpdateException() {
super();
}
public UserUpdateException(String arg0, Throwable arg1) {
super(arg0, arg1);
}
public UserUpdateException(String arg0) {
super(arg0);
}
public UserUpdateException(Throwable arg0) {
super(arg0);
}
}
......@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
import edu.kit.scc.webreg.audit.Auditor;
import edu.kit.scc.webreg.bootstrap.ApplicationConfig;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
import edu.kit.scc.webreg.service.UserServiceHook;
public class HttpCallbackHook implements UserServiceHook {
......@@ -54,13 +54,13 @@ public class HttpCallbackHook implements UserServiceHook {
@Override
public void preUpdateUserFromAttribute(UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor)
throws RegisterException {
throws UserUpdateException {
}
@Override
public void postUpdateUserFromAttribute(UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor)
throws RegisterException {
throws UserUpdateException {
logger.debug("Calling postUpdateUserFromAttribute for Hook {}", getClass().getName());
......
......@@ -25,13 +25,13 @@ import edu.kit.scc.webreg.entity.GroupEntity;
import edu.kit.scc.webreg.entity.HomeOrgGroupEntity;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.entity.UserGroupEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
import edu.kit.scc.webreg.service.GroupServiceHook;
import edu.kit.scc.webreg.service.impl.AttributeMapHelper;
import edu.vt.middleware.ldap.Ldap;
import edu.vt.middleware.ldap.LdapConfig;
import edu.vt.middleware.ldap.SearchFilter;
import edu.vt.middleware.ldap.LdapConfig.SearchScope;
import edu.vt.middleware.ldap.SearchFilter;
import edu.vt.middleware.ldap.handler.ConnectionHandler.ConnectionStrategy;
public class LdapUidNumberGroupHook implements GroupServiceHook {
......@@ -49,13 +49,13 @@ public class LdapUidNumberGroupHook implements GroupServiceHook {
@Override
public HomeOrgGroupEntity preUpdateUserPrimaryGroupFromAttribute(HomeOrgGroupDao dao, GroupDao groupDao, HomeOrgGroupEntity group, UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups) throws RegisterException {
Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups) throws UserUpdateException {
logger.info("LDAP-User Detected. Taking Primary Group from assertion");
if (attributeMap.get("urn:oid:1.3.6.1.1.1.1.1") == null) {
if (user.getPrimaryGroup() == null) {
throw new RegisterException("GID Number Attribut ist nicht gesetzt und User hat keine primäre Gruppe");
throw new UserUpdateException("GID Number Attribut ist nicht gesetzt und User hat keine primäre Gruppe");
}
else {
logger.warn("User {} hat keine Gid in SAML Assertion, aber schon eine primäre Gruppe ({}).", user.getEppn(), user.getPrimaryGroup().getName());
......@@ -163,13 +163,13 @@ public class LdapUidNumberGroupHook implements GroupServiceHook {
@Override
public HomeOrgGroupEntity postUpdateUserPrimaryGroupFromAttribute(HomeOrgGroupDao dao, GroupDao groupDao, HomeOrgGroupEntity group, UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups) throws RegisterException {
Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups) throws UserUpdateException {
return group;
}
@Override
public void preUpdateUserSecondaryGroupFromAttribute(HomeOrgGroupDao dao, GroupDao groupDao, UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups) throws RegisterException {
Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups) throws UserUpdateException {
logger.info("LDAP-User Detected. Taking Secondary Groups from assertion");
......@@ -325,7 +325,7 @@ public class LdapUidNumberGroupHook implements GroupServiceHook {
@Override
public void postUpdateUserSecondaryGroupFromAttribute(HomeOrgGroupDao dao, GroupDao groupDao, UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups) throws RegisterException {
Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups) throws UserUpdateException {
logger.debug("Empty postUpdateUserSecondaryGroupFromAttribute called");
}
......
......@@ -10,7 +10,7 @@ import edu.kit.scc.webreg.audit.Auditor;
import edu.kit.scc.webreg.bootstrap.ApplicationConfig;
import edu.kit.scc.webreg.entity.AuditStatus;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
import edu.kit.scc.webreg.service.UserServiceHook;
import edu.kit.scc.webreg.service.impl.AttributeMapHelper;
......@@ -29,7 +29,7 @@ public class UidNumberFromAssertionUserHook implements UserServiceHook {
@Override
public void preUpdateUserFromAttribute(UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor) throws RegisterException {
Map<String, List<Object>> attributeMap, Auditor auditor) throws UserUpdateException {
if (isResponsibleIntern(user)) {
logger.info("UidNumberFromAssertion-User Detected. Taking UID from assertion");
......@@ -47,7 +47,7 @@ public class UidNumberFromAssertionUserHook implements UserServiceHook {
}
else {
if (user.getUidNumber() == null) {
throw new RegisterException("UID Number Attribut ist nicht gesetzt und User hat keine");
throw new UserUpdateException("UID Number Attribut ist nicht gesetzt und User hat keine");
}
// else: Es kommt keine uidNumber (User ist geloescht), aber user hat schon eine
}
......@@ -57,7 +57,7 @@ public class UidNumberFromAssertionUserHook implements UserServiceHook {
@Override
public void postUpdateUserFromAttribute(UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor) throws RegisterException {
Map<String, List<Object>> attributeMap, Auditor auditor) throws UserUpdateException {
}
......
......@@ -35,7 +35,7 @@ import edu.kit.scc.webreg.entity.ServiceGroupFlagEntity;
import edu.kit.scc.webreg.entity.ServiceGroupStatus;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.entity.UserGroupEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
import edu.kit.scc.webreg.service.GroupServiceHook;
import edu.kit.scc.webreg.service.SerialService;
import edu.kit.scc.webreg.service.ServiceGroupFlagService;
......@@ -57,7 +57,7 @@ public class UserStoreLocalGroupHook implements GroupServiceHook {
HomeOrgGroupDao dao, GroupDao groupDao, HomeOrgGroupEntity group,
UserEntity user, Map<String, List<Object>> attributeMap,
Auditor auditor, Set<GroupEntity> changedGroups)
throws RegisterException {
throws UserUpdateException {
return group;
}
......@@ -66,7 +66,7 @@ public class UserStoreLocalGroupHook implements GroupServiceHook {
HomeOrgGroupDao dao, GroupDao groupDao, HomeOrgGroupEntity group,
UserEntity user, Map<String, List<Object>> attributeMap,
Auditor auditor, Set<GroupEntity> changedGroups)
throws RegisterException {
throws UserUpdateException {
return group;
}
......@@ -74,14 +74,14 @@ public class UserStoreLocalGroupHook implements GroupServiceHook {
public void preUpdateUserSecondaryGroupFromAttribute(HomeOrgGroupDao dao,
GroupDao groupDao, UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor,
Set<GroupEntity> changedGroups) throws RegisterException {
Set<GroupEntity> changedGroups) throws UserUpdateException {
}
@Override
public void postUpdateUserSecondaryGroupFromAttribute(HomeOrgGroupDao dao,
GroupDao groupDao, UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor,
Set<GroupEntity> changedGroups) throws RegisterException {
Set<GroupEntity> changedGroups) throws UserUpdateException {
long start = System.currentTimeMillis();
......
......@@ -20,7 +20,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
import edu.kit.scc.webreg.service.UserService;
import edu.kit.scc.webreg.service.UserUpdateService;
......@@ -80,7 +80,7 @@ public class UpdateAllUserFromIdp extends AbstractExecutableJob {
try {
logger.info("Updating user {}", user.getEppn());
userUpdateService.updateUserFromIdp(user);
} catch (RegisterException e) {
} catch (UserUpdateException e) {
logger.warn("Could not update user {}: {}", user.getEppn(), e);
}
}
......
......@@ -21,23 +21,23 @@ import edu.kit.scc.webreg.dao.HomeOrgGroupDao;
import edu.kit.scc.webreg.entity.GroupEntity;
import edu.kit.scc.webreg.entity.HomeOrgGroupEntity;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
public interface GroupServiceHook {
void setAppConfig(ApplicationConfig appConfig);
HomeOrgGroupEntity preUpdateUserPrimaryGroupFromAttribute(HomeOrgGroupDao dao, GroupDao groupDao, HomeOrgGroupEntity group, UserEntity user, Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups)
throws RegisterException;
throws UserUpdateException;
HomeOrgGroupEntity postUpdateUserPrimaryGroupFromAttribute(HomeOrgGroupDao dao, GroupDao groupDao, HomeOrgGroupEntity group, UserEntity user, Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups)
throws RegisterException;
throws UserUpdateException;
void preUpdateUserSecondaryGroupFromAttribute(HomeOrgGroupDao dao, GroupDao groupDao, UserEntity user, Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups)
throws RegisterException;
throws UserUpdateException;
void postUpdateUserSecondaryGroupFromAttribute(HomeOrgGroupDao dao, GroupDao groupDao, UserEntity user, Map<String, List<Object>> attributeMap, Auditor auditor, Set<GroupEntity> changedGroups)
throws RegisterException;
throws UserUpdateException;
boolean isPrimaryResponsible(UserEntity user, Map<String, List<Object>> attributeMap);
......
......@@ -18,7 +18,7 @@ import edu.kit.scc.webreg.audit.Auditor;
import edu.kit.scc.webreg.entity.GroupEntity;
import edu.kit.scc.webreg.entity.HomeOrgGroupEntity;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
public interface HomeOrgGroupService extends BaseService<HomeOrgGroupEntity, Long> {
......@@ -30,7 +30,7 @@ public interface HomeOrgGroupService extends BaseService<HomeOrgGroupEntity, Lon
Set<GroupEntity> updateGroupsForUser(UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor)
throws RegisterException;
throws UserUpdateException;
HomeOrgGroupEntity persistWithServiceFlags(HomeOrgGroupEntity entity);
......
......@@ -16,14 +16,14 @@ import java.util.Map;
import edu.kit.scc.webreg.entity.SamlIdpMetadataEntity;
import edu.kit.scc.webreg.entity.SamlSpConfigurationEntity;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
public interface UserCreateService {
UserEntity createUser(UserEntity user, Map<String, List<Object>> attributeMap, String executor)
throws RegisterException;
throws UserUpdateException;
UserEntity preCreateUser(SamlIdpMetadataEntity idpEntity, SamlSpConfigurationEntity spEntity, String persistentId,
String locale, Map<String, List<Object>> attributeMap) throws RegisterException;
String locale, Map<String, List<Object>> attributeMap) throws UserUpdateException;
}
......@@ -17,7 +17,7 @@ import java.util.Map;
import edu.kit.scc.webreg.audit.Auditor;
import edu.kit.scc.webreg.entity.GroupEntity;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
public interface UserService extends BaseService<UserEntity, Long> {
......@@ -29,11 +29,11 @@ public interface UserService extends BaseService<UserEntity, Long> {
UserEntity findByIdWithAll(Long id);
boolean updateUserFromAttribute(UserEntity user,
Map<String, List<Object>> attributeMap, Auditor auditor) throws RegisterException;
Map<String, List<Object>> attributeMap, Auditor auditor) throws UserUpdateException;
boolean updateUserFromAttribute(UserEntity user,
Map<String, List<Object>> attributeMap, boolean withoutUidNumber, Auditor auditor)
throws RegisterException;
throws UserUpdateException;
void convertLegacyUsers();
......
......@@ -16,17 +16,17 @@ import java.util.Map;
import edu.kit.scc.webreg.audit.Auditor;
import edu.kit.scc.webreg.bootstrap.ApplicationConfig;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
public interface UserServiceHook {
void setAppConfig(ApplicationConfig appConfig);
void preUpdateUserFromAttribute(UserEntity user, Map<String, List<Object>> attributeMap, Auditor auditor)
throws RegisterException;
throws UserUpdateException;
void postUpdateUserFromAttribute(UserEntity user, Map<String, List<Object>> attributeMap, Auditor auditor)
throws RegisterException;
throws UserUpdateException;
boolean isResponsible(UserEntity user, Map<String, List<Object>> attributeMap);
......
......@@ -17,24 +17,24 @@ import org.opensaml.saml2.core.Assertion;
import edu.kit.scc.webreg.entity.ServiceEntity;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.exc.RegisterException;
import edu.kit.scc.webreg.exc.UserUpdateException;
public interface UserUpdateService {
UserEntity updateUserFromIdp(UserEntity user) throws RegisterException;
UserEntity updateUserFromIdp(UserEntity user) throws UserUpdateException;
UserEntity updateUser(UserEntity user,
Map<String, List<Object>> attributeMap, String executor,
ServiceEntity service) throws RegisterException;
ServiceEntity service) throws UserUpdateException;
UserEntity updateUser(UserEntity user, Assertion assertion,
String executor, ServiceEntity service) throws RegisterException;
String executor, ServiceEntity service) throws UserUpdateException;
UserEntity updateUserFromIdp(UserEntity user, ServiceEntity service)
throws RegisterException;
throws UserUpdateException;
UserEntity updateUser(UserEntity user,
Map<String, List<Object>> attributeMap, String executor)
throws RegisterException;
throws UserUpdateException;
}
......@@ -40,7 +40,7 @@ import edu.kit.scc.webreg.entity.UserGroupEntity;
import edu.kit.scc.webreg.event.EventSubmitter;