public Adapter getAdapter(String contextRoot, String path, String urlPattern) { ContextAdapter serviceInfo = store.get(contextRoot); if (serviceInfo == null) { return null; } return serviceInfo.getAdapter(path, urlPattern); }
public void addAdapter(String contextRoot, String urlPattern, Adapter info) { if (contextRoot == null) contextRoot = ""; synchronized (store) { ContextAdapter contextRtInfo = store.get(contextRoot); if (contextRtInfo == null) { contextRtInfo = new ContextAdapter(); } contextRtInfo.addAdapter(urlPattern, info); store.put(contextRoot, contextRtInfo); } }
/** * Show Contest Info. * * <pre> * </pre> * * @param mapping action mapping * @param form action form * @param request http servlet request * @param response http servlet response * @return action forward instance * @throws Exception any errors happened */ @Override public ActionForward execute(ActionMapping mapping, ActionForm form, ContextAdapter context) throws Exception { // check contest boolean isProblemset = context.getRequest().getRequestURI().endsWith("problemsetInfo.do"); ActionForward forward = this.checkContestViewPermission(mapping, context, isProblemset, false); if (forward != null) { return forward; } return this.handleSuccess(mapping, context, "success"); }