Examples of SecurityRole


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

                 (AuthorizationConstraintImpl)sc.getAuthorizationConstraint();
                Enumeration rolesEnum = authCons.getSecurityRoles();
                StringBuffer rsb = new StringBuffer();
                rsb.append("     Accessible by roles: ");
                while (rolesEnum.hasMoreElements()) {
                    SecurityRole sr = (SecurityRole)rolesEnum.nextElement();
                    rsb.append(sr.getName());
                    rsb.append(" ");
                }
                logger.finest(rsb.toString());

                // show transport guarantee
View Full Code Here

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

        if (securityConstraint.getAuthorizationConstraint() != null){
            setAuthConstraint(true);
            Enumeration enumeration = securityConstraint
                            .getAuthorizationConstraint().getSecurityRoles();

            SecurityRole securityRole;
            while (enumeration.hasMoreElements()){
                securityRole = (SecurityRole)enumeration.nextElement();
                super.addAuthRole(securityRole.getName());
                if ( !securityRole.getName().equals("*")){
                    webModule.addSecurityRole(securityRole.getName());
                }
            }
            setDisplayName(securityConstraint.getAuthorizationConstraint().getName());
        }
View Full Code Here

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

                        sc.getAuthorizationConstraint();
                Enumeration rolesEnum = authCons.getSecurityRoles();
                StringBuffer rsb = new StringBuffer();
                rsb.append("     Accessible by roles: ");
                while (rolesEnum.hasMoreElements()) {
                    SecurityRole sr = (SecurityRole)rolesEnum.nextElement();
                    rsb.append(sr.getName());
                    rsb.append(" ");
                }
                logger.finest(rsb.toString());

                // show transport guarantee
View Full Code Here

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

        if (securityConstraint.getAuthorizationConstraint() != null){
            setAuthConstraint(true);
            Enumeration enumeration = securityConstraint
                            .getAuthorizationConstraint().getSecurityRoles();

            SecurityRole securityRole;
            while (enumeration.hasMoreElements()){
                securityRole = (SecurityRole)enumeration.nextElement();
                super.addAuthRole(securityRole.getName());
                if ( !securityRole.getName().equals("*")){
                    webModule.addSecurityRole(securityRole.getName());
                }
            }
            setDisplayName(securityConstraint.getAuthorizationConstraint().getName());
        }
View Full Code Here

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

                 (AuthorizationConstraintImpl)sc.getAuthorizationConstraint();
                Enumeration rolesEnum = authCons.getSecurityRoles();
                StringBuffer rsb = new StringBuffer();
                rsb.append("     Accessible by roles: ");
                while (rolesEnum.hasMoreElements()) {
                    SecurityRole sr = (SecurityRole)rolesEnum.nextElement();
                    rsb.append(sr.getName());
                    rsb.append(" ");
                }
                logger.finest(rsb.toString());

                // show transport guarantee
View Full Code Here

Examples of models.SecurityRole

  private void initialData() {
    if (SecurityRole.find.findRowCount() == 0) {
      for (final String roleName : Arrays
          .asList(controllers.Application.USER_ROLE)) {
        final SecurityRole role = new SecurityRole();
        role.roleName = roleName;
        role.save();
      }
    }
  }
View Full Code Here

Examples of net.petrikainulainen.spring.testmvc.user.dto.SecurityRole

    private UserDTO createDTO(UserDetails principal) {
        UserDTO dto = null;
        if (principal != null) {
            String username = principal.getUsername();
            SecurityRole role = getRole(principal.getAuthorities());

            dto = new UserDTO(username, role);
        }

        LOGGER.debug("Created user dto: {}", dto);
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.SecurityRole

        // retrieve security-role
        nodes = (NodeList)xpath.evaluate("/"+prefix+"web-app/"+prefix+"security-role", document, XPathConstants.NODESET);
        if (nodes != null)
        {
            String roleName;
            SecurityRole r;
            Description d;
            for (int i = 0, nsize = nodes.getLength(); i < nsize; i++)
            {
                element = (Element)nodes.item(i);
                children = element.getElementsByTagName("role-name");
                if (children != null && children.getLength() != 0)
                {
                    roleName = children.item(0).getTextContent().trim();
                    if (roleName.length() > 0)
                    {
                        r = null;
                        for (SecurityRole sr : pa.getSecurityRoles())
                        {
                            if (sr.getName().equals(roleName))
                            {
                                r = sr;
                                break;
                            }
                        }
                        if (r == null)
                        {
                            r = pa.addSecurityRole(roleName);
                        }
                        // else: overwrite or merge existing descriptions with those of this last found entry
                       
                        children = element.getElementsByTagName("description");
                        if (children != null)
                        {
                            for (int j = 0, csize = children.getLength(); j < csize; j++)
                            {
                                element = (Element)children.item(j);
                                String lang = element.getAttributeNS(XMLConstants.XML_NS_URI, "lang");
                                if (lang == null)
                                {
                                    lang = "en";
                                }
                                if (r.getDescription(JetspeedLocale.convertStringToLocale(lang)) == null)
                                {
                                    d = r.addDescription(lang);
                                    d.setDescription(element.getTextContent());
                                }
                            }
                        }
                    }
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.SecurityRole

        // retrieve security-role
        nodes = (NodeList)xpath.evaluate("/"+prefix+"web-app/"+prefix+"security-role", document, XPathConstants.NODESET);
        if (nodes != null)
        {
            String roleName;
            SecurityRole r;
            Description d;
            for (int i = 0, nsize = nodes.getLength(); i < nsize; i++)
            {
                element = (Element)nodes.item(i);
                children = element.getElementsByTagName("role-name");
                if (children != null && children.getLength() != 0)
                {
                    roleName = children.item(0).getTextContent().trim();
                    if (roleName.length() > 0)
                    {
                        r = null;
                        for (SecurityRole sr : pa.getSecurityRoles())
                        {
                            if (sr.getName().equals(roleName))
                            {
                                r = sr;
                                break;
                            }
                        }
                        if (r == null)
                        {
                            r = pa.addSecurityRole(roleName);
                        }
                        // else: overwrite or merge existing descriptions with those of this last found entry
                       
                        children = element.getElementsByTagName("description");
                        if (children != null)
                        {
                            for (int j = 0, csize = children.getLength(); j < csize; j++)
                            {
                                element = (Element)children.item(j);
                                String lang = element.getAttributeNS(XMLConstants.XML_NS_URI, "lang");
                                if (lang == null)
                                {
                                    lang = "en";
                                }
                                if (r.getDescription(JetspeedLocale.convertStringToLocale(lang)) == null)
                                {
                                    d = r.addDescription(lang);
                                    d.setDescription(element.getTextContent());
                                }
                            }
                        }
                    }
View Full Code Here

Examples of org.apache.openejb.jee.SecurityRole

                if (exists) {
                    log.debug("addDeclareRoles: <security-role> entry found: " + annotationRoleName);
                }
                else {
                    log.debug("addDeclareRoles: <security-role> entry NOT found: " + annotationRoleName);
                    SecurityRole securityRole = new SecurityRole();
                    securityRole.setRoleName(annotationRoleName);
                    webApp.getSecurityRole().add(securityRole);
                }
            }
        }
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.