private UserProfile readProfile ( String userName , Node profileNode ) throws RepositoryException { UserProfile profile = createUserProfileInstance ( userName ) ; PropertyIterator attributes = profileNode . getProperties ( ) ; while ( attributes . hasNext ( ) ) { Property prop = attributes . nextProperty ( ) ; if ( prop . getName ( ) . startsWith ( ATTRIBUTE_PREFIX ) ) { String name = prop . getName ( ) . substring ( ATTRIBUTE_PREFIX . length ( ) ) ; String value = prop . getString ( ) ; profile . setAttribute ( name , value ) ; } } return profile ; }
Read user profile from storage .