]> source.dussan.org Git - vaadin-framework.git/commitdiff
Add javadoc in ServerConnector
authorHenri Sara <hesara@vaadin.com>
Mon, 23 Nov 2015 10:23:12 +0000 (12:23 +0200)
committerHenri Sara <hesara@vaadin.com>
Mon, 23 Nov 2015 10:23:12 +0000 (12:23 +0200)
Add missing javadoc for ServerConnector.get/setChildren().

Change-Id: I7ba143d41602a5f2a069635911a0ea61a92806e6

client/src/com/vaadin/client/HasComponentsConnector.java
client/src/com/vaadin/client/ServerConnector.java

index 3d8df3b8cd498c6b4444e10a0dba7c09ff1b7add..19b93edd617f187103fb9e79ecba2a0c0004ac78 100644 (file)
@@ -45,14 +45,17 @@ public interface HasComponentsConnector extends ServerConnector {
     void updateCaption(ComponentConnector connector);
 
     /**
-     * Returns the children for this connector.
+     * Returns the child components for this connector.
      * <p>
      * The children for this connector are defined as all {@link HasComponents}s
      * whose parent is this {@link HasComponentsConnector}.
-     * </p>
+     * <p>
+     * Note that the method {@link ServerConnector#getChildren()} can return a
+     * larger list of children including both the child components and any
+     * extensions registered for the connector.
      * 
-     * @return A collection of children for this connector. An empty collection
-     *         if there are no children. Never returns null.
+     * @return A collection of child components for this connector. An empty
+     *         collection if there are no children. Never returns null.
      */
     public List<ComponentConnector> getChildComponents();
 
@@ -65,9 +68,14 @@ public interface HasComponentsConnector extends ServerConnector {
      * {@link ConnectorHierarchyChangeHandler#onConnectorHierarchyChange(ConnectorHierarchyChangeEvent)}
      * . The event method is called only when the hierarchy has been updated for
      * all connectors.
+     * <p>
+     * Note that this method is separate from
+     * {@link ServerConnector#setChildren(List)} and contains only child
+     * components. Both methods are called separately by the framework if the
+     * connector implements {@link HasComponentsConnector}.
      * 
      * @param children
-     *            The new child connectors
+     *            The new child connectors (components only)
      */
     public void setChildComponents(List<ComponentConnector> children);
 
index 4eaa7bc0861599a969f89e71c08f6f705374d7ef..0bc2ac99952974f825d7a16751b86a8335a6cfd7 100644 (file)
@@ -162,8 +162,33 @@ public interface ServerConnector extends Connector {
 
     public void updateEnabledState(boolean enabledState);
 
+    /**
+     * Sets the children for this connector. This method should only be called
+     * by the framework to ensure that the connector hierarchy on the client
+     * side and the server side are in sync.
+     * <p>
+     * Note that this method is separate from
+     * {@link HasComponentsConnector#setChildComponents(List)} and takes both
+     * extensions and child components. Both methods are called separately by
+     * the framework if the connector can have child components.
+     * 
+     * @param children
+     *            The new child connectors (extensions and/or components)
+     */
     public void setChildren(List<ServerConnector> children);
 
+    /**
+     * Returns the child connectors for this connector (child components and
+     * extensions).
+     * <p>
+     * Note that the method {@link HasComponentsConnector#getChildComponents()}
+     * can be used to obtain the subset of child connectors that correspond to
+     * components and not extensions.
+     * 
+     * @return A collection of child connectors (components or extensions) for
+     *         this connector. An empty collection if there are no children.
+     *         Never returns null.
+     */
     public List<ServerConnector> getChildren();
 
     /**