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;
}
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;
}
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())) {
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());