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 { ...@@ -48,9 +48,6 @@ public interface RegisterUserService {
void deleteGroup(GroupEntity group, ServiceEntity service, String executor) void deleteGroup(GroupEntity group, ServiceEntity service, String executor)
throws RegisterException; throws RegisterException;
void completeReconciliation(ServiceEntity service, Boolean fullRecon,
Boolean withGroups, String executor);
void updateGroups(Set<GroupEntity> groupUpdateSet, String executor) void updateGroups(Set<GroupEntity> groupUpdateSet, String executor)
throws RegisterException; throws RegisterException;
...@@ -69,4 +66,7 @@ public interface RegisterUserService { ...@@ -69,4 +66,7 @@ public interface RegisterUserService {
RegistryEntity registerUser(UserEntity user, ServiceEntity service, String executor, RegistryEntity registerUser(UserEntity user, ServiceEntity service, String executor,
Boolean sendGroupUpdate, Auditor parentAuditor) Boolean sendGroupUpdate, Auditor parentAuditor)
throws RegisterException; throws RegisterException;
void completeReconciliation(ServiceEntity service, Boolean fullRecon, Boolean withGroups, Boolean onlyActive,
String executor);
} }
...@@ -687,8 +687,17 @@ public class RegisterUserServiceImpl implements RegisterUserService { ...@@ -687,8 +687,17 @@ public class RegisterUserServiceImpl implements RegisterUserService {
@Override @Override
@Asynchronous @Asynchronous
public void completeReconciliation(ServiceEntity service, Boolean fullRecon, Boolean withGroups, String executor) { public void completeReconciliation(ServiceEntity service, Boolean fullRecon, Boolean withGroups,
List<RegistryEntity> registryList = registryDao.findByServiceAndStatus(service, RegistryStatus.ACTIVE); 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()); logger.info("Found {} registries for service {}", registryList.size(), service.getName());
......
...@@ -62,11 +62,11 @@ public class ShowServiceBean implements Serializable { ...@@ -62,11 +62,11 @@ public class ShowServiceBean implements Serializable {
} }
} }
public String startRecon(Boolean fullRecon, Boolean withGroups) { public String startRecon(Boolean fullRecon, Boolean withGroups, Boolean onlyActive) {
registerUserService.completeReconciliation(entity, fullRecon, withGroups, "user-" + sessionManager.getUserId()); registerUserService.completeReconciliation(entity, fullRecon, withGroups, onlyActive, "user-" + sessionManager.getUserId());
messageGenerator.addInfoMessage("Job gestartet", "Bitte Log output beachten!"); 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() { public ServiceEntity getEntity() {
......
...@@ -178,17 +178,22 @@ ...@@ -178,17 +178,22 @@
<div id="panelInline"> <div id="panelInline">
<p:panel header="#{messages.tools}"> <p:panel header="#{messages.tools}">
<p:commandButton id="recon1" action="#{showServiceBean.startRecon(false, false)}" value="#{messages.reconsiliation}" <div>
<p:commandButton id="recon1" action="#{showServiceBean.startRecon(false, false, true)}" value="#{messages.reconsiliation}"
ajax="false"/> ajax="false"/>
<p:commandButton id="recon2" action="#{showServiceBean.startRecon(true, false)}" value="#{messages.full_reconsiliation}" <p:commandButton id="recon2" action="#{showServiceBean.startRecon(true, false, true)}" value="#{messages.full_reconsiliation}"
ajax="false"/> ajax="false"/>
<p:commandButton id="recon3" action="#{showServiceBean.startRecon(true, true)}" value="#{messages.full_reconsiliation_with_groups}" <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"/> ajax="false"/>
<h:link outcome="compare-child-registries.xhtml" value="#{messages.compare_child_registries}"> <h:link outcome="compare-child-registries.xhtml" value="#{messages.compare_child_registries}">
<f:param name="id" value="#{showServiceBean.entity.id}" /> <f:param name="id" value="#{showServiceBean.entity.id}" />
</h:link> </h:link>
</div>
</p:panel> </p:panel>
</div> </div>
</h:form> </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