Package sagan.team.support

Source Code of sagan.team.support.MemberProfileSearchEntryMapper

package sagan.team.support;

import sagan.search.SearchEntry;
import sagan.search.SearchEntryMapper;
import sagan.team.MemberProfile;

import org.springframework.stereotype.Component;

@Component
class MemberProfileSearchEntryMapper implements SearchEntryMapper<MemberProfile> {
    @Override
    public SearchEntry map(MemberProfile profile) {
        SearchEntry entry = new SearchEntry();
        entry.setTitle(profile.getFullName());
        entry.setSummary(profile.getBio());
        entry.setRawContent(profile.getBio());
        entry.setPath("/team/" + profile.getUsername());
        return entry;
    }
}
TOP

Related Classes of sagan.team.support.MemberProfileSearchEntryMapper

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.