cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Interceptor which excludes enums

0 Kudos
150

Hello,

we have a ValidateInterceptor which reacts on type ItemModel . We would like our Interceptor not to react on Enums but it does. Because:

 EnumerationMetaTypeModel extends ComposedTypeModel extends TypeModel extends TypeManagerManagedModel extends ItemModel

Which would be the best way to exclude Enums from our interceptor?

Thanks in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member387866
Active Contributor
0 Kudos

Hi Sven,

Have you tried

 // Just returning it it is the type,
 if (item instanceof EnumerationMetaTypeModel) return;

 // or in your other parameter sanitisation checks.
 if (... && ! (item instanceof EnumerationMetaTypeModel) ...) { ... }

Hopefully this can help,
Luke

Ask a Question
Top Q&A Solution Author