Examples of RoleReference


Examples of com.sun.enterprise.deployment.RoleReference

    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

Examples of com.sun.enterprise.deployment.RoleReference

    /**
     * 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

Examples of com.sun.enterprise.deployment.RoleReference

    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

Examples of com.sun.enterprise.deployment.RoleReference

    /**
     * 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

Examples of com.sun.enterprise.deployment.RoleReference

   
    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

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

Examples of com.sun.enterprise.deployment.RoleReference

     */
    public Node writeDescriptor(Node parent, String nodeName, Descriptor descriptor) {   
        if (! (descriptor instanceof RoleReference)) {
            throw new IllegalArgumentException(getClass() + " cannot handles descriptors of type " + descriptor.getClass());
        }   
        RoleReference roleRef = (RoleReference) descriptor;       
        Node subNode = super.writeDescriptor(parent, nodeName, roleRef);

        writeLocalizedDescriptions(subNode, descriptor);       

        appendTextChild(subNode, EjbTagNames.ROLE_NAME, roleRef.getName());                  
        appendTextChild(subNode, EjbTagNames.ROLE_LINK, roleRef.getValue());                 
        return subNode;
    }
View Full Code Here

Examples of com.sun.enterprise.deployment.RoleReference

   
    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

Examples of com.sun.enterprise.deployment.RoleReference

    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

Examples of com.sun.enterprise.deployment.RoleReference

    /**
     * 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
TOP
Copyright © 2018 www.massapi.com. 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.