diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainService.java index bb5b33feb..bb55c55e5 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainService.java @@ -20,7 +20,6 @@ package ch.puzzle.itc.mobiliar.business.domain.applist; -import java.util.Collections; import java.util.List; import javax.ejb.Stateless; @@ -38,21 +37,16 @@ public class ApplistScreenDomainService { @Inject private ApplistScreenDomainServiceQueries queries; - List getApplicationServerResources(String filter, Integer maxResults, List myAMW) { - if (myAMW != null && myAMW.isEmpty()) { - //there is a myAMW-filter, but it doesn't contain any values - so we don't have to ask the db - we know that there is an empty result - return Collections.emptyList(); - } - return queries.doFetchApplicationServersWithApplicationsOrderedByAppServerNameCaseInsensitive(filter, myAMW, maxResults); + List getApplicationServerResources(String filter, Integer maxResults) { + return queries.doFetchApplicationServersWithApplicationsOrderedByAppServerNameCaseInsensitive(filter, maxResults); } - public List getAppServerResourcesWithApplications(String filter, Integer maxResults, - List myAmw, boolean withAppServerContainer) { - List appServerList = getApplicationServerResources(filter, maxResults, myAmw); + public List getAppServerResourcesWithApplications(String filter, Integer maxResults, boolean withAppServerContainer) { + List appServerList = getApplicationServerResources(filter, maxResults); for (ResourceEntity as : appServerList) { if (as.getName().equals(ApplicationServerContainer.APPSERVERCONTAINER.getDisplayName())) { - if (!withAppServerContainer || as.getConsumedMasterRelations().size() == 0) { + if (!withAppServerContainer || as.getConsumedMasterRelations().isEmpty()) { appServerList.remove(as); break; } diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceQueries.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceQueries.java index aff9bbfe1..9ecf83949 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceQueries.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceQueries.java @@ -42,7 +42,7 @@ public class ApplistScreenDomainServiceQueries { @Inject private DatabaseUtil dbUtil; - List doFetchApplicationServersWithApplicationsOrderedByAppServerNameCaseInsensitive(String nameFilter, List myAmwIds, Integer maxResult) { + List doFetchApplicationServersWithApplicationsOrderedByAppServerNameCaseInsensitive(String nameFilter, Integer maxResult) { CriteriaBuilder cb = entityManager.getCriteriaBuilder(); Predicate p; boolean nameFilterIsEmpty = nameFilter == null || nameFilter.trim().isEmpty(); @@ -64,13 +64,6 @@ List doFetchApplicationServersWithApplicationsOrderedByAppServer cb.like(cb.lower(appServer.get("name")), nameFilterLower, JpaWildcardConverter.ESCAPE_CHARACTER), cb.like(cb.lower(app.get("name")), nameFilterLower, JpaWildcardConverter.ESCAPE_CHARACTER))); } - if (myAmwIds != null) { - p = cb.and(p, - cb.or( - appServer.get("resourceGroup").get("id").in(myAmwIds), - app.get("resourceGroup").get("id").in(myAmwIds))); - } - q.where(p); q.distinct(true); diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterService.java index 46bee23ea..7d784f131 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterService.java @@ -48,20 +48,10 @@ public void setLog(Logger log) { this.log = log; } - - public static final String MY_AMW = "myAmw"; - protected static final String SPACE_STRING = " "; private static final String WHERE = "where"; - public void appendWhereAndMyAmwParameter(List myAmw, StringBuilder stringQuery, String entityDependantMyAmwParameterQl) { - if (myAmw != null && !myAmw.isEmpty()) { - appendWhereIfNotAlreadyExists(stringQuery); - stringQuery.append(entityDependantMyAmwParameterQl); - } - } - /** * * @param stringQuery @@ -88,7 +78,7 @@ public Query addFilterAndCreateQuery(StringBuilder stringQuery, List 0) { - setzeWhereUndAndStatementsZuQuery(stringQuery); + appendWhereIfNotAlreadyExists(stringQuery); stringQuery.append('(').append(filterQuery).append(')'); } } @@ -183,16 +173,6 @@ private String extractJoiningtableForFilter(List filters) { return (uniqueJoiningString.length() == 0) ? "" : (SPACE_STRING + uniqueJoiningString); } - private void setzeWhereUndAndStatementsZuQuery(StringBuilder stringQuery) { - appendWhereIfNotAlreadyExists(stringQuery); - // Wenn die query bereits mit einer Klammer endet, bedeutet dies, - // dass ein myAmw-Filter gesetzt ist und die zusätzlichen Filter - // über ein "and" hinzugefügt werden müssen. - if (stringQuery.toString().endsWith(") ")) { - stringQuery.append("and "); - } - } - private void appendWhereIfNotAlreadyExists(StringBuilder stringQuery) { if (!stringQuery.toString().contains(WHERE)) { stringQuery.append(WHERE + SPACE_STRING); @@ -289,10 +269,7 @@ protected void createQueryForBooleanTypeWithoutAddingParameterToParameterMap(Str } } - public Query setParameterToQuery(Integer startIndex, Integer maxResults, List myAmw, Query query) { - if (myAmw != null && !myAmw.isEmpty()) { - query.setParameter(MY_AMW, myAmw); - } + public Query setParameterToQuery(Integer startIndex, Integer maxResults, Query query) { if (startIndex != null) { query.setFirstResult(startIndex); } diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelations.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelations.java index 49d069f44..523d98485 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelations.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelations.java @@ -54,14 +54,12 @@ public class ResourceRelations { public List getAppServersWithApplications(String filter, Integer maxResults, ReleaseEntity release) { UserSettingsEntity userSettings = userSettingsService.getUserSettings(permissionService.getCurrentUserName()); - List myAMWFilter = null; - List appServersWithAllApplications = applistScreenDomainService.getAppServerResourcesWithApplications(filter, maxResults, myAMWFilter, true); - return filterAppServersByRelease(release, appServersWithAllApplications, myAMWFilter); + List appServersWithAllApplications = applistScreenDomainService.getAppServerResourcesWithApplications(filter, maxResults, true); + return filterAppServersByRelease(release, appServersWithAllApplications); } @TransactionAttribute(TransactionAttributeType.REQUIRED) - List filterAppServersByRelease(ReleaseEntity release, - List appServersWithAllApplications, List myAMWFilter) { + List filterAppServersByRelease(ReleaseEntity release, List appServersWithAllApplications) { // filter app server releases Set idLookup = new HashSet<>(); List result = new ArrayList<>(); @@ -74,7 +72,7 @@ List filterAppServersByRelease(ReleaseEntity release, idLookup.add(as.getResourceGroup().getId()); ResourceWithRelations asWithApps = new ResourceWithRelations(asForRelease); - filterApplicationsByRelease(release, asForRelease, asWithApps, myAMWFilter); + filterApplicationsByRelease(release, asForRelease, asWithApps); result.add(asWithApps); } } @@ -83,18 +81,15 @@ List filterAppServersByRelease(ReleaseEntity release, } @TransactionAttribute(TransactionAttributeType.REQUIRED) - void filterApplicationsByRelease(ReleaseEntity release, ResourceEntity as, - ResourceWithRelations asWithApps, List myAMWFilter) { + void filterApplicationsByRelease(ReleaseEntity release, ResourceEntity as, ResourceWithRelations asWithApps) { List list = as.getConsumedRelatedResourcesByResourceType(DefaultResourceTypeDefinition.APPLICATION); for (ResourceEntity r : list) { - if(myAMWFilter==null || myAMWFilter.contains(r.getResourceGroup().getId())) { ResourceEntity rel = dependencyResolverService .getResourceEntityForRelease(r.getResourceGroup(), release); if (rel != null && !asWithApps.getRelatedResources().contains(rel)) { asWithApps.getRelatedResources().add(rel); } - } } } } diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceService.java index 048e761e1..70f938a26 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceService.java @@ -64,10 +64,9 @@ public ResourceGroupEntity getById(int id) { /** * @param resourceTypeName - * @param myAmw * @return */ - public List loadGroupsForTypeName(String resourceTypeName, List myAmw) { + public List loadGroupsForTypeName(String resourceTypeName) { List result = new ArrayList<>(); CriteriaBuilder cb = entityManager.getCriteriaBuilder(); @@ -76,21 +75,12 @@ public List loadGroupsForTypeName(String resourceTypeName, r.fetch("resources"); Join resources = r.join("resources"); Predicate typeNamePred = cb.equal(resources.get("resourceType").get("name"), resourceTypeName); - Predicate asContainerPred = cb.notEqual(resources.get("name"), - ApplicationServerContainer.APPSERVERCONTAINER.getDisplayName()); - - if (myAmw != null && !myAmw.isEmpty()) { - Predicate myAmwPred = r.get("id").in(myAmw); - q.where(cb.and(cb.and(typeNamePred, asContainerPred), myAmwPred)); - } - else { - q.where(cb.and(typeNamePred, asContainerPred)); - } + Predicate asContainerPred = cb.notEqual(resources.get("name"), ApplicationServerContainer.APPSERVERCONTAINER.getDisplayName()); + q.where(cb.and(typeNamePred, asContainerPred)); q.distinct(true); result = entityManager.createQuery(q).getResultList(); - return result; } diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepository.java index 2583c0a62..2d90320b0 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepository.java @@ -83,7 +83,6 @@ public ResourceGroupEntity getResourceGroupForCreateDeploy(Integer groupId) { /** * @param resourceTypeName - * @param myAmw * @param fetchResources determines if resources fetched * @return a list of Groups */ diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestService.java index 28de9e802..df9f2f6bb 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestService.java @@ -104,17 +104,14 @@ public List getAllApplications(){ public Tuple, Integer> getFilteredShakedownTests(boolean doPageingCalculation, Integer startIndex, Integer maxResults, - List filter, String colToSort, Sort.SortingDirectionType sortingDirection, List myAMWFilter) { + List filter, String colToSort, Sort.SortingDirectionType sortingDirection) { Integer totalItemsForCurrentFilter = null; StringBuilder stringQuery = new StringBuilder(); - String baseQuery; + String baseQuery = null; stringQuery.append("from " + SHAKEDOWN_ENTITY_QL + " " + SHAKEDOWN_TEST_QL_ALIAS + " "); - commonFilterService.appendWhereAndMyAmwParameter(myAMWFilter, stringQuery, getEntityDependantMyAmwParameterQl()); - baseQuery = stringQuery.toString(); - boolean lowerSortCol = ShakedownTestFilterTypes.APPSERVER_NAME.getFilterTabColumnName().equals(colToSort); Sort.SortBuilder builder = Sort.builder(); @@ -125,7 +122,7 @@ public Tuple, Integer> getFilteredShakedownTests(boolea Query query = commonFilterService.addFilterAndCreateQuery(stringQuery, filter, builder.build(), false, false); - query = commonFilterService.setParameterToQuery(startIndex, maxResults, myAMWFilter, query); + query = commonFilterService.setParameterToQuery(startIndex, maxResults, query); // some stuff may be lazy loaded List resultList = query.getResultList(); @@ -137,17 +134,13 @@ public Tuple, Integer> getFilteredShakedownTests(boolea String countQueryString = "select count(" + SHAKEDOWN_TEST_QL_ALIAS + ".id) " + baseQuery; Query countQuery = commonFilterService.addFilterAndCreateQuery(new StringBuilder(countQueryString), filter, Sort.nothing(), false, false); - commonFilterService.setParameterToQuery(null, null, myAMWFilter, countQuery); + commonFilterService.setParameterToQuery(null, null, countQuery); totalItemsForCurrentFilter = ((Long) countQuery.getSingleResult()).intValue(); } return new Tuple<>(shakedownTests, totalItemsForCurrentFilter); } - - private String getEntityDependantMyAmwParameterQl() { - return "(" + GROUP_QL + ".id in (:" + CommonFilterService.MY_AMW + ")) "; - } @HasPermission(permission = Permission.SHAKEDOWNTEST, action = Action.CREATE) public Integer createShakedownTestOrderReturnsTrackingId(List shakedownTestOrder) { diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceTest.java index 9926ca29a..c3b90cb9f 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceTest.java @@ -27,7 +27,6 @@ import org.mockito.InjectMocks; import org.mockito.MockitoAnnotations; -import java.util.Collections; import java.util.List; public class ApplistScreenDomainServiceTest { @@ -42,24 +41,22 @@ public void before() { } /** - * Ensure, that there is an empty list resulting when asking with an empty myamw-filter (which means "my amw filter on, but no favorite resources available") * @throws Exception */ @Test - public void testGetApplicationServersWithEmptyMyAMWFilter() throws Exception { + public void testGetApplicationServers() throws Exception { List applicationServers = applistScreenDomainService - .getAppServerResourcesWithApplications("*", 42, Collections.emptyList(), true); + .getAppServerResourcesWithApplications("*", 42, true); Assert.assertTrue(applicationServers.isEmpty()); } /** - * Ensure, that there is an empty list resulting when asking with an empty myamw-filter (which means "my amw filter on, but no favorite resources available") * @throws Exception */ @Test - public void testGetApplicationServerResourcesWithNull() throws Exception { + public void testGetApplicationServerResources() throws Exception { List applicationServers = applistScreenDomainService - .getApplicationServerResources("*", 42, Collections.emptyList()); + .getApplicationServerResources("*", 42); Assert.assertTrue(applicationServers.isEmpty()); } } \ No newline at end of file diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsIntegrationTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsIntegrationTest.java index 3b0813290..4b8c9db6c 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsIntegrationTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsIntegrationTest.java @@ -119,7 +119,7 @@ public void before() { entityManager.persist(asRel2.addConsumedResourceRelation(appRel1, resRelType, null, ForeignableOwner.AMW)); entityManager.persist(asRel2.addConsumedResourceRelation(appRel2, resRelType, null, ForeignableOwner.AMW)); Mockito.when(applistScreenDomainService.getAppServerResourcesWithApplications(Mockito.anyString(), - Mockito.anyInt(), Mockito.anyList(), Mockito.anyBoolean())).thenReturn( + Mockito.anyInt(), Mockito.anyBoolean())).thenReturn( Arrays.asList(asRel1,asRel2)); service.dependencyResolverService = dependencyResolver; } diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsTest.java index edb7724cf..876ce947b 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsTest.java @@ -86,9 +86,9 @@ public void testGetAppServersWithApplications() throws Exception { Mockito.when(userSettingsService.getUserSettings(Mockito.anyString())).thenReturn(userSettings); List aslist = Arrays.asList(as); Mockito.when(applistScreenDomainService.getAppServerResourcesWithApplications(Mockito.isNull(), - Mockito.isNull(), Mockito.isNull(), Mockito.anyBoolean())).thenReturn(aslist); + Mockito.isNull(), Mockito.anyBoolean())).thenReturn(aslist); service.getAppServersWithApplications(null, null, release); - Mockito.verify(service).filterAppServersByRelease(release, aslist, null); + Mockito.verify(service).filterAppServersByRelease(release, aslist); } @Test @@ -104,12 +104,10 @@ public Void answer(InvocationOnMock invocation) { return null; } }).when(service).filterApplicationsByRelease(Mockito.any(ReleaseEntity.class), - Mockito.any(ResourceEntity.class), Mockito.any(ResourceWithRelations.class), - Mockito.any(List.class)); + Mockito.any(ResourceEntity.class), Mockito.any(ResourceWithRelations.class)); //when - List resources = service.filterAppServersByRelease(release, applicationServers, - null); + List resources = service.filterAppServersByRelease(release, applicationServers); //then Assert.assertEquals(1, resources.size()); @@ -118,32 +116,15 @@ public Void answer(InvocationOnMock invocation) { } @Test - public void testFilterApplicationsByReleaseNoMyAmw() throws Exception { - ResourceWithRelations resourceWithRelations = doTestFilterApplicationsByRelease(5, null); + public void testFilterApplicationsByRelease() throws Exception { + ResourceWithRelations resourceWithRelations = doTestFilterApplicationsByRelease(5); //then Assert.assertEquals(1, resourceWithRelations.getRelatedResources().size()); Assert.assertEquals(resourceWithRelations.getRelatedResources().get(0), app); } - @Test - public void testFilterApplicationsByReleaseWithMyAMWFilterOK() throws Exception { - ResourceWithRelations resourceWithRelations = doTestFilterApplicationsByRelease(5, Arrays.asList(5)); - - //then - Assert.assertEquals(1, resourceWithRelations.getRelatedResources().size()); - Assert.assertEquals(resourceWithRelations.getRelatedResources().get(0), app); - } - - @Test - public void testFilterApplicationsByReleaseWithMyAMWFilterNOK() throws Exception { - ResourceWithRelations resourceWithRelations = doTestFilterApplicationsByRelease(5, Arrays.asList(6)); - - //then - Assert.assertTrue(resourceWithRelations.getRelatedResources().isEmpty()); - } - - private ResourceWithRelations doTestFilterApplicationsByRelease(int appId, List myAmw) + private ResourceWithRelations doTestFilterApplicationsByRelease(int appId) throws Exception { //given Mockito.when(as.getConsumedRelatedResourcesByResourceType(Mockito.any( @@ -157,7 +138,7 @@ private ResourceWithRelations doTestFilterApplicationsByRelease(int appId, List< Mockito.when(appGrp.getId()).thenReturn(appId); //when - service.filterApplicationsByRelease(release, as, resourceWithRelations, myAmw); + service.filterApplicationsByRelease(release, as, resourceWithRelations); return resourceWithRelations; } } \ No newline at end of file diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceServiceTest.java index 44cb6b20c..d329d2ced 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceServiceTest.java @@ -38,7 +38,6 @@ import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; -import java.util.ArrayList; import java.util.List; import static org.junit.Assert.*; @@ -104,36 +103,6 @@ private void init() { entityManager.persist(asContainer); } - - @Test - public void test_loadGroupsForTypeName_myAmw() { - // given - init(); - - List myAmw = new ArrayList(); - myAmw.add(resource1.getId()); - myAmw.add(resource4.getId()); - - // when - List result = service.loadGroupsForTypeName(DefaultResourceTypeDefinition.APPLICATIONSERVER.name(), myAmw); - - // then - assertNotNull(result); - assertEquals(1, result.size()); - assertEquals(resource1.getId(), result.iterator().next().getId()); - - myAmw.add(resource3.getId()); - - // when - result = service.loadGroupsForTypeName(DefaultResourceTypeDefinition.APPLICATIONSERVER.name(), myAmw); - - // then - assertNotNull(result); - assertEquals(2, result.size()); - assertTrue(result.contains(resource1.getResourceGroup())); - assertTrue(result.contains(resource4.getResourceGroup())); - } - @Test public void test_loadGroupsForTypeName() { // given @@ -141,7 +110,7 @@ public void test_loadGroupsForTypeName() { // when List result = service.loadGroupsForTypeName( - DefaultResourceTypeDefinition.APPLICATIONSERVER.name(), null); + DefaultResourceTypeDefinition.APPLICATIONSERVER.name()); // then assertNotNull(result); diff --git a/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/applist/CreateApplicationForAsPopup.java b/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/applist/CreateApplicationForAsPopup.java index 8b3280aa2..dc7e7423d 100644 --- a/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/applist/CreateApplicationForAsPopup.java +++ b/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/applist/CreateApplicationForAsPopup.java @@ -128,7 +128,7 @@ public void setAppServerGroupId(Integer appServerGroupId) { private Set getApplicationServerGroupsForSelectBox(){ SortedSet groups = new TreeSet<>(); List result; - result = resourceGroupService.loadGroupsForTypeName(DefaultResourceTypeDefinition.APPLICATIONSERVER.name(), null); + result = resourceGroupService.loadGroupsForTypeName(DefaultResourceTypeDefinition.APPLICATIONSERVER.name()); for (ResourceGroupEntity g : result) { if (!ApplicationServerContainer.APPSERVERCONTAINER.getDisplayName().equals(g.getName())) { groups.add(ResourceGroup.createByResource(g)); diff --git a/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/propertyEdit/RelationDataProvider.java b/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/propertyEdit/RelationDataProvider.java index 1be61733c..69665a0f6 100644 --- a/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/propertyEdit/RelationDataProvider.java +++ b/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/propertyEdit/RelationDataProvider.java @@ -296,7 +296,7 @@ public void loadResourceGroupsForRuntime() { public List loadAllRuntimeEnvironments() { List result = new ArrayList<>(); result.addAll(resourceGroupPersistenceService.loadGroupsForTypeName( - DefaultResourceTypeDefinition.RUNTIME.name(), null)); + DefaultResourceTypeDefinition.RUNTIME.name())); Collections.sort(result, nameComparator); return result; diff --git a/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/shakedowntest/ShakedownTestScreenController.java b/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/shakedowntest/ShakedownTestScreenController.java index 829b98474..13e336705 100644 --- a/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/shakedowntest/ShakedownTestScreenController.java +++ b/AMW_web/src/main/java/ch/puzzle/itc/mobiliar/presentation/shakedowntest/ShakedownTestScreenController.java @@ -107,11 +107,11 @@ public Tuple, Integer> loadPendingShakedownTests(boolea } } - return shakedownTestService.getFilteredShakedownTests(count, startIndex, maxResults, filter, colToSort, sortingDirection, null); // TODO: not fixing tests since Shakedown Test removal is planned + return shakedownTestService.getFilteredShakedownTests(count, startIndex, maxResults, filter, colToSort, sortingDirection); } public List loadAppServers() { - return resourceGroupService.loadGroupsForTypeName(DefaultResourceTypeDefinition.APPLICATIONSERVER.name(), null); // TODO: not fixing tests since Shakedown Test removal is planned + return resourceGroupService.loadGroupsForTypeName(DefaultResourceTypeDefinition.APPLICATIONSERVER.name()); } public List loadAllApplications(){ diff --git a/AMW_web/src/main/webapp/pages/settings.xhtml b/AMW_web/src/main/webapp/pages/settings.xhtml index 7e868e8bf..28a27fd73 100644 --- a/AMW_web/src/main/webapp/pages/settings.xhtml +++ b/AMW_web/src/main/webapp/pages/settings.xhtml @@ -22,7 +22,7 @@ + style="display: ${(param['mode']!='props' and param['mode']!='rolPerm' and param['mode']!='tags' and param['mode']!='functions' and param['mode']!='STP' and param['mode']!='releases' and param['mode']!='appVersion') ? 'block' : 'none'}" />