Package com.sun.enterprise.deployment.web

Examples of com.sun.enterprise.deployment.web.SecurityRoleReference


   
       Set set = wmd.getWebComponentDescriptorsSet();
       StandardWrapper wrapper;   
       WebComponentDescriptor webComponentDesc;
       Enumeration enumeration;
       SecurityRoleReference securityRoleReference;
      
       Set set2;
       Iterator iterator2;
      
       if ( !set.isEmpty() ){
           Iterator iterator = set.iterator();

           while (iterator.hasNext()) {

                webComponentDesc = (WebComponentDescriptor)iterator.next();

                wrapper = (StandardWrapper)webModule.createWrapper();
                wrapper.setName(webComponentDesc.getCanonicalName());
                webModule.addChild(wrapper);

                enumeration = webComponentDesc.getInitializationParameters();
                InitializationParameter initP = null;
                while (enumeration.hasMoreElements()){
                    initP = (InitializationParameter)enumeration.nextElement();
                    wrapper.addInitParameter(initP.getName(), initP.getValue());
                }

                if (webComponentDesc.isServlet()){
                        wrapper.setServletClass(
                                webComponentDesc.getWebComponentImplementation());
                } else {
                    wrapper.setJspFile(webComponentDesc.
                                                 getWebComponentImplementation());               
                }

                wrapper.setLoadOnStartup(webComponentDesc.getLoadOnStartUp());
                if (webComponentDesc.getRunAsIdentity() != null)
                    wrapper.setRunAs(webComponentDesc.getRunAsIdentity().getRoleName());


                set2 = webComponentDesc.getUrlPatternsSet();
                iterator2 = set2.iterator();
                while (iterator2.hasNext()){
                    webModule.addServletMapping((String)iterator2.next(),
                                                webComponentDesc.getCanonicalName());
                }

                enumeration = webComponentDesc.getSecurityRoleReferences();
                while (enumeration.hasMoreElements()){
                    securityRoleReference =
                                (SecurityRoleReference)enumeration.nextElement();
                    wrapper.
                        addSecurityReference(securityRoleReference.getRolename(),
                             securityRoleReference.getSecurityRoleLink().getName());
                }
            }
        }
      
        webModule.setSessionTimeout(wmd.getSessionTimeout());
View Full Code Here


    */
    public SecurityRoleReference getSecurityRoleReferenceByName(
                String roleReferenceName) {
  for (Enumeration e =
                this.getSecurityRoleReferences(); e.hasMoreElements();) {
      SecurityRoleReference nextRR =
                    (SecurityRoleReference) e.nextElement();
      if (nextRR.getRolename().equals( roleReferenceName )) {
    return nextRR;
      }
  }
  return null;  
    }
View Full Code Here

      String eName = eDescriptor.getName();

      Iterator iroleref = eDescriptor.getRoleReferences().iterator();
      while(iroleref.hasNext()){
    SecurityRoleReference roleRef =
        (SecurityRoleReference) iroleref.next();
    String rolename = roleRef.getRolename();
    EJBRoleRefPermission ejbrr =
        new EJBRoleRefPermission(eName, rolename);
    String rolelink = roleRef.getSecurityRoleLink().getName();

    pc.addToRole(rolelink, ejbrr);

    if(_logger.isLoggable(Level.FINE)){
        _logger.fine("JACC: Converting role-ref -> "+roleRef.toString()+
         " to permission with name("+ejbrr.getName()+
         ") and actions ("+ejbrr.getActions()+
         ")" + "mapped to role ("+rolelink+")");
    }
      }
View Full Code Here

      for(Enumeration e = this.getWebComponentDescriptors(); e.hasMoreElements();){
    WebComponentDescriptor comp = (WebComponentDescriptor) e.nextElement();
    if(!comp.getCanonicalName().equals(compName))
        continue;

    SecurityRoleReference r = comp.getSecurityRoleReferenceByName(roleName);
    if(r != null)
        return r;
      }

      return null;
View Full Code Here

    /**
    * Return a matching role reference by name or null if there is none matching.
    */
    public SecurityRoleReference getSecurityRoleReferenceByName(String roleReferenceName) {
  for (Enumeration e = this.getSecurityRoleReferences(); e.hasMoreElements();) {
      SecurityRoleReference nextRR = (SecurityRoleReference) e.nextElement();
      if (nextRR.getRolename().equals( roleReferenceName )) {
    return nextRR;
      }
  }
  return null;  
    }
View Full Code Here

            }
        }
        for (Iterator secRoleRefIter =
            other.getSecurityRoleReferenceSet().iterator();
            secRoleRefIter.hasNext();) {
            SecurityRoleReference secRoleRef =
                (SecurityRoleReference) secRoleRefIter.next();
            if (getSecurityRoleReferenceByName(secRoleRef.getRolename())
                == null) {
                getSecurityRoleReferenceSet().add(secRoleRef);
            }
        }
View Full Code Here

            }
        }
        for (Iterator<SecurityRoleReference> secRoleRefIter =
                other.getSecurityRoleReferenceSet().iterator();
             secRoleRefIter.hasNext();) {
            SecurityRoleReference secRoleRef =
                    secRoleRefIter.next();
            if (getSecurityRoleReferenceByName(secRoleRef.getRoleName())
                    == null) {
                getSecurityRoleReferenceSet().add(secRoleRef);
            }
        }
View Full Code Here

            }
        }
        for (Iterator<SecurityRoleReference> secRoleRefIter =
                other.getSecurityRoleReferenceSet().iterator();
             secRoleRefIter.hasNext();) {
            SecurityRoleReference secRoleRef =
                    secRoleRefIter.next();
            if (getSecurityRoleReferenceByName(secRoleRef.getRoleName())
                    == null) {
                getSecurityRoleReferenceSet().add(secRoleRef);
            }
        }
View Full Code Here

            }
        }
        for (Iterator<SecurityRoleReference> secRoleRefIter =
                other.getSecurityRoleReferenceSet().iterator();
             secRoleRefIter.hasNext();) {
            SecurityRoleReference secRoleRef =
                    secRoleRefIter.next();
            if (getSecurityRoleReferenceByName(secRoleRef.getRoleName())
                    == null) {
                getSecurityRoleReferenceSet().add(secRoleRef);
            }
        }
View Full Code Here

            }
        }
        for (Iterator<SecurityRoleReference> secRoleRefIter =
                other.getSecurityRoleReferenceSet().iterator();
             secRoleRefIter.hasNext();) {
            SecurityRoleReference secRoleRef =
                    secRoleRefIter.next();
            if (getSecurityRoleReferenceByName(secRoleRef.getRolename())
                    == null) {
                getSecurityRoleReferenceSet().add(secRoleRef);
            }
        }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.web.SecurityRoleReference

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.