Package javax.enterprise.inject

Examples of javax.enterprise.inject.UnsatisfiedResolutionException


        if (injectionPoint != null)
        {
            violationMessage.addLine("for injection into ", injectionPoint.toString());
        }

        throw new UnsatisfiedResolutionException(violationMessage.toString());
    }
View Full Code Here


    @Produces
    public GenericRoleVoter getVoter(InjectionPoint injectionPoint) {
        Annotation annotation = injectionPoint.getAnnotated().getAnnotation(config.getNamedRoleCheckClass());
        if (annotation == null) {
            throw new UnsatisfiedResolutionException(
                    "Injection points for GenericRoleVoter needs an additional " + config.getNamedRoleCheck() +
                            " annotation to determine the correct bean");
        }
        NamedRole[] roles = AnnotationUtil.getRoleValues(annotation);
        if (roles.length>1) {
View Full Code Here

    @Produces
    public NamedApplicationRole getRole(InjectionPoint injectionPoint) {
        Annotation annotation = injectionPoint.getAnnotated().getAnnotation(config.getNamedRoleCheckClass());
        if (annotation == null) {
            throw new UnsatisfiedResolutionException(
                    "Injection points for NamedApplicationRole needs an additional " + config.getNamedPermissionCheck() +
                            " annotation to determine the correct bean");
        }
        NamedRole[] roles = AnnotationUtil.getRoleValues(annotation);
        if (roles.length>1) {
View Full Code Here

    @Produces
    public GenericPermissionVoter getVoter(InjectionPoint injectionPoint) {
        Annotation annotation = injectionPoint.getAnnotated().getAnnotation(config.getNamedPermissionCheckClass());
        if (annotation == null) {
            throw new UnsatisfiedResolutionException(
                    "Injection points for GenericPermissionVoter needs an additional " + config.getNamedPermissionCheck() +
                            " annotation to determine the correct bean"
            );
        }
        NamedPermission[] permissions = AnnotationUtil.getPermissionValues(annotation);
View Full Code Here

    @Produces
    public NamedDomainPermission getPermission(InjectionPoint injectionPoint) {
        Annotation annotation = injectionPoint.getAnnotated().getAnnotation(config.getNamedPermissionCheckClass());
        if (annotation == null) {
            throw new UnsatisfiedResolutionException(
                    "Injection points for NamedDomainPermission needs an additional " + config.getNamedPermissionCheck() +
                            " annotation to determine the correct bean"
            );
        }
        NamedPermission[] permissions = AnnotationUtil.getPermissionValues(annotation);
View Full Code Here

    {
        ViolationMessageBuilder violationMessage = newViolation(message);

        violationMessage.addLine(createProducerMethodMessage(producerMethod));

        throw new UnsatisfiedResolutionException(violationMessage.toString());
    }
View Full Code Here

        ViolationMessageBuilder violationMessage = newViolation(createProducerMethodMessage(producerMethod));

        violationMessage.append(" in class: ", ClassUtil.getClass(type).getName());
        violationMessage.addLine(createQualifierMessage(qualifiers));

        throw new UnsatisfiedResolutionException(violationMessage.toString());
    }
View Full Code Here

        if (injectionPoint != null)
        {
            violationMessage.addLine("for injection into ", injectionPoint.toString());
        }

        throw new UnsatisfiedResolutionException(violationMessage.toString());
    }
View Full Code Here

        return OldSPIBridge.getInstanceByName(getCurrentManager(), name);
    }

    private <T> Bean<T> resolveUniqueBean(Type type, Set<Bean<T>> beans) {
        if (beans.size() == 0) {
            throw new UnsatisfiedResolutionException("Unable to resolve any beans of " + type);
        } else if (beans.size() > 1) {
            throw new AmbiguousResolutionException("More than one bean available (" + beans + ")");
        }
        return beans.iterator().next();
    }
View Full Code Here

  private <T> Bean<T> createRepositoryBean(Class<T> repositoryType, Set<Annotation> qualifiers, BeanManager beanManager) {
    Bean<SolrOperations> solrOperationBeans = this.solrOperationsMap.get(qualifiers.toString());

    if (solrOperationBeans == null) {
      throw new UnsatisfiedResolutionException(String.format("Unable to resolve a bean for '%s' with qualifiers %s.",
          SolrOperations.class.getName(), qualifiers));
    }

    return new SolrRepositoryBean<T>(solrOperationBeans, qualifiers, repositoryType, beanManager,
        getCustomImplementationDetector());
View Full Code Here

TOP

Related Classes of javax.enterprise.inject.UnsatisfiedResolutionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.