* @throws NodeException
*/
public FragmentDefinition getFragmentDefinition(String name, boolean checkAccess) throws PageNotFoundException, NodeException
{
// get fragment definition
FragmentDefinition fragmentDefinition = (FragmentDefinition) getAllNodes().subset(FragmentDefinition.DOCUMENT_TYPE).get(name);
if (fragmentDefinition == null)
{
throw new PageNotFoundException("Jetspeed PSML fragment definition not found: " + name);
}
// check access
if (checkAccess)
{
fragmentDefinition.checkAccess(JetspeedActions.VIEW);
}
return fragmentDefinition;
}