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;
}