[jira] [Commented] (DELTASPIKE-20) move util methods to CdiUtils

2011-12-28 Thread Mark Struberg (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13176549#comment-13176549
 ] 

Mark Struberg commented on DELTASPIKE-20:
-

CdiUtils sounds a bit too loose. I'd rather name it ContextualInstanceProvider 
and let it resolve the BeanManager internally.

 move util methods to CdiUtils
 -

 Key: DELTASPIKE-20
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-20
 Project: DeltaSpike
  Issue Type: Sub-task
  Components: Core
Reporter: Gerhard Petracek
Assignee: Mark Struberg

 public T T getContextualReference(ClassT type, boolean 
 optionalBeanAllowed, Annotation... qualifiers)
 public T T getContextualReference(String name, boolean optionalBeanAllowed, 
 ClassT targetType)
 public T T getContextualReference(BeanT bean, boolean 
 optionalBeanAllowed, ClassT targetType)
 public T ListT getContextualReferences(ClassT type, boolean 
 optionalBeanAllowed, Annotation... qualifiers)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (DELTASPIKE-20) move util methods to CdiUtils

2011-12-23 Thread Gerhard Petracek (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13175348#comment-13175348
 ] 

Gerhard Petracek commented on DELTASPIKE-20:


if you provide a name, type,... and there is no cdi bean for it the behaviour 
is different.
optionalBeanAllowed == false  cdiBeanFound == false - throw an exception
optionalBeanAllowed == true  cdiBeanFound == false - return null

the alternative would be to return null and every caller has to do the 
exception part (if a cdi bean isn't optional) - we will see different 
exceptions for the same reason.


 move util methods to CdiUtils
 -

 Key: DELTASPIKE-20
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-20
 Project: DeltaSpike
  Issue Type: Sub-task
  Components: Core
Reporter: Gerhard Petracek
Assignee: Mark Struberg

 public T T getContextualReference(ClassT type, boolean 
 optionalBeanAllowed, Annotation... qualifiers)
 public T T getContextualReference(String name, boolean optionalBeanAllowed, 
 ClassT targetType)
 public T T getContextualReference(BeanT bean, boolean 
 optionalBeanAllowed, ClassT targetType)
 public T ListT getContextualReferences(ClassT type, boolean 
 optionalBeanAllowed, Annotation... qualifiers)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira