Examples of GerPrincipalType


Examples of org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType

        return ConfigurationUtil.generatePrincipal(principalType.getClass1().trim(), principalType.getName().trim(), bundle);
    }

    //used from TSSConfigEditor
    public PrincipalInfo buildPrincipal(XmlObject xmlObject) {
        GerPrincipalType principalType = (GerPrincipalType) xmlObject;
        return new PrincipalInfo(principalType.getClass1().trim(), principalType.getName().trim());
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType

        return new LoginDomainPrincipalInfo(domainPrincipalType.getDomainName().trim(), domainPrincipalType.getClass1().trim(), domainPrincipalType.getName().trim());
    }

    //used from TSSConfigEditor
    public PrincipalInfo buildPrincipal(XmlObject xmlObject) {
        GerPrincipalType principalType = (GerPrincipalType) xmlObject;
        return new PrincipalInfo(principalType.getClass1().trim(), principalType.getName().trim());
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType

        return new LoginDomainPrincipalInfo(domainPrincipalType.getDomainName().trim(), domainPrincipalType.getClass1().trim(), domainPrincipalType.getName().trim());
    }

    //used from TSSConfigEditor
    public PrincipalInfo buildPrincipal(XmlObject xmlObject) {
        GerPrincipalType principalType = (GerPrincipalType) xmlObject;
        return new PrincipalInfo(principalType.getClass1().trim(), principalType.getName().trim());
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType

        return new LoginDomainPrincipalInfo(domainPrincipalType.getDomainName().trim(), domainPrincipalType.getClass1().trim(), domainPrincipalType.getName().trim(), domainPrincipalType.isSetDesignatedRunAs());
    }

    //used from TSSConfigEditor
    public PrincipalInfo buildPrincipal(XmlObject xmlObject) {
        GerPrincipalType principalType = (GerPrincipalType) xmlObject;
        return new PrincipalInfo(principalType.getClass1().trim(), principalType.getName().trim(), principalType.isSetDesignatedRunAs());
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType

        return ConfigurationUtil.generatePrincipal(principalType.getClass1().trim(), principalType.getName().trim(), bundle);
    }

    //used from TSSConfigEditor
    public PrincipalInfo buildPrincipal(XmlObject xmlObject) {
        GerPrincipalType principalType = (GerPrincipalType) xmlObject;
        return new PrincipalInfo(principalType.getClass1().trim(), principalType.getName().trim());
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType

        return new LoginDomainPrincipalInfo(domainPrincipalType.getDomainName().trim(), domainPrincipalType.getClass1().trim(), domainPrincipalType.getName().trim(), domainPrincipalType.isSetDesignatedRunAs());
    }

    //used from TSSConfigEditor
    public PrincipalInfo buildPrincipal(XmlObject xmlObject) {
        GerPrincipalType principalType = (GerPrincipalType) xmlObject;
        return new PrincipalInfo(principalType.getClass1().trim(), principalType.getName().trim(), principalType.isSetDesignatedRunAs());
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType

                for (int j = 0; j < jPrincipals.length; j++) {
                    SecurityPrincipalJson jPrincipal = jPrincipals[j];
                    String type = jPrincipal.getType();

                    if (type.equals("Principal")) {
                        GerPrincipalType principal = role.addNewPrincipal();
                        principal.setName(jPrincipal.getPrincipalName());
                        principal.setClass1(jPrincipal.getClassName());
                    } else if (type.equals("LoginDomainPrincipal")) {
                        GerLoginDomainPrincipalType principal = role.addNewLoginDomainPrincipal();
                        principal.setName(jPrincipal.getPrincipalName());
                        principal.setClass1(jPrincipal.getClassName());
                        principal.setDomainName(jPrincipal.getDomainName());
                    } else if (type.equals("RealmPrincipal")) {
                        GerRealmPrincipalType principal = role.addNewRealmPrincipal();
                        principal.setName(jPrincipal.getPrincipalName());
                        principal.setClass1(jPrincipal.getClassName());
                        principal.setDomainName(jPrincipal.getDomainName());
                        principal.setRealmName(jPrincipal.getRealmName());
                    } else if (type.equals("DistinguishedName")) {
                        GerDistinguishedNameType principal = role.addNewDistinguishedName();
                        principal.setName(jPrincipal.getPrincipalName());
                    }
                }

                if (runAsSubjects != null
                        && runAsSubjects.containsKey(item.getRoleName())) {
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType

                    for (int j = 0; j < realms.length; j++) {
                        GerRealmType realm = realms[j];
                        GerPrincipalType[] principals = realm.getPrincipalArray();
                        HashSet set = new HashSet();
                        for (int k = 0; k < principals.length; k++) {
                            GerPrincipalType principal = principals[k];
                            java.security.Principal p = null;
                            try {
                                Class clazz = Class.forName(principal.getClass1());
                                Constructor constructor = clazz.getDeclaredConstructor(new Class[]{String.class});
                                p = (java.security.Principal) constructor.newInstance(new Object[]{principal.getName()});
                                set.add(new RealmPrincipal(realm.getRealmName(), p));
                            } catch (InstantiationException e) {
                                throw new GeronimoSecurityException(e);
                            } catch (IllegalAccessException e) {
                                throw new GeronimoSecurityException(e);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType

                    for (int j = 0; j < realms.length; j++) {
                        GerRealmType realm = realms[j];
                        GerPrincipalType[] principals = realm.getPrincipalArray();
                        HashSet set = new HashSet();
                        for (int k = 0; k < principals.length; k++) {
                            GerPrincipalType principal = principals[k];
                            java.security.Principal p = null;
                            try {
                                Class clazz = Class.forName(principal.getClass1());
                                Constructor constructor = clazz.getDeclaredConstructor(new Class[]{String.class});
                                p = (java.security.Principal) constructor.newInstance(new Object[]{principal.getName()});
                                set.add(new RealmPrincipal(realm.getRealmName(), p));
                            } catch (InstantiationException e) {
                                throw new GeronimoSecurityException(e);
                            } catch (IllegalAccessException e) {
                                throw new GeronimoSecurityException(e);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType

            for (int i = 0; i < lastIndex; i++) {
                String prefix2 = prefix1 + "principal" + "." + i + ".";
                if (!map.containsKey(prefix2 + "name")) {
                    continue;
                }
                GerPrincipalType principal = role.addNewPrincipal();
                principal.setName(request.getParameter(prefix2 + "name"));
                principal.setClass1(request.getParameter(prefix2 + "class"));
            }

            for (int i = role.sizeOfLoginDomainPrincipalArray() - 1; i >= 0; i--) {
                role.removeLoginDomainPrincipal(i);
            }
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.