[ 
http://issues.ops4j.org/browse/QI-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13532#action_13532
 ] 

Rickard Öberg commented on QI-165:
----------------------------------

I would suggest that we drop this. I've added "withRoles" on composites 
instead, which I think handles "dynamic" assignment of roles to composites 
better, if you don't want to add them to the composite interface itself

> Ability & @Abilities
> --------------------
>
>                 Key: QI-165
>                 URL: http://issues.ops4j.org/browse/QI-165
>             Project: Qi4j
>          Issue Type: New Feature
>            Reporter: Niclas Hedhman
>            Assignee: Rickard Öberg
>
> Instead of stacking all the interfaces into a single Composite, we think that 
> it makes much more sense to assign "Abilities" to a Composite.
> public interface Abc
> {
>    // methods
> }
> @Abilitites( { Abc.class } )
> @Mixins( { AbcAbility.class } )
> public interface Def extends EntityComposite
> {}
> which says that "Give the Abc ability to the Def entity composite, using the 
> AbcAbility class."
> EntityComposite will extend an Ability interface containing following methods;
>  boolean hasAbilitity( Class<?> ability );
>  List<Class<?>> abilities();
>  <T> T useAbility( Class<T> ability );
> The proxy returned in the useAbility() method will also implement the Ability 
> interface itself, so one can cast to it to cast the Ability to another one;
>  Abc abc = ...
>  Def  def = ((Abilitities) abc).useAbility( Def.class );

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.ops4j.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to