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

Disabled shortFilter code upgrades

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