Exemplo n.º 1
0
 public void init(WebApp wapp) throws Exception {
   if (DHtmlUpdateServlet.getAuExtension(wapp, URI_PREFIX) == null) {
     try {
       DHtmlUpdateServlet.addAuExtension(wapp, URI_PREFIX, this);
     } catch (Throwable ex) {
       log.error("could not initialize AuRedirect extension", ex);
       throw new IllegalStateException("could not initialize AuRedirect extension", ex);
     }
   }
 }
Exemplo n.º 2
0
 /**
  * Returns the AU extension that is associated the specified prefix.
  *
  * @since 5.0.0
  */
 public static final AuExtension getAuExtension(WebApp wapp, String prefix) {
   DHtmlUpdateServlet upsv = DHtmlUpdateServlet.getUpdateServlet(wapp);
   if (upsv == null) {
     synchronized (DHtmlUpdateServlet.class) {
       upsv = DHtmlUpdateServlet.getUpdateServlet(wapp);
       if (upsv == null) {
         Map aues = (Map) wapp.getAttribute(ATTR_AU_PROCESSORS);
         return aues != null ? (AuExtension) aues.get(prefix) : null;
       }
     }
   }
   return upsv.getAuExtension(prefix);
 }