public static FormEngine buildFormEngine(URL resource) { LOGGER.debug("==== BUILDING SPRING APPLICATION CONTEXT AND FORM ENGINE ========================================="); try (GenericXmlApplicationContext applicationContext = new GenericXmlApplicationContext(new UrlResource(resource))) { Map<String, FormEngine> beansOfType = applicationContext.getBeansOfType(FormEngine.class); if ((beansOfType == null) || beansOfType.isEmpty()) { throw new FlowableException("no " + FormEngine.class.getName() + " defined in the application context " + resource.toString()); } FormEngine formEngine = beansOfType.values().iterator().next(); LOGGER.debug("==== SPRING FORM ENGINE CREATED =================================================================="); return formEngine; } }
public static CmmnEngine buildCmmnEngine(URL resource) { LOGGER.debug("==== BUILDING SPRING APPLICATION CONTEXT AND CMMN ENGINE ========================================="); try (GenericXmlApplicationContext applicationContext = new GenericXmlApplicationContext(new UrlResource(resource))) { Map<String, CmmnEngine> beansOfType = applicationContext.getBeansOfType(CmmnEngine.class); if ((beansOfType == null) || beansOfType.isEmpty()) { throw new FlowableException("no " + CmmnEngine.class.getName() + " defined in the application context " + resource.toString()); } CmmnEngine cmmnEngine = beansOfType.values().iterator().next(); LOGGER.debug("==== SPRING CMMN ENGINE CREATED =================================================================="); return cmmnEngine; } }
public static DmnEngine buildDmnEngine(URL resource) { LOGGER.debug("==== BUILDING SPRING APPLICATION CONTEXT AND DMN ENGINE ========================================="); try (GenericXmlApplicationContext applicationContext = new GenericXmlApplicationContext(new UrlResource(resource))) { Map<String, DmnEngine> beansOfType = applicationContext.getBeansOfType(DmnEngine.class); if ((beansOfType == null) || beansOfType.isEmpty()) { throw new FlowableException("no " + DmnEngine.class.getName() + " defined in the application context " + resource.toString()); } DmnEngine dmnEngine = beansOfType.values().iterator().next(); LOGGER.debug("==== SPRING DMN ENGINE CREATED =================================================================="); return dmnEngine; } }
getBeansOfType(EntitlementEntity.class, true, true).values(); for (EntitlementEntity e : entitlements) { em.persist(e); getBeansOfType(RoleEntity.class, true, true).values(); for (RoleEntity r : roles) { em.persist(r); Collection<ClaimEntity> claims = ctx.getBeansOfType(ClaimEntity.class, true, true).values(); for (ClaimEntity c : claims) { em.persist(c); Collection<TrustedIdpEntity> trustedIdps = ctx.getBeansOfType(TrustedIdpEntity.class).values(); for (TrustedIdpEntity t : trustedIdps) { em.persist(t); Collection<ApplicationEntity> applications = ctx.getBeansOfType(ApplicationEntity.class).values(); for (ApplicationEntity a : applications) { em.persist(a); Collection<IdpEntity> idps = ctx.getBeansOfType(IdpEntity.class).values(); for (IdpEntity i : idps) { em.persist(i); ctx.getBeansOfType(ApplicationClaimEntity.class).values(); for (ApplicationClaimEntity ac : applicationClaims) { em.persist(ac);