@Test public void testDefaultAcceptableClasses() { KieServerTypePermission permission = new KieServerTypePermission(new HashSet<>()); assertTrue(permission.allows(KieContainerResource.class)); assertTrue(permission.allows(ProcessDefinition.class)); assertTrue(permission.allows(EmailNotification.class)); assertTrue(permission.allows(CaseDefinition.class)); assertTrue(permission.allows(DMNModelInfo.class)); }
@SuppressWarnings("rawtypes") @Override public boolean allows(Class type) { boolean allowed = super.allows(type); if (!allowed) { allowed = classes.contains(type); if (!allowed && type.getClassLoader() instanceof KieTypeResolver) { allowed = true; } } return allowed; }
KieServerTypePermission extends WildcardTypePermission { @SuppressWarnings("rawtypes") @Override public boolean allows(Class type) { boolean allowed = super.allows(type); if (!allowed) { allowed = classes.contains(type); if (!allowed && type.getClassLoader() instanceof KieTypeResolver) { allowed = true; } } return allowed; } }
KieServerTypePermission extends WildcardTypePermission { @SuppressWarnings("rawtypes") @Override public boolean allows(Class type) { boolean allowed = super.allows(type); if (!allowed) { allowed = classes.contains(type); if (!allowed && type.getClassLoader() instanceof KieTypeResolver) { allowed = true; } } return allowed; } KieServerTypePermission(Set<Class<?>> classes); }
KieServerTypePermission extends WildcardTypePermission { @SuppressWarnings("rawtypes") @Override public boolean allows(Class type) { boolean allowed = super.allows(type); if (!allowed) { allowed = classes.contains(type); if (!allowed && type.getClassLoader() instanceof KieTypeResolver) { allowed = true; } } return allowed; } KieServerTypePermission(Set<Class<?>> classes); @SuppressWarnings("rawtypes") @Override boolean allows(Class type); }
KieServerTypePermission extends WildcardTypePermission { @SuppressWarnings("rawtypes") @Override public boolean allows(Class type) { boolean allowed = super.allows(type); if (!allowed) { allowed = classes.contains(type); if (!allowed && type.getClassLoader() instanceof KieTypeResolver) { allowed = true; } } return allowed; } KieServerTypePermission(Set<Class<?>> classes); @SuppressWarnings("rawtypes") @Override boolean allows(Class type);  }