Package org.apache.geronimo.xml.ns.security_1

Examples of org.apache.geronimo.xml.ns.security_1.PrincipalType


        switch (type.getSelectionIndex()) {
        case DISTINGUISHED_NAME:
            if (isEmpty(name.getText())) {
                return false;
            }
            DistinguishedNameType distinguishedName = (DistinguishedNameType)eObject;
            if (distinguishedName == null) {
                distinguishedName = (DistinguishedNameType)getEFactory().create(DistinguishedNameType.class);
                RoleType role = (RoleType) section.getSelectedObject();
                role.getDistinguishedName().add(distinguishedName);
            }
            distinguishedName.setName(name.getText());
            break;

        case PRINCIPAL:
            if (isEmpty(name.getText()) || isEmpty(clazz.getText())) {
                return false;
View Full Code Here


                if (RoleType.class.isInstance(element)) {
                  RoleType role = (RoleType) element;
                    return "Role: role-name = \"" + role.getRoleName() + "\"";
                }
                else if (element instanceof DistinguishedNameType) {
                  DistinguishedNameType object = (DistinguishedNameType) element;
                    return "DistinguishedName: name = \"" + object.getName() + "\"";
                }
                else if (element instanceof RealmPrincipalType) {
                  RealmPrincipalType object = (RealmPrincipalType) element;
                    return "RealmPrincipal: name = \"" + object.getName() +
                            "\", class = \"" + object.getClazz() +
                            "\", domain-name = \"" + object.getDomainName() +
                            "\", realm-name = \"" + object.getRealmName() +"\"";
                }
                else if (element instanceof LoginDomainPrincipalType) {
                  LoginDomainPrincipalType object = (LoginDomainPrincipalType) element;
                    return "LoginDomainPrincipal: name = \"" + object.getName() +
                            "\", class = \"" + object.getClazz() +
                            "\", domain-name = \"" + object.getDomainName() +"\"";
                }
                else if (element instanceof PrincipalType) {
                  PrincipalType object = (PrincipalType) element;
                    return "Principal: name = \"" + object.getName() +
                            "\", class = \"" + object.getClazz() + "\"";
                }

                return null;
            }
View Full Code Here

        case LOGIN_DOMAIN_PRINCIPAL:
            if (isEmpty(name.getText()) || isEmpty(clazz.getText()) || isEmpty(domainName.getText())) {
                return false;
            }
            LoginDomainPrincipalType loginDomainPrincipal = (LoginDomainPrincipalType)eObject;
            if (loginDomainPrincipal == null) {
                loginDomainPrincipal = (LoginDomainPrincipalType)getEFactory().create(LoginDomainPrincipalType.class);
                RoleType role = (RoleType) section.getSelectedObject();
                role.getLoginDomainPrincipal().add(loginDomainPrincipal);
            }
            loginDomainPrincipal.setName(name.getText());
            loginDomainPrincipal.setClazz(clazz.getText());
            loginDomainPrincipal.setDomainName(domainName.getText());
            break;

        case REALM_PRINCIPAL:
            if (isEmpty(name.getText()) || isEmpty(clazz.getText()) || isEmpty(domainName.getText())
                    || isEmpty(realmName.getText())) {
View Full Code Here

                            "\", class = \"" + object.getClazz() +
                            "\", domain-name = \"" + object.getDomainName() +
                            "\", realm-name = \"" + object.getRealmName() +"\"";
                }
                else if (element instanceof LoginDomainPrincipalType) {
                  LoginDomainPrincipalType object = (LoginDomainPrincipalType) element;
                    return "LoginDomainPrincipal: name = \"" + object.getName() +
                            "\", class = \"" + object.getClazz() +
                            "\", domain-name = \"" + object.getDomainName() +"\"";
                }
                else if (element instanceof PrincipalType) {
                  PrincipalType object = (PrincipalType) element;
                    return "Principal: name = \"" + object.getName() +
                            "\", class = \"" + object.getClazz() + "\"";
                }

                return null;
            }
View Full Code Here

        case PRINCIPAL:
            if (isEmpty(name.getText()) || isEmpty(clazz.getText())) {
                return false;
            }
            PrincipalType principal = (PrincipalType)eObject;
            if (principal == null) {
                principal = (PrincipalType)getEFactory().create(PrincipalType.class);
                RoleType role = (RoleType) section.getSelectedObject();
                role.getPrincipal().add(principal);
            }
            principal.setName(name.getText());
            principal.setClazz(clazz.getText());
            break;

        case LOGIN_DOMAIN_PRINCIPAL:
            if (isEmpty(name.getText()) || isEmpty(clazz.getText()) || isEmpty(domainName.getText())) {
                return false;
View Full Code Here

                    return "LoginDomainPrincipal: name = \"" + object.getName() +
                            "\", class = \"" + object.getClazz() +
                            "\", domain-name = \"" + object.getDomainName() +"\"";
                }
                else if (element instanceof PrincipalType) {
                  PrincipalType object = (PrincipalType) element;
                    return "Principal: name = \"" + object.getName() +
                            "\", class = \"" + object.getClazz() + "\"";
                }

                return null;
            }
View Full Code Here

        case REALM_PRINCIPAL:
            if (isEmpty(name.getText()) || isEmpty(clazz.getText()) || isEmpty(domainName.getText())
                    || isEmpty(realmName.getText())) {
                return false;
            }
            RealmPrincipalType realmPrincipal = (RealmPrincipalType)eObject;
            if (realmPrincipal == null) {
                realmPrincipal = (RealmPrincipalType)getEFactory().create(RealmPrincipalType.class);
                RoleType role = (RoleType) section.getSelectedObject();
                role.getRealmPrincipal().add(realmPrincipal);
            }
            realmPrincipal.setName(name.getText());
            realmPrincipal.setClazz(clazz.getText());
            realmPrincipal.setDomainName(domainName.getText());
            realmPrincipal.setRealmName(realmName.getText());
            break;
        }
        return true;
    }
View Full Code Here

                else if (element instanceof DistinguishedNameType) {
                  DistinguishedNameType object = (DistinguishedNameType) element;
                    return "DistinguishedName: name = \"" + object.getName() + "\"";
                }
                else if (element instanceof RealmPrincipalType) {
                  RealmPrincipalType object = (RealmPrincipalType) element;
                    return "RealmPrincipal: name = \"" + object.getName() +
                            "\", class = \"" + object.getClazz() +
                            "\", domain-name = \"" + object.getDomainName() +
                            "\", realm-name = \"" + object.getRealmName() +"\"";
                }
                else if (element instanceof LoginDomainPrincipalType) {
                  LoginDomainPrincipalType object = (LoginDomainPrincipalType) element;
                    return "LoginDomainPrincipal: name = \"" + object.getName() +
                            "\", class = \"" + object.getClazz() +
                            "\", domain-name = \"" + object.getDomainName() +"\"";
                }
                else if (element instanceof PrincipalType) {
                  PrincipalType object = (PrincipalType) element;
                    return "Principal: name = \"" + object.getName() +
                            "\", class = \"" + object.getClazz() + "\"";
                }

                return null;
            }
View Full Code Here

    public List getObjectContainer() {
        return getRoles(getPlan(), false);
    }

    public static List<RoleType> getRoles(JAXBElement plan, boolean create) {
      RoleMappingsType roleMappings = getRoleMappings(plan, create);
        if (roleMappings != null) {
            return roleMappings.getRole();
        }
        return null;
    }
View Full Code Here

        if (security == null && create) {
            security = new SecurityType();
            JAXBModelUtils.setSecurity(plan, security);
        }
        if (security != null) {
          RoleMappingsType roleMappings = security.getRoleMappings();
            if (roleMappings == null && create) {
                roleMappings = new RoleMappingsType();
                security.setRoleMappings(roleMappings);
            }
            return roleMappings;
        }
        return null;
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xml.ns.security_1.PrincipalType

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.