// Any error logging should go to the extension point
// we're constructing.
Log log = LogFactory.getLog(getExtensionPointId());
Orderer orderer = new Orderer(log, getModule().getErrorHandler(), ImplMessages
.interceptorContribution());
Iterator i = interceptorDefinitions.iterator();
while (i.hasNext())
{
InterceptorDefinition sid = (InterceptorDefinition) i.next();
// Sort them into runtime excecution order. When we build
// the interceptor stack we'll apply them in reverse order,
// building outward from the core service implementation.
String precedingNames = null;
String followingNames = null;
// Check if info about ordering is available
if (sid instanceof Orderable) {
Orderable orderable = (Orderable) sid;
precedingNames = orderable.getPrecedingNames();
followingNames = orderable.getFollowingNames();
}
orderer.add(sid, sid.getName(), precedingNames, followingNames);
}
return orderer.getOrderedObjects();
}