PageSecurity document = (PageSecurity)getPersistenceBrokerTemplate().getObjectByQuery(query);
// return page or throw exception
if (document == null)
{
throw new DocumentNotFoundException("Document " + path + " not found.");
}
// check for view access on document
document.checkAccess(JetspeedActions.VIEW);
return document;
}
catch (DocumentNotFoundException dnfe)
{
throw dnfe;
}
catch (SecurityException se)
{
throw se;
}
catch (Exception e)
{
throw new DocumentNotFoundException("Document " + path + " not found.", e);
}
}