@Override
public RackResponse call(MicroContext context) throws Exception {
RackResponse response = null;
if (context != null) {
SiteContext site = context.getSiteContext();
if (!CollectionUtils.isEmpty(getControllers())) {
for (int i = 0; i < getControllers().size(); i++) {
Map<String, Object> controllerMap = getControllers().get(i);
site.getControllerManager().execute((String) controllerMap.get(Globals.NAME),
context, (Map) controllerMap.get(Globals.OPTIONS));
if (context.isHalt()) return context.getRackResponse();
}
}
if (getView() != null && getView().getPath() != null) {
response = context.getRackResponse();
RepositoryManager repositoryManager = site.getRepositoryManager();
String repositoryName = StringUtils.defaultString(getView().getRepositoryName(),
repositoryManager.getDefaultRepository().getName());
String path = getView().getPath();