Let’s say we have Foo as an AggregateRoot. And there are generic Foos as well as EnhancedFoos with a number of extended properties. Is it OK to expose “Actions” on a single aggregate root class for generic and enhanced properties and have validation check to throw exception if enhanced action was called on non-enhanced Foo object? Technically, AggregateRoot in this case will aggregate all possible “Actions” for all supported Foo types?
Obviously a lot depends on domain structure, but I think this hypothetical situation is quite common. Probably basic question but I'm just starting with Aggregates/Roots.
Update per feedback
Let’s say we have Foo as an AggregateRoot. And there are generic Foos as well as FlyableFoos, SwimmableFoos, etc. So, Aggregate should "know" about all possible behaviors (fly, quack, swim) and expose it appropriately to Service functionality. And if something is called some reason that is not “supported” by current object, Aggregate may throw an exception “Sorry, penguin can’t fly”.