Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.RoleReference


     * @param refs iterator over the RoleReference descriptors to write
     */
    protected void writeRoleReferenceDescriptors(Node parentNode, Iterator refs) {
        SecurityRoleRefNode node = new SecurityRoleRefNode();
        for (;refs.hasNext();) {
            RoleReference roleRef = (RoleReference) refs.next();
            node.writeDescriptor(parentNode, TagNames.ROLE_REFERENCE, roleRef);
        }
    }
View Full Code Here


    void removeRole(Role role) {
        //this.getPermissionedRoles().remove(role);
        this.getPermissionedMethodsByPermission().remove(new MethodPermission(role));
        Set roleReferences = new HashSet(this.getRoleReferences());
        for (Iterator itr = roleReferences.iterator(); itr.hasNext();) {
            RoleReference roleReference = (RoleReference) itr.next();
            if (roleReference.getRole().equals(role)) {
                roleReference.setValue("");
            }
        }
    }
View Full Code Here

    /**
     * Returns a matching role reference by name or throw an IllegalArgumentException.
     */
    public RoleReference getRoleReferenceByName(String roleReferenceName) {
        for (Iterator itr = this.getRoleReferences().iterator(); itr.hasNext();) {
            RoleReference nextRR = (RoleReference) itr.next();
            if (nextRR.getName().equals(roleReferenceName)) {
                return nextRR;
            }
        }
        return null;
    }
View Full Code Here

   
    public boolean areResourceReferencesValid() {
    // run through each of the ejb's role references, checking that the roles exist in this bundle
    for (EjbDescriptor ejbDescriptor : getEjbs()) {
        for (Iterator roleRefs = ejbDescriptor.getRoleReferences().iterator(); roleRefs.hasNext();) {
        RoleReference roleReference = (RoleReference) roleRefs.next();
        Role referredRole = roleReference.getRole();
        if (!referredRole.getName().equals("")
            && !super.getRoles().contains(referredRole) ) {
           
            _logger.log(Level.FINE,localStrings.getLocalString(
               "enterprise.deployment.badrolereference",
View Full Code Here

    void removeRole(Role role) {
        //this.getPermissionedRoles().remove(role);
        this.getPermissionedMethodsByPermission().remove(new MethodPermission(role));
        Set roleReferences = new HashSet(this.getRoleReferences());
        for (Iterator itr = roleReferences.iterator(); itr.hasNext();) {
            RoleReference roleReference = (RoleReference) itr.next();
            if (roleReference.getRole().equals(role)) {
                roleReference.setValue("");
            }
        }
    }
View Full Code Here

    /**
     * Returns a matching role reference by name or throw an IllegalArgumentException.
     */
    public RoleReference getRoleReferenceByName(String roleReferenceName) {
        for (Iterator itr = this.getRoleReferences().iterator(); itr.hasNext();) {
            RoleReference nextRR = (RoleReference) itr.next();
            if (nextRR.getName().equals(roleReferenceName)) {
                return nextRR;
            }
        }
        return null;
    }
View Full Code Here

   
    public boolean areResourceReferencesValid() {
    // run through each of the ejb's role references, checking that the roles exist in this bundle
    for (EjbDescriptor ejbDescriptor : getEjbs()) {
        for (Iterator roleRefs = ejbDescriptor.getRoleReferences().iterator(); roleRefs.hasNext();) {
        RoleReference roleReference = (RoleReference) roleRefs.next();
        Role referredRole = roleReference.getRole();
        if (!referredRole.getName().equals("")
            && !super.getRoles().contains(referredRole) ) {
           
            _logger.log(Level.FINE,localStrings.getLocalString(
               "enterprise.deployment.badrolereference",
View Full Code Here

     * @param refs iterator over the RoleReference descriptors to write
     */
    protected void writeRoleReferenceDescriptors(Node parentNode, Iterator refs) {
        SecurityRoleRefNode node = new SecurityRoleRefNode();
        for (;refs.hasNext();) {
            RoleReference roleRef = (RoleReference) refs.next();
            node.writeDescriptor(parentNode, TagNames.ROLE_REFERENCE, roleRef);
        }
    }
View Full Code Here

            throw new IllegalStateException("Argument is null");

        checkAccessToCallerSecurity();
       
        EjbDescriptor ejbd = container.getEjbDescriptor();
        RoleReference rr = ejbd.getRoleReferenceByName(roleRef);
       
        if ( rr == null ) {
            throw new IllegalStateException(
                "No mapping available for role reference " + roleRef);
        }
View Full Code Here

    private RoleReference descriptor;

    @Override
    public RoleReference getDescriptor() {
        if (descriptor == null) descriptor = new RoleReference();
        return descriptor;
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.RoleReference

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.