[MMBASE CVS] contributions/didactor2/src/core/java/nl/didactor/component MMBaseComponent.java
Update of /var/cvs/contributions/didactor2/src/core/java/nl/didactor/component In directory james.mmbase.org:/tmp/cvs-serv30255 Modified Files: MMBaseComponent.java Log Message: clarified exception 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.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- MMBaseComponent.java18 Sep 2008 10:54:32 - 1.6 +++ MMBaseComponent.java24 Nov 2008 15:07:32 - 1.7 @@ -13,7 +13,7 @@ /** * The didactor component wrapping an mmbase component. * @author Michiel Meeuwissen - * @version $Id: MMBaseComponent.java,v 1.6 2008/09/18 10:54:32 michiel Exp $ + * @version $Id: MMBaseComponent.java,v 1.7 2008/11/24 15:07:32 michiel Exp $ */ public class MMBaseComponent extends nl.didactor.component.Component { @@ -112,7 +112,7 @@ org.mmbase.framework.Component component = getComponent(); if (component == null) throw new IllegalStateException(No component ' + name + ' found); org.mmbase.framework.Setting setting = component.getSetting(didactor_templatebar); -if (setting == null) throw new IllegalStateException(); +if (setting == null) throw new IllegalStateException(No setting 'didactor_templatebar' in + component); return (String) fw.getSettingValue(setting, fw.createSettingValueParameters()); } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/didactor2/src/core/java/nl/didactor/component MMBaseComponent.java
Update of /var/cvs/contributions/didactor2/src/core/java/nl/didactor/component In directory james.mmbase.org:/tmp/cvs-serv6086 Modified Files: MMBaseComponent.java Log Message: lowered a log 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.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- MMBaseComponent.java21 Aug 2008 09:42:34 - 1.5 +++ MMBaseComponent.java18 Sep 2008 10:54:32 - 1.6 @@ -13,7 +13,7 @@ /** * The didactor component wrapping an mmbase component. * @author Michiel Meeuwissen - * @version $Id: MMBaseComponent.java,v 1.5 2008/08/21 09:42:34 michiel Exp $ + * @version $Id: MMBaseComponent.java,v 1.6 2008/09/18 10:54:32 michiel Exp $ */ public class MMBaseComponent extends nl.didactor.component.Component { @@ -94,7 +94,9 @@ } } } -log.info(Found + scopes); +if (log.isDebugEnabled()) { +log.debug(Found + scopes); +} return scopes; } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/didactor2/src/core/java/nl/didactor/component MMBaseComponent.java
Update of /var/cvs/contributions/didactor2/src/core/java/nl/didactor/component In directory james.mmbase.org:/tmp/cvs-serv32373/core/java/nl/didactor/component Modified Files: MMBaseComponent.java Log Message: Just added some @Override 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.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- MMBaseComponent.java13 Aug 2008 11:03:58 - 1.3 +++ MMBaseComponent.java21 Aug 2008 09:08:46 - 1.4 @@ -13,7 +13,7 @@ /** * The didactor component wrapping an mmbase component. * @author Michiel Meeuwissen - * @version $Id: MMBaseComponent.java,v 1.3 2008/08/13 11:03:58 michiel Exp $ + * @version $Id: MMBaseComponent.java,v 1.4 2008/08/21 09:08:46 michiel Exp $ */ public class MMBaseComponent extends nl.didactor.component.Component { @@ -98,10 +98,12 @@ return scopes; } +@Override public int getNumber() { return number; } +@Override public String getTemplateBar() { Framework fw = Framework.getInstance(); return (String) fw.getSettingValue(getComponent().getSetting(didactor_templatebar), fw.createSettingValueParameters()); ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/didactor2/src/core/java/nl/didactor/component MMBaseComponent.java
Update of /var/cvs/contributions/didactor2/src/core/java/nl/didactor/component In directory james.mmbase.org:/tmp/cvs-serv499 Modified Files: MMBaseComponent.java Log Message: cleared exceptions if something's wrong 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.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- MMBaseComponent.java21 Aug 2008 09:08:46 - 1.4 +++ MMBaseComponent.java21 Aug 2008 09:42:34 - 1.5 @@ -13,7 +13,7 @@ /** * The didactor component wrapping an mmbase component. * @author Michiel Meeuwissen - * @version $Id: MMBaseComponent.java,v 1.4 2008/08/21 09:08:46 michiel Exp $ + * @version $Id: MMBaseComponent.java,v 1.5 2008/08/21 09:42:34 michiel Exp $ */ public class MMBaseComponent extends nl.didactor.component.Component { @@ -106,7 +106,12 @@ @Override public String getTemplateBar() { Framework fw = Framework.getInstance(); -return (String) fw.getSettingValue(getComponent().getSetting(didactor_templatebar), fw.createSettingValueParameters()); +if (fw == null) throw new IllegalStateException(); +org.mmbase.framework.Component component = getComponent(); +if (component == null) throw new IllegalStateException(No component ' + name + ' found); +org.mmbase.framework.Setting setting = component.getSetting(didactor_templatebar); +if (setting == null) throw new IllegalStateException(); +return (String) fw.getSettingValue(setting, fw.createSettingValueParameters()); } } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/didactor2/src/core/java/nl/didactor/component MMBaseComponent.java
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.java8 Aug 2008 11:48:18 - 1.2 +++ MMBaseComponent.java13 Aug 2008 11:03:58 - 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 Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/didactor2/src/core/java/nl/didactor/component MMBaseComponent.java
Update of /var/cvs/contributions/didactor2/src/core/java/nl/didactor/component In directory james.mmbase.org:/tmp/cvs-serv3330/component Modified Files: MMBaseComponent.java Log Message: some details 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.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- MMBaseComponent.java7 Aug 2008 16:33:49 - 1.1 +++ MMBaseComponent.java8 Aug 2008 11:48:18 - 1.2 @@ -13,7 +13,7 @@ /** * The didactor component wrapping an mmbase component. * @author Michiel Meeuwissen - * @version $Id: MMBaseComponent.java,v 1.1 2008/08/07 16:33:49 michiel Exp $ + * @version $Id: MMBaseComponent.java,v 1.2 2008/08/08 11:48:18 michiel Exp $ */ public class MMBaseComponent extends nl.didactor.component.Component { @@ -71,11 +71,15 @@ } +protected org.mmbase.framework.Component getComponent() { +return ComponentRepository.getInstance().getComponent(name); +} + @Override public MapString, String getScopesMap() { MapString, String scopes = new HashMapString, String(); -for (Block block : ComponentRepository.getInstance().getComponent(name).getBlocks()) { +for (Block block : getComponent().getBlocks()) { CLASS: for (Block.Type type : block.getClassification()) { while (! type.getParent().getName().equals(didactor)) { @@ -93,5 +97,10 @@ return number; } +public String getTemplateBar() { +Framework fw = Framework.getInstance(); +return (String) fw.getSettingValue(getComponent().getSetting(didactor_templatebar), fw.createSettingValueParameters()); +} + } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/didactor2/src/core/java/nl/didactor/component MMBaseComponent.java BasicComponent.java Component.java
Update of /var/cvs/contributions/didactor2/src/core/java/nl/didactor/component In directory james.mmbase.org:/tmp/cvs-serv10382/component Modified Files: BasicComponent.java Component.java Added Files: MMBaseComponent.java Log Message: mmbase component wrapper See also: http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/java/nl/didactor/component MMBaseComponent.java is new Index: BasicComponent.java === RCS file: /var/cvs/contributions/didactor2/src/core/java/nl/didactor/component/BasicComponent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- BasicComponent.java 6 Jan 2006 13:20:00 - 1.1 +++ BasicComponent.java 7 Aug 2008 16:33:49 - 1.2 @@ -2,13 +2,7 @@ * Component description interface. */ package nl.didactor.component; -import nl.didactor.component.Component; -import nl.didactor.builders.*; -import org.mmbase.bridge.Cloud; -import org.mmbase.module.core.MMObjectNode; -import org.mmbase.module.core.MMObjectBuilder; -import org.mmbase.module.core.MMBase; -import java.util.Map; + public class BasicComponent extends Component { private String name; Index: Component.java === RCS file: /var/cvs/contributions/didactor2/src/core/java/nl/didactor/component/Component.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -b -r1.28 -r1.29 --- Component.java 4 Jul 2008 15:10:19 - 1.28 +++ Component.java 7 Aug 2008 16:33:49 - 1.29 @@ -34,7 +34,7 @@ private final ListComponent interestedComponents = new ArrayListComponent(); private MMObjectNode node; -private final MapString, Setting settings = new HashMapString, Setting(); +protected final MapString, Setting settings = new HashMapString, Setting(); private final MapString, String scopes = new HashMapString, String(); /** The string indicating the path for templates of this component */ @@ -86,7 +86,7 @@ /** * Initializes the component. This is called during startup - * of Didactor. This method will be called every time your Didactor + * of Di\dactor. This method will be called every time your Didactor * installation is restarted. */ public void init() { @@ -314,7 +314,7 @@ Object retval = null; for (String scopeName : scope) { -String scopeReferId = scopes.get(scopeName); +String scopeReferId = getScopesMap().get(scopeName); if (log.isDebugEnabled()) { log.debug(Trying on scope ' + scopeName + ' ( + scopeReferId + )); } @@ -561,8 +561,12 @@ /** * @javadoc */ -public CollectionString getScopes() { -return scopes.keySet(); +public final CollectionString getScopes() { +return getScopesMap().keySet(); +} + +public MapString, String getScopesMap() { +return Collections.unmodifiableMap(scopes); } /** ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs