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 -0000 1.1
+++ BasicComponent.java 7 Aug 2008 16:33:49 -0000 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 -0000 1.28
+++ Component.java 7 Aug 2008 16:33:49 -0000 1.29
@@ -34,7 +34,7 @@
private final List<Component> interestedComponents = new
ArrayList<Component>();
private MMObjectNode node;
- private final Map<String, Setting> settings = new HashMap<String,
Setting>();
+ protected final Map<String, Setting> settings = new HashMap<String,
Setting>();
private final Map<String, String> scopes = new HashMap<String,
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 Collection<String> getScopes() {
- return scopes.keySet();
+ public final Collection<String> getScopes() {
+ return getScopesMap().keySet();
+ }
+
+ public Map<String, String> getScopesMap() {
+ return Collections.unmodifiableMap(scopes);
}
/**
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs