initProperties();
}
private void initProperties()
{
userPrincipalProperty = new AnnotatedBeanProperty(userClass, UserPrincipal.class);
userPasswordProperty = new AnnotatedBeanProperty(userClass, UserPassword.class);
passwordSaltProperty = new AnnotatedBeanProperty(userClass, PasswordSalt.class);
userRolesProperty = new AnnotatedBeanProperty(userClass, UserRoles.class);
userEnabledProperty = new AnnotatedBeanProperty(userClass, UserEnabled.class);
userFirstNameProperty = new AnnotatedBeanProperty(userClass, UserFirstName.class);
userLastNameProperty = new AnnotatedBeanProperty(userClass, UserLastName.class);
if (!userPrincipalProperty.isSet())
{
throw new IdentityManagementException("Invalid userClass " + userClass.getName() +
" - required annotation @UserPrincipal not found on any Field or Method.");
}
if (!userRolesProperty.isSet())
{
throw new IdentityManagementException("Invalid userClass " + userClass.getName() +
" - required annotation @UserRoles not found on any Field or Method.");
}
if (roleClass != null)
{
roleNameProperty = new AnnotatedBeanProperty(roleClass, RoleName.class);
roleGroupsProperty = new AnnotatedBeanProperty(roleClass, RoleGroups.class);
roleConditionalProperty = new AnnotatedBeanProperty(roleClass, RoleConditional.class);
if (!roleNameProperty.isSet())
{
throw new IdentityManagementException("Invalid roleClass " + roleClass.getName() +
" - required annotation @RoleName not found on any Field or Method.");