public static boolean isCategoryOnlyCriteria ( final Criteria criteria ) { return isEmpty ( criteria . getAliases ( ) ) && // we are not subscribing to alias topic (yet) isEmpty ( criteria . getDeviceTypes ( ) ) && // we are not subscribing to device type topic (yet) ! isEmpty ( criteria . getCategories ( ) ) ; // BUT! categories are mapped to topics }
Helper method to check if only categories are applied . Useful in FCM land where we use topics