public Profile createUserProfile(JetspeedUserProfile entity, Portlets portlets)
{
Profile profile = Profiler.createProfile();
try
{
JetspeedUser user = JetspeedSecurity.getUser(entity.getUserName());
if (null == user)
{
user = JetspeedUserFactory.getInstance();
user.setUserName(entity.getUserName());
}
profile.setUser(user);
profile.setMediaType(entity.getMediaType());
profile.setLanguage(entity.getLanguage());