Adds a handler for container page events.<p>

@param handler the handler to add
433708
public void addContainerpageEventHandler(I_CmsContainerpageEventHandler handler) {

        CmsCoreProvider.get().getEventBus().addHandler(CmsContainerpageEvent.TYPE, handler);
    }
666029
public void setHandler(Object handler){
        if(handler instanceof ContentHandler)
            setContentHandler((ContentHandler)handler);
        if(handler instanceof EntityResolver)
            setEntityResolver((EntityResolver)handler);
        if(handler instanceof ErrorHandler)
            setErrorHandler((ErrorHandler)handler);
        if(handler instanceof DTDHandler)
            setDTDHandler((DTDHandler)handler);
        if(handler instanceof LexicalHandler)
            setLexicalHandler((LexicalHandler)handler);
        if(handler instanceof DeclHandler)
            setDeclHandler((DeclHandler)handler);
    }
259989
public void setContentHandler(ContentHandler handler)
  {

    if (handler == null)
    {
      throw new NullPointerException(XSLMessages.createMessage(XSLTErrorResources.ER_NULL_CONTENT_HANDLER, null)); //"Null content handler");
    }
    else
    {
      m_outputContentHandler = handler;

      if (null == m_serializationHandler)
      {
        ToXMLSAXHandler h = new ToXMLSAXHandler();
        h.setContentHandler(handler);
        h.setTransformer(this);
        
        m_serializationHandler = h;
      }
      else
        m_serializationHandler.setContentHandler(handler);
    }
  }
754231
final void addHandler(final HttpHandler handler) {
    if (handler != null) {
      if (!eventHandlers.containsKey(handler.getUriSpecification().toLowerCase())) {
        eventHandlers.put(handler.getUriSpecification().toLowerCase(), handler);
      } else {
        LOG.log(Level.WARNING, "JettyHandler handle is already registered: {0} ", handler.getUriSpecification());
      }
    }
  }
781741
@Override
  public void addHttpHandler(final HttpHandler httpHandler) {
    LOG.log(Level.INFO, "addHttpHandler: {0}", httpHandler.getUriSpecification());
    jettyHandler.addHandler(httpHandler);
  }
921711
public JsHandlerRegistration addGeometryIndexEnabledHandler(final GeometryIndexEnabledHandler handler) {
		org.geomajas.plugin.editing.client.event.state.GeometryIndexEnabledHandler h;
		h = new org.geomajas.plugin.editing.client.event.state.GeometryIndexEnabledHandler() {

			public void onGeometryIndexEnabled(GeometryIndexEnabledEvent event) {
				org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexEnabledEvent e;
				List<GeometryIndex> indices = event.getIndices();
				e = new org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexEnabledEvent(
						event.getGeometry(), indices.toArray(new GeometryIndex[indices.size()]));
				handler.onGeometryIndexEnabled(e);
			}
		};
		return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryIndexEnabledHandler(h) });
	}
1254452
private static void registerMiddlewareHandler(Object handler) {
		if(handler instanceof MiddlewareHandler) {
			// register the middleware handler if it is enabled.
			if(((MiddlewareHandler) handler).isEnabled()) {
				((MiddlewareHandler) handler).register();
			}
		}
	}
618814
public void addResourceHandler(Class<? extends NamedResource> clazz, JavaMailAttachmentResourceHandler handler) {
		map.put(clazz, handler);
	}
1114252
public void init(
        CmsContainerpageHandler handler,
        CmsDNDHandler dndHandler,
        CmsContentEditorHandler contentEditorHandler,
        CmsContainerpageUtil containerpageUtil) {

        Window.addResizeHandler(new ResizeHandler() {

            public void onResize(ResizeEvent event) {

                CmsContainerpageController.this.onResize();
            }
        });
        m_containerpageUtil = containerpageUtil;
        m_handler = handler;
        m_contentEditorHandler = contentEditorHandler;
        m_dndHandler = dndHandler;
        m_cntDndController = m_dndHandler.getController();

        m_elements = new HashMap<String, CmsContainerElementData>();
        m_newElements = new HashMap<String, CmsContainerElementData>();
        m_containers = new HashMap<String, CmsContainer>();
        if (m_data == null) {
            m_handler.m_editor.disableEditing(Messages.get().key(Messages.ERR_READING_CONTAINER_PAGE_DATA_0));
            CmsErrorDialog dialog = new CmsErrorDialog(
                Messages.get().key(Messages.ERR_READING_CONTAINER_PAGE_DATA_0),
                null);
            dialog.center();
            return;
        }
        // ensure any embedded flash players are set opaque so UI elements may be placed above them
        CmsDomUtil.fixFlashZindex(RootPanel.getBodyElement());
        m_targetContainers = m_containerpageUtil.consumeContainers(m_containers, RootPanel.getBodyElement());
        updateContainerLevelInfo();
        resetEditButtons();
        Event.addNativePreviewHandler(new NativePreviewHandler() {

            public void onPreviewNativeEvent(NativePreviewEvent event) {

                previewNativeEvent(event);
            }
        });
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_data.getNoEditReason())) {
            m_handler.m_editor.disableEditing(m_data.getNoEditReason());
        } else {
            checkLockInfo();
        }

        // initialize the browser history handler
        History.addValueChangeHandler(new ValueChangeHandler<String>() {

            public void onValueChange(ValueChangeEvent<String> event) {

                String historyToken = event.getValue();
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(historyToken)) {
                    getContentEditorHandler().openEditorForHistory(historyToken);
                } else {
                    getContentEditorHandler().closeContentEditor();
                }
            }
        });
        AsyncCallback<Void> doNothing = new AsyncCallback<Void>() {

            public void onFailure(Throwable caught) {

                // nothing to do
            }

            public void onSuccess(Void result) {

                // nothing to do
            }
        };
        getContainerpageService().setLastPage(CmsCoreProvider.get().getStructureId(), m_data.getDetailId(), doNothing);

        // check if there is already a history item available
        String historyToken = History.getToken();
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(historyToken)) {
            m_contentEditorHandler.openEditorForHistory(historyToken);
        }

        updateGalleryData(false, null);
    }
544909
public void addHandler(final Handler handler, final boolean wait) throws InterruptedException, CouldNotPerformException {
        try {
            listener.addHandler(handler, wait);
        } catch (CouldNotPerformException ex) {
            throw new CouldNotPerformException("Could not register Handler!", ex);
        }
    }
458737
private void stopDrag(final CmsDNDHandler handler) {

        removeDragOverlay();
        for (I_CmsDropTarget target : m_dragInfos.keySet()) {
            target.getElement().removeClassName(I_CmsLayoutBundle.INSTANCE.dragdropCss().dragging());
            target.getElement().removeClassName(I_CmsLayoutBundle.INSTANCE.dragdropCss().clearFix());
            Style targetStyle = target.getElement().getStyle();
            if (!(target instanceof CmsGroupContainerElementPanel)) {
                targetStyle.clearPosition();
            }
            targetStyle.clearMarginTop();
            targetStyle.clearMarginBottom();
            if (target instanceof I_CmsDropContainer) {
                ((I_CmsDropContainer)target).removeHighlighting();
            }
        }
        handler.getDragHelper().removeFromParent();
        m_copyGroupId = null;
        m_currentTarget = null;
        m_currentIndex = -1;
        m_isNew = false;
        m_controller.getHandler().deactivateMenuButton();
        final List<I_CmsDropTarget> dragTargets = new ArrayList<I_CmsDropTarget>(m_dragInfos.keySet());
        m_dragInfos.clear();
        Scheduler.get().scheduleDeferred(new ScheduledCommand() {

            /**
             * @see com.google.gwt.user.client.Command#execute()
             */
            public void execute() {

                handler.clearTargets();
                m_controller.resetEditButtons();
                // in case of group editing, this will refresh the container position and size
                for (I_CmsDropTarget target : dragTargets) {
                    if (target instanceof I_CmsDropContainer) {
                        ((I_CmsDropContainer)target).refreshHighlighting();
                        // reset the nested container infos
                        ((I_CmsDropContainer)target).clearDnDChildren();
                    }
                }
            }
        });
        if (handler.getDraggable() instanceof CmsContainerPageElementPanel) {
            ((CmsContainerPageElementPanel)(handler.getDraggable())).removeHighlighting();
        }
    }
970380
public synchronized static void addHandler(Handler handler) {
      java.util.logging.Logger root = java.util.logging.LogManager.getLogManager().getLogger(StringUtils.EMPTY);
      root.addHandler(handler);
   }
898633
public static void call(Class<? extends Unit> unitClass, Handler<UnitResponse> handler) {
        call(unitClass, new HashMap<>(), handler);
    }
464412
@Nonnull
  public final HandlerRegistration addOpenHandler( @Nonnull final OpenEvent.Handler handler )
  {
    return _eventBus.addHandler( OpenEvent.getType(), handler );
  }
672447
void perform(ContentHandler handler, SectionState state) {
    final ModeUsage modeUsage = getModeUsage();
    if (handler != null)
      state.addActiveHandler(handler, modeUsage);
    else
      state.addAttributeValidationModeUsage(modeUsage);
    state.addChildMode(modeUsage, handler);
  }
509565
public void addHandler(CacheMissHandler handler) {
		if(handler != null) {
			logger.debug("adding handler of class '{}'", handler.getClass());
			handlers.add(handler);
		}
	}
276351
def add_handler(self, message_type, handler):
        """"""
        if message_type not in self._handlers:
            self._handlers[message_type] = []

        if handler not in self._handlers[message_type]:
            self._handlers[message_type].append(handler)