*/
private static final JetspeedLogger logger = JetspeedLogFactoryService.getLogger(JetspeedAccessController.class.getName());
public void doPerform( RunData data ) throws Exception
{
JetspeedUser user = (JetspeedUser)data.getUser();
getACL(data);
JetspeedRunData jdata = null;
try
{
jdata = (JetspeedRunData)data;
}
catch (ClassCastException e)
{
logger.error("The RunData object does not implement the expected interface, "
+ "please verify the RunData factory settings", e);
return;
}
Profile newProfile = null;
Profile currentProfile = null;
try
{
// get the profile and store it in the RunData
newProfile = Profiler.getProfile(jdata);
currentProfile = jdata.getProfile();
}
catch (Throwable other)
{
data.setScreenTemplate(JetspeedResources.getString(TurbineConstants.TEMPLATE_ERROR));
String message = other.getMessage() != null ? other.getMessage() : other.toString();
data.setMessage(message);
data.setStackTrace(org.apache.turbine.util.StringUtils.stackTrace(other), other);
if (currentProfile == null)
{
currentProfile = Profiler.createProfile();
}
if (newProfile == null)
{
newProfile = Profiler.createProfile();
}
if (data.getUser() == null)
{
JetspeedUser juser = new FakeJetspeedUser(JetspeedSecurity.getAnonymousUserName(), false);
data.setUser(juser);
}
}