Commits

cowboy  committed d0b7c44

add mt.* support

  • Participants
  • Parent commits f922d99

Comments (0)

Files changed (3)

File src/info/mrchen/gae/blog/xmlrpc/HandlerMapping.java

 package info.mrchen.gae.blog.xmlrpc;
 
-import info.mrchen.gae.blog.xmlrpc.handder.BloggerHandler;
 import info.mrchen.gae.blog.xmlrpc.handder.HelloWorldHandler;
+import info.mrchen.gae.blog.xmlrpc.handder.MetaWeblogHandler;
 import info.mrchen.gae.blog.xmlrpc.handder.XmlRpcHandler;
-import info.mrchen.gae.blog.xmlrpc.handder.MetaWeblogHandler;
 
 import java.util.HashMap;
 
 	private MetaWeblogHandler metaWeblogHandler;
 	@Autowired
 	private HelloWorldHandler helloWorldHandler;
-	@Autowired
-	private BloggerHandler bloggerHandler;
 
 	@PostConstruct
 	public void addHandlerMapping() {
 		this.put("helloWorld", helloWorldHandler);
 		this.put("metaWeblog", metaWeblogHandler);
-		this.put("blogger", bloggerHandler);
+		this.put("blogger", helloWorldHandler);
 	}
 }

File src/info/mrchen/gae/blog/xmlrpc/handder/BloggerHandler.java

-package info.mrchen.gae.blog.xmlrpc.handder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.springframework.stereotype.Component;
-
-@Component
-public class BloggerHandler implements XmlRpcHandler {
-	public Map[] getUsersBlogs(String appKey, String username, String password) {
-		Map[] blogs = new HashMap[] { new HashMap() };
-		blogs[0].put("url", "http://localhost/");
-		blogs[0].put("blogid", new Integer(1));
-		blogs[0].put("blogName", "mrchen-gae-blog");
-		return blogs;
-	}
-}

File src/info/mrchen/gae/blog/xmlrpc/handder/WeblogRpcHandler.java

 	public Map[] getUsersBlogs(String appKey, String username, String password) {
 		Map[] blogs = new HashMap[] { new HashMap() };
 		blogs[0].put("url", "http://localhost/");
-		blogs[0].put("blogid", new Integer(1));
+		blogs[0].put("blogid", new Integer(0));
 		blogs[0].put("blogName", "mrchen-gae-blog");
 		return blogs;
 	}