Update of /var/cvs/contributions/didactor2/src/core/java/nl/didactor/component
In directory james.mmbase.org:/tmp/cvs-serv337
Modified Files:
MMBaseComponent.java
Log Message:
some robustness
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/java/nl/didactor/component
Index: MMBaseComponent.java
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/core/java/nl/didactor/component/MMBaseComponent.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- MMBaseComponent.java 8 Aug 2008 11:48:18 -0000 1.2
+++ MMBaseComponent.java 13 Aug 2008 11:03:58 -0000 1.3
@@ -13,7 +13,7 @@
/**
* The didactor component wrapping an mmbase component.
* @author Michiel Meeuwissen
- * @version $Id: MMBaseComponent.java,v 1.2 2008/08/08 11:48:18 michiel Exp $
+ * @version $Id: MMBaseComponent.java,v 1.3 2008/08/13 11:03:58 michiel Exp $
*/
public class MMBaseComponent extends nl.didactor.component.Component {
@@ -82,11 +82,16 @@
for (Block block : getComponent().getBlocks()) {
CLASS:
for (Block.Type type : block.getClassification()) {
+ if (type.getParent() == null) continue;
while (! type.getParent().getName().equals("didactor")) {
type = type.getParent();
if (type.getParent() == null) continue CLASS;
}
+ try {
Scope.valueOf(type.getName().toUpperCase()).put(scopes);
+ } catch (IllegalArgumentException iae) {
+ // never mind. Not a recognized scope.
+ }
}
}
log.info("Found " + scopes);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs