Commit 3dc99d5d authored by Matija Obreza's avatar Matija Obreza

Disabled shortFilter code upgrades

parent 1207f049
...@@ -15,13 +15,7 @@ ...@@ -15,13 +15,7 @@
*/ */
package org.genesys2.server.component.listener; package org.genesys2.server.component.listener;
import java.util.List;
import org.genesys.blocks.util.CurrentApplicationContext; import org.genesys.blocks.util.CurrentApplicationContext;
import org.genesys.catalog.model.ShortFilter;
import org.genesys.catalog.persistence.ShortFilterRepository;
import org.genesys.catalog.service.ShortFilterService;
import org.genesys.catalog.service.impl.ShortFilterServiceImpl;
import org.genesys2.server.component.security.AsAdminInvoker; import org.genesys2.server.component.security.AsAdminInvoker;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -56,26 +50,26 @@ public class ApplicationUpgrades implements InitializingBean { ...@@ -56,26 +50,26 @@ public class ApplicationUpgrades implements InitializingBean {
LOG.info("Executing {}", this.getClass().getName()); LOG.info("Executing {}", this.getClass().getName());
// aclEnsureClassOIDs(); // aclEnsureClassOIDs();
// aclMakePartnersPublic(); // aclMakePartnersPublic();
upgradeShortFiltrerCodeFromV1ToV2(); // upgradeShortFiltrerCodeFromV1ToV2();
} }
@Autowired // @Autowired
private ShortFilterRepository shortFilterRepository; // private ShortFilterRepository shortFilterRepository;
@Autowired // @Autowired
private ShortFilterService shortFilterService; // private ShortFilterService shortFilterService;
//
private void upgradeShortFiltrerCodeFromV1ToV2() throws Exception { // private void upgradeShortFiltrerCodeFromV1ToV2() throws Exception {
asAdminInvoker.invoke(() -> { // asAdminInvoker.invoke(() -> {
List<ShortFilter> allShortFilters = shortFilterRepository.findAll(); // List<ShortFilter> allShortFilters = shortFilterRepository.findAll();
allShortFilters.forEach((filter) -> { // allShortFilters.forEach((filter) -> {
if (filter.getCode().startsWith(ShortFilterServiceImpl.CODE_PREFIX_V1)) { // if (filter.getCode().startsWith(ShortFilterServiceImpl.CODE_PREFIX_V1)) {
shortFilterService.upgradeFilterCode(filter); // shortFilterService.upgradeFilterCode(filter);
} // }
}); // });
//
return true; // return true;
}); // });
} // }
// @Autowired // @Autowired
// private CustomAclService aclService; // private CustomAclService aclService;
......
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