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

extend reconciliation on registries, that are not active

parent ee52ef2b
......@@ -48,9 +48,6 @@ public interface RegisterUserService {
void deleteGroup(GroupEntity group, ServiceEntity service, String executor)
throws RegisterException;
void completeReconciliation(ServiceEntity service, Boolean fullRecon,
Boolean withGroups, String executor);
void updateGroups(Set<GroupEntity> groupUpdateSet, String executor)
throws RegisterException;
......@@ -69,4 +66,7 @@ public interface RegisterUserService {
RegistryEntity registerUser(UserEntity user, ServiceEntity service, String executor,
Boolean sendGroupUpdate, Auditor parentAuditor)
throws RegisterException;
void completeReconciliation(ServiceEntity service, Boolean fullRecon, Boolean withGroups, Boolean onlyActive,
String executor);
}
......@@ -687,8 +687,17 @@ public class RegisterUserServiceImpl implements RegisterUserService {
@Override
@Asynchronous
public void completeReconciliation(ServiceEntity service, Boolean fullRecon, Boolean withGroups, String executor) {
List<RegistryEntity> registryList = registryDao.findByServiceAndStatus(service, RegistryStatus.ACTIVE);
public void completeReconciliation(ServiceEntity service, Boolean fullRecon, Boolean withGroups,
Boolean onlyActive, String executor) {
List<RegistryEntity> registryList;
if (onlyActive) {
registryList = registryDao.findByServiceAndStatus(service, RegistryStatus.ACTIVE);
}
else {
registryList = registryDao.findByService(service);
}
logger.info("Found {} registries for service {}", registryList.size(), service.getName());
......
......@@ -62,11 +62,11 @@ public class ShowServiceBean implements Serializable {
}
}
public String startRecon(Boolean fullRecon, Boolean withGroups) {
registerUserService.completeReconciliation(entity, fullRecon, withGroups, "user-" + sessionManager.getUserId());
public String startRecon(Boolean fullRecon, Boolean withGroups, Boolean onlyActive) {
registerUserService.completeReconciliation(entity, fullRecon, withGroups, onlyActive, "user-" + sessionManager.getUserId());
messageGenerator.addInfoMessage("Job gestartet", "Bitte Log output beachten!");
return ViewIds.SHOW_SERVICE + "?faces-redirect=true&id=" + id;
return ViewIds.SHOW_SERVICE + "?faces-redirect=true&id=" + entity.getId();
}
public ServiceEntity getEntity() {
......
......@@ -178,17 +178,22 @@
<div id="panelInline">
<p:panel header="#{messages.tools}">
<p:commandButton id="recon1" action="#{showServiceBean.startRecon(false, false)}" value="#{messages.reconsiliation}"
ajax="false"/>
<p:commandButton id="recon2" action="#{showServiceBean.startRecon(true, false)}" value="#{messages.full_reconsiliation}"
ajax="false"/>
<p:commandButton id="recon3" action="#{showServiceBean.startRecon(true, true)}" value="#{messages.full_reconsiliation_with_groups}"
ajax="false"/>
<h:link outcome="compare-child-registries.xhtml" value="#{messages.compare_child_registries}">
<f:param name="id" value="#{showServiceBean.entity.id}" />
</h:link>
<div>
<p:commandButton id="recon1" action="#{showServiceBean.startRecon(false, false, true)}" value="#{messages.reconsiliation}"
ajax="false"/>
<p:commandButton id="recon2" action="#{showServiceBean.startRecon(true, false, true)}" value="#{messages.full_reconsiliation}"
ajax="false"/>
<p:commandButton id="recon3" action="#{showServiceBean.startRecon(true, true, true)}" value="#{messages.full_reconsiliation_with_groups}"
ajax="false"/>
</div>
<div>
<p:commandButton id="recon4" action="#{showServiceBean.startRecon(true, false, false)}" value="#{messages.full_reconsiliation_all_status}"
ajax="false"/>
<h:link outcome="compare-child-registries.xhtml" value="#{messages.compare_child_registries}">
<f:param name="id" value="#{showServiceBean.entity.id}" />
</h:link>
</div>
</p:panel>
</div>
</h:form>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment