Update of /var/cvs/src/org/mmbase/framework
In directory james.mmbase.org:/tmp/cvs-serv19003

Modified Files:
        Component.java ComponentRepository.java 
Log Message:
javadoc


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/framework


Index: Component.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/framework/Component.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- Component.java      4 Sep 2008 21:20:02 -0000       1.22
+++ Component.java      8 Sep 2008 19:50:47 -0000       1.23
@@ -19,7 +19,7 @@
  * A Component bundles [EMAIL PROTECTED] Block}s, [EMAIL PROTECTED] Action}s 
and [EMAIL PROTECTED] Setting}s.
  *
  * @author Michiel Meeuwissen
- * @version $Id: Component.java,v 1.22 2008/09/04 21:20:02 michiel Exp $
+ * @version $Id: Component.java,v 1.23 2008/09/08 19:50:47 michiel Exp $
  * @since MMBase-1.9
  */
 public interface Component {
@@ -99,7 +99,7 @@
     /**
      * The baseName of the resource bundle associated with i18n messages for 
this component.
      * See [EMAIL PROTECTED] java.util.ResourceBundle#getBundle(String, 
Locale)}. The framework should decorate
-     * the request with this like fmt:bundle before rendinger a block.
+     * the request with this like fmt:bundle would do before rendinger a block.
      */
     String getBundle();
 


Index: ComponentRepository.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/framework/ComponentRepository.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- ComponentRepository.java    4 Sep 2008 05:56:23 -0000       1.42
+++ ComponentRepository.java    8 Sep 2008 19:50:47 -0000       1.43
@@ -25,7 +25,7 @@
  * Components can be configured by placing their configuration in 
'config/components/'.
  *
  * @author Michiel Meeuwissen
- * @version $Id: ComponentRepository.java,v 1.42 2008/09/04 05:56:23 michiel 
Exp $
+ * @version $Id: ComponentRepository.java,v 1.43 2008/09/08 19:50:47 michiel 
Exp $
  * @since MMBase-1.9
  */
 public class ComponentRepository {
@@ -70,7 +70,7 @@
     private ComponentRepository() { }
 
     /**
-     * Converts a comma seperated list of blocks to an array of [EMAIL 
PROTECTED] Block.Type}.s. Possible
+     * Converts a comma seperated list of blocks to an array of [EMAIL 
PROTECTED] Block.Type}s. Possible
      * 'weights' per block are ignored.
      */
     public Block.Type[] getBlockClassification(String id) {
@@ -79,8 +79,6 @@
         } else {
             return Block.Type.getClassification(id, false);
         }
-
-
     }
 
     /**
@@ -93,11 +91,15 @@
     /**
      * The components which could not be instantiated or configured, due to 
some
      * misconfiguration.
+     * @todo failed collection seems to be unused, so this wil always return 
an empty set.
      */
     public Collection<Component> getFailedComponents() {
         return Collections.unmodifiableCollection(failed);
     }
 
+    /**
+     * An (unmodifiable) map representing the complete repository
+     */
     public Map<String, Component> toMap()  {
         return Collections.unmodifiableMap(rep);
     }
@@ -108,19 +110,35 @@
     public Component getComponent(String name) {
         return rep.get(name);
     }
-
+    /**
+     * Returns a certain block for a certain component. Much like [EMAIL 
PROTECTED]
+     * #getComponent(String)[EMAIL PROTECTED] Component#getBlock(String)}.
+     * @throws IllegalArgumentException if no component with given name.
+     * @return a Block or <code>null</code> if given component has no such 
block.
+     */
     public Block getBlock(String componentName, String blockName) {
         Component component = getComponent(componentName);
         if (component == null) throw new IllegalArgumentException("No 
component with name '" + componentName + "'");
         return component.getBlock(blockName);
     }
 
+    /**
+     * Returns a default block for a certain component. Much like [EMAIL 
PROTECTED]
+     * #getComponent(String)[EMAIL PROTECTED] Component#getDefaultBlock()}.
+     * @throws IllegalArgumentException if no component with given name.
+     */
     public Block getDefaultBlock(String componentName) {
         Component component = getComponent(componentName);
         if (component == null) throw new IllegalArgumentException("No 
component with name '" + componentName + "'");
         return component.getDefaultBlock();
     }
 
+    /** 
+     * Tries to resolve unsatisified dependencies, in all components, by 
calling [EMAIL PROTECTED]
+     * Component#resolve(VirtualComponent, Component)} on all [EMAIL PROTECTED]
+     * Component#getUnsatisfiedDependencies} of all components.
+     * @return <code>true</code> if no unsatisfied dependencies remain.
+     */
     protected boolean resolve() {
         int unsatisfied = 0;
         for (Component comp : getComponents()) {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to