[Registry-dev] svn commit r14503 - in
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc:
. handlers
svn at wso2.org
svn at wso2.org
Tue Mar 4 17:14:21 PST 2008
Author: glen
Date: Tue Mar 4 17:14:17 2008
New Revision: 14503
Log:
Spelling fix
Modified:
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/handlers/HandlerManager.java
Modified: trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
==============================================================================
--- trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java (original)
+++ trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java Tue Mar 4 17:14:17 2008
@@ -26,10 +26,8 @@
import org.wso2.registry.exceptions.ResourceNotFoundException;
import org.wso2.registry.i18n.Messages;
import org.wso2.registry.jdbc.dao.*;
-import org.wso2.registry.jdbc.mediatypes.MediaTypeManager;
import org.wso2.registry.jdbc.queries.QueryProcessorManager;
import org.wso2.registry.jdbc.realm.RegistryRealm;
-import org.wso2.registry.jdbc.urlhandlers.URLHandlerManager;
import org.wso2.registry.jdbc.handlers.HandlerManager;
import org.wso2.registry.jdbc.handlers.RequestContext;
import org.wso2.registry.jdbc.handlers.Handler;
@@ -1313,45 +1311,45 @@
}
public void addHandler(Filter filter, Handler handler) {
- handlerManager.addHanlder(filter, handler);
+ handlerManager.addHandler(filter, handler);
}
private void registerBuiltInHandlers() {
Axis2RepositoryHandler axis2RepositoryHandler = new Axis2RepositoryHandler();
MediaTypeMatcher axis2MediaTypeMatcher = new MediaTypeMatcher("application/vnd.apache.axis2");
- handlerManager.addHanlder(axis2MediaTypeMatcher, axis2RepositoryHandler);
+ handlerManager.addHandler(axis2MediaTypeMatcher, axis2RepositoryHandler);
SQLQueryHandler sqlQueryHandler = new SQLQueryHandler();
MediaTypeMatcher sqlMediaTypeMatcher =
new MediaTypeMatcher(RegistryConstants.SQL_QUERY_MEDIA_TYPE);
- handlerManager.addHanlder(sqlMediaTypeMatcher, sqlQueryHandler);
+ handlerManager.addHandler(sqlMediaTypeMatcher, sqlQueryHandler);
CommentURLHandler commentURLHandler = new CommentURLHandler();
URLMatcher commentURLMatcher = new URLMatcher();
commentURLMatcher.setGetPattern(".+;comments:[0-9]+");
commentURLMatcher.setDeletePattern(".+;comments:[0-9]+");
- handlerManager.addHanlder(commentURLMatcher, commentURLHandler);
+ handlerManager.addHandler(commentURLMatcher, commentURLHandler);
CommentCollectionURLHandler commentCollectionURLHandler = new CommentCollectionURLHandler();
URLMatcher commentCollectionURLMatcher = new URLMatcher();
commentCollectionURLMatcher.setGetPattern(".+;comments");
- handlerManager.addHanlder(commentCollectionURLMatcher, commentCollectionURLHandler);
+ handlerManager.addHandler(commentCollectionURLMatcher, commentCollectionURLHandler);
RatingURLHandler ratingURLHandler = new RatingURLHandler();
URLMatcher ratingURLMatcher = new URLMatcher();
ratingURLMatcher.setGetPattern(".+;ratings:.+");
- handlerManager.addHanlder(ratingURLMatcher, ratingURLHandler);
+ handlerManager.addHandler(ratingURLMatcher, ratingURLHandler);
RatingCollectionURLHandler ratingCollectionURLHandler = new RatingCollectionURLHandler();
URLMatcher ratingCollectionURLMatcher = new URLMatcher();
ratingCollectionURLMatcher.setGetPattern(".+;ratings");
- handlerManager.addHanlder(ratingCollectionURLMatcher, ratingCollectionURLHandler);
+ handlerManager.addHandler(ratingCollectionURLMatcher, ratingCollectionURLHandler);
TagURLHandler tagURLHandler = new TagURLHandler();
URLMatcher tagURLMatcher = new URLMatcher();
tagURLMatcher.setGetPattern(".+;.+:.+:.+");
- handlerManager.addHanlder(tagURLMatcher, tagURLHandler);
+ handlerManager.addHandler(tagURLMatcher, tagURLHandler);
}
}
Modified: trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/handlers/HandlerManager.java
==============================================================================
--- trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/handlers/HandlerManager.java (original)
+++ trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/handlers/HandlerManager.java Tue Mar 4 17:14:17 2008
@@ -16,17 +16,17 @@
package org.wso2.registry.jdbc.handlers;
-import org.wso2.registry.jdbc.handlers.filters.Filter;
-import org.wso2.registry.jdbc.Repository;
-import org.wso2.registry.Resource;
-import org.wso2.registry.RegistryException;
import org.wso2.registry.Registry;
+import org.wso2.registry.RegistryException;
+import org.wso2.registry.Resource;
+import org.wso2.registry.jdbc.Repository;
+import org.wso2.registry.jdbc.handlers.filters.Filter;
import org.wso2.registry.users.UserRealm;
import javax.sql.DataSource;
-import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.Map;
public class HandlerManager {
@@ -37,23 +37,25 @@
private Registry registry;
private Repository repository;
- public HandlerManager(
- DataSource dataSource, UserRealm userRealm, Registry registry, Repository repository) {
+ public HandlerManager(DataSource dataSource,
+ UserRealm userRealm,
+ Registry registry,
+ Repository repository) {
this.dataSource = dataSource;
this.userRealm = userRealm;
this.registry = registry;
this.repository = repository;
}
- public void addHanlder(Filter filter, Handler handler) {
+ public void addHandler(Filter filter, Handler handler) {
filter.setRepository(repository);
-
+
handler.setDataSource(dataSource);
handler.setRealm(userRealm);
handler.setRegistry(registry);
handler.setRepository(repository);
-
+
handlerMap.put(filter, handler);
}
More information about the Registry-dev
mailing list