Examples of SecurityRoleRef


Examples of org.apache.pluto.om.common.SecurityRoleRef

                //SecurityRoleRefSetCtrl portletSecurityRoleRefSetCtrl = (SecurityRoleRefSetCtrl)controllerFactory.get(portletSecurityRoleRefs);

                Iterator p = portletSecurityRoleRefs.iterator();

                while (p.hasNext()) {
                    SecurityRoleRef portletSecurityRoleRef = (SecurityRoleRef)p.next();

                    if (portletSecurityRoleRef.getRoleLink() == null && webAppSecurityRoles.get(portletSecurityRoleRef.getRoleName()) == null) {
                        System.out.println(
                            "Note: The web application has no security role defined which matches the role name \""
                                + portletSecurityRoleRef.getRoleName()
                                + "\" of the security-role-ref element defined for the wrapper-servlet with the name '"
                                + portlet.getName()
                                + "'.");
                        break;
                    }
                    SecurityRoleRef servletSecurityRoleRef = servletSecurityRoleRefs.get(portletSecurityRoleRef.getRoleName());
                    if (null != servletSecurityRoleRef) {
                        System.out.println(
                            "Note: Replaced already existing element of type <security-role-ref> with value \""
                                + portletSecurityRoleRef.getRoleName()
                                + "\" for subelement of type <role-name> for the wrapper-servlet with the name '"
View Full Code Here

Examples of org.apache.pluto.om.common.SecurityRoleRef

    private void checkPortletSecurityRoleRefs( PortletDefinition portlet )
    {
        SecurityRoleRefSet roleRefs = portlet.getInitSecurityRoleRefSet();
        assertEquals("Invalid number of security role references found", 2, roleRefs.size());
        SecurityRoleRef roleRef = roleRefs.get("admin");
        assertNotNull("Security Role Ref admin undefined", roleRef);
        assertEquals("security Role link expected", "users.admin", roleRef.getRoleLink());
        roleRef = roleRefs.get("users.manager");
        assertNotNull("Security Role Ref users.manager undefined", roleRef);
        assertNull("Undefined security Role link for users.managers expected", roleRef.getRoleLink());
    }
View Full Code Here

Examples of org.apache.pluto.om.common.SecurityRoleRef

            if(securityIds != null)
            {
                for(int i=0; i<securityIds.length; i++)
                {
                    String id = securityIds[i];
                    SecurityRoleRef secRef = portlet.getInitSecurityRoleRefSet().get(id);
                    portlet.getInitSecurityRoleRefSet().remove(secRef);
                }
                /*
                Iterator securityIter = portlet.getInitSecurityRoleRefSet()..iterator();
                while (securityIter.hasNext())
View Full Code Here

Examples of org.jboss.metamodel.descriptor.SecurityRoleRef

      if (child != null)
         return child;

      if (localName.equals("security-role-ref"))
      {
         child = new SecurityRoleRef();
      }
      else if (localName.equals("security-identity"))
      {
         child = new SecurityIdentity();
      }
View Full Code Here

Examples of org.jboss.metamodel.descriptor.SecurityRoleRef

      child = newEjbChild(parent, localName);
      if (child == null)
      {
         if (localName.equals("security-role-ref"))
         {
            child = new SecurityRoleRef();
         }
         else if (localName.equals("cmp-field"))
         {
            child = new CmpField();
         }
View Full Code Here

Examples of org.jboss.metamodel.descriptor.SecurityRoleRef

      if (child != null)
         return child;

      if (localName.equals("security-role-ref"))
      {
         child = new SecurityRoleRef();
      }
      else if (localName.equals("security-identity"))
      {
         child = new SecurityIdentity();
      }
View Full Code Here

Examples of org.jboss.metamodel.descriptor.SecurityRoleRef

      child = newEjbChild(parent, localName);
      if (child == null)
      {
         if (localName.equals("security-role-ref"))
         {
            child = new SecurityRoleRef();
         }
         else if (localName.equals("cmp-field"))
         {
            child = new CmpField();
         }
View Full Code Here

Examples of org.jboss.security.SecurityRoleRef

      //             security ref is found.
      boolean matchFound = false;
      Iterator<SecurityRoleRef> it = this.securityRoleReferences.iterator();
      while ( it.hasNext())
      {
         SecurityRoleRef meta = it.next();
         if (meta.getName().equals(roleName))
         {
            roleName = meta.getLink();
            matchFound = true;
            break;
         }
      }
View Full Code Here

Examples of org.jboss.security.javaee.SecurityRoleRef

         Iterator<SecurityRoleRefMetaData> it = container.getBeanMetaData().getSecurityRoleReferences();
         Set<SecurityRoleRef> securityRoleRefs = new HashSet<SecurityRoleRef>();
         while(it.hasNext())
         {
            SecurityRoleRefMetaData meta = (SecurityRoleRefMetaData) it.next();
            securityRoleRefs.add(new SecurityRoleRef(meta.getName(), meta.getLink(),meta.getDescription()));
         }
         //Get the context subject
         Subject contextSubject = null;
         try
         {
View Full Code Here

Examples of org.jboss.security.javaee.SecurityRoleRef

     
      //TODO: Get rid of this conversion asap
      Set<SecurityRoleRef> srset = new HashSet<SecurityRoleRef>();
      for(SecurityRoleRefMetaData srmd: roleRefs)
      {
         srset.add(new SecurityRoleRef(srmd.getRoleName(),srmd.getRoleLink(),null));
      }
      Principal principal = getCallerPrincipal(sc, rm, domain);
      AbstractEJBAuthorizationHelper helper;
      try
      {
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.