{
locator.setUser(JetspeedSecurity.getUser(from));
}
locator.setMediaType(contentType);
PSMLDocument doc = fallback(locator);
if (doc != null)
{
PSMLDocument clonedDoc =
(PSMLDocument) SerializationUtils.clone(doc);
org.apache.jetspeed.util.PortletUtils.regenerateIds(
clonedDoc.getPortlets());
profile.setDocument(clonedDoc);
}
profile.setName(resourceDefault + resourceExt);
}
catch (Exception e)
{
logger.error("Error creating profile", e);
throw new ProfileException(e.toString());
}
}
try
{
profile.setMediaType(contentType);
PSMLDocument doc = PsmlManager.createDocument(profile);
Profile newProfile = (Profile) profile.clone();
newProfile.setDocument(doc);
return newProfile;
}