Package be.c4j.ee.security.permission

Examples of be.c4j.ee.security.permission.NamedPermission


            AnnotatedType<GenericPermissionVoter> permissionVoterAnnotatedType = beanManager
                    .createAnnotatedType(GenericPermissionVoter.class);
            InjectionTarget<GenericPermissionVoter> voterInjectionTarget = beanManager
                    .createInjectionTarget(permissionVoterAnnotatedType);

            NamedPermission namedPermission;
            String beanName;

            for (Object permission : constants) {
                namedPermission = (NamedPermission) permission;
                beanName = nameFactory.generatePermissionBeanName(namedPermission.name());

                Bean<GenericPermissionVoter> bean = new BeanBuilder<GenericPermissionVoter>(beanManager)
                        .passivationCapable(false).beanClass(GenericPermissionVoter.class)
                        .injectionPoints(voterInjectionTarget.getInjectionPoints()).name(beanName)
                        .scope(ApplicationScoped.class).addQualifier(new NamedLiteral(beanName))
View Full Code Here


    }

    public AuthorizationInfoBuilder addPermissions(Collection<? extends NamedPermission> namedPermissions) {
        Iterator<? extends NamedPermission> iter = namedPermissions.iterator();
        while (iter.hasNext()) {
            NamedPermission namedPermission = iter.next();
            addPermission(namedPermission);
        }
        return this;
    }
View Full Code Here

TOP

Related Classes of be.c4j.ee.security.permission.NamedPermission

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.