Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.SecurityRoleDescriptor


        // security-role*
        Enumeration roles = webBundleDesc.getSecurityRoles();
        if (roles.hasMoreElements()) {
            SecurityRoleNode srNode = new SecurityRoleNode();
            while (roles.hasMoreElements()) {
                SecurityRoleDescriptor role = (SecurityRoleDescriptor) roles.nextElement();
                srNode.writeDescriptor(jarNode, WebTagNames.ROLE, role);           
            }
        }

        // env-entry*
 
View Full Code Here


        // security-role*
        Enumeration roles = webBundleDesc.getSecurityRoles();
        if (roles.hasMoreElements()) {
            SecurityRoleNode srNode = new SecurityRoleNode();
            while (roles.hasMoreElements()) {
                SecurityRoleDescriptor role = (SecurityRoleDescriptor) roles.nextElement();
                srNode.writeDescriptor(jarNode, WebTagNames.ROLE, role);           
            }
        }

        // env-entry*
 
View Full Code Here

            for (String roleName : rolesRefAn.value()) {
                if (ejbDescriptor.getRoleReferenceByName(roleName) == null) {
                    RoleReference roleRef = new RoleReference(roleName, "");
                    roleRef.setRolename(roleName);
                    roleRef.setSecurityRoleLink(
                           new SecurityRoleDescriptor(roleName, ""));
                    ejbDescriptor.addRoleReference(roleRef);
                }

                Role role = new Role(roleName);
                ejbDescriptor.getEjbBundleDescriptor().addRole(role);
View Full Code Here

       
        writeLocalizedDescriptions(myNode, descriptor);
       
        // role-name*
        for (Enumeration roles = descriptor.getSecurityRoles();roles.hasMoreElements();) {
            SecurityRoleDescriptor role = (SecurityRoleDescriptor) roles.nextElement();
            appendTextChild(myNode, WebTagNames.ROLE_NAME, role.getName());
        }
        return myNode;
    }
View Full Code Here

    public Enumeration getSecurityRoles() {
        Vector securityRoles = new Vector();

        for (Iterator itr = super.getRoles().iterator(); itr.hasNext();) {
            Role r = (Role) itr.next();
            SecurityRoleDescriptor srd = new SecurityRoleDescriptor(r);
            securityRoles.add(srd);
        }

        return securityRoles.elements();
    }
View Full Code Here

       
        writeLocalizedDescriptions(myNode, descriptor);
       
        // role-name*
        for (Enumeration roles = descriptor.getSecurityRoles();roles.hasMoreElements();) {
            SecurityRoleDescriptor role = (SecurityRoleDescriptor) roles.nextElement();
            appendTextChild(myNode, WebTagNames.ROLE_NAME, role.getName());
        }
        return myNode;
    }
View Full Code Here

    private SecurityRoleDescriptor descriptor;

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

       
        writeLocalizedDescriptions(myNode, descriptor);
       
        // role-name*
        for (Enumeration roles = descriptor.getSecurityRoles();roles.hasMoreElements();) {
            SecurityRoleDescriptor role = (SecurityRoleDescriptor) roles.nextElement();
            appendTextChild(myNode, WebTagNames.ROLE_NAME, role.getName());
        }
        return myNode;
    }
View Full Code Here

    /**
     * Adds a role to the authorization constraint
     * @param the role name to be added
     */
    public void addSecurityRole(String roleName) {
        SecurityRoleDescriptor sr = new SecurityRoleDescriptor();
        sr.setName(roleName);
        addSecurityRole(sr);
    }
View Full Code Here

TOP

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

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.