String msg = "CdnRouter - CdnRoutingProvider did not set up '" + CUBE_NAME + "' or '" + CUBE_VERSION + "' in the Map coordinate.";
sendErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg);
return;
}
NCube routingCube = NCubeManager.getCube(cubeName, version);
if (routingCube == null)
{
Connection connection = (Connection) coord.get(CONNECTION);
String app = (String) coord.get(APP);
String status = (String) coord.get(STATUS);
Date date = (Date) coord.get(DATE);
if (connection == null)
{
String msg = "CdnRouter - CdnRoutingProvider did not set up '" + CONNECTION + "' in the Map coordinate.";
sendErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg);
return;
}
if (StringUtilities.isEmpty(app))
{
String msg = "CdnRouter - CdnRoutingProvider did not set '" + APP + "' in the Map coordinate.";
sendErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg);
return;
}
if (StringUtilities.isEmpty(status))
{
String msg = "CdnRouter - CdnRoutingProvider did not set '" + STATUS + "' in the Map coordinate.";
sendErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg);
return;
}
routingCube = NCubeManager.loadCube(connection, app, cubeName, version, status, date);
}
coord.put(CONTENT_NAME, logicalName);
coord.put(CONTENT_TYPE, type);
Map output = new HashMap();
routingCube.getCell(coord, output, new CdnUrlExecutor(request, response));
}
catch (Exception e)
{
String msg = "CdnRouter - Error occurred writing HTTP response: " + e.getMessage();
sendErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg);