use of io.vertigo.account.impl.account.AccountMapperHelper in project vertigo by KleeGroup.
the class AbstractAccountStorePlugin method start.
/**
* {@inheritDoc}
*/
@Override
public final void start() {
userDtDefinition = Home.getApp().getDefinitionSpace().resolve(userDtDefinitionName, DtDefinition.class);
mapperHelper = new AccountMapperHelper(userDtDefinition, AccountProperty.class, userToAccountMappingStr).withMandatoryDestField(AccountProperty.id).withMandatoryDestField(AccountProperty.displayName).withMandatoryDestField(AccountProperty.authToken).parseAttributeMapping();
postStart();
}
use of io.vertigo.account.impl.account.AccountMapperHelper in project vertigo by KleeGroup.
the class StoreAccountStorePlugin method postStart.
@Override
protected void postStart() {
userGroupDtDefinition = Home.getApp().getDefinitionSpace().resolve(groupIdentityEntity, DtDefinition.class);
mapperHelper = new AccountMapperHelper(userGroupDtDefinition, GroupProperty.class, groupToGroupAccountMappingStr).withMandatoryDestField(GroupProperty.id).withMandatoryDestField(GroupProperty.displayName).parseAttributeMapping();
for (final AssociationDefinition association : Home.getApp().getDefinitionSpace().getAll(AssociationDefinition.class)) {
if ((userGroupDtDefinition.equals(association.getAssociationNodeA().getDtDefinition()) && getUserDtDefinition().equals(association.getAssociationNodeB().getDtDefinition()))) {
associationUserGroup = association;
associationUserRoleName = association.getAssociationNodeB().getRole();
associationGroupRoleName = association.getAssociationNodeA().getRole();
break;
} else if (userGroupDtDefinition.equals(association.getAssociationNodeB().getDtDefinition()) && getUserDtDefinition().equals(association.getAssociationNodeA().getDtDefinition())) {
associationUserGroup = association;
associationUserRoleName = association.getAssociationNodeA().getRole();
associationGroupRoleName = association.getAssociationNodeB().getRole();
break;
}
}
Assertion.checkNotNull(associationUserGroup, "Association between User ({0}) and Group ({1}) not found", getUserDtDefinition().getClassSimpleName(), userGroupDtDefinition.getClassSimpleName());
Assertion.checkState(associationUserGroup instanceof AssociationSimpleDefinition || associationUserGroup instanceof AssociationNNDefinition, "Association ({0}) between User and Group must be an AssociationSimpleDefinition or an AssociationNNDefinition", associationUserGroup.getName());
}
use of io.vertigo.account.impl.account.AccountMapperHelper in project vertigo by KleeGroup.
the class LdapIdentityProviderPlugin method start.
/**
* {@inheritDoc}
*/
@Override
public void start() {
final DtDefinition userDtDefinition = Home.getApp().getDefinitionSpace().resolve(userDtDefinitionName, DtDefinition.class);
mapperHelper = new AccountMapperHelper(userDtDefinition, ldapUserAttributeMappingStr).withReservedDestField(PHOTO_RESERVED_FIELD).parseAttributeMapping();
}
Aggregations