r6960 - dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive



Author: hp
Date: 2007-12-04 16:33:50 -0600 (Tue, 04 Dec 2007)
New Revision: 6960

Modified:
   dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/ContactsIQHandler.java
   dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/HippoPlugin.java
Log:
remove not-allowed return values from update IQ handlers so the ContactsIQHandler gets loaded

Modified: dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/ContactsIQHandler.java
===================================================================
--- dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/ContactsIQHandler.java	2007-12-04 22:30:27 UTC (rev 6959)
+++ dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/ContactsIQHandler.java	2007-12-04 22:33:50 UTC (rev 6960)
@@ -151,32 +151,27 @@
 	
 	@IQMethod(name="createContact", type=IQ.Type.set)
 	@IQParams({ "addressType", "address" })
-	public ContactDMO createContact(UserViewpoint viewpoint, String addressType, String address) throws IQException, RetryException {
+	public void createContact(UserViewpoint viewpoint, String addressType, String address) throws IQException, RetryException {
 		IdentitySpider identitySpider = EJBUtil.defaultLookup(IdentitySpider.class);
 		
 		AddressType a = parseAddressType(addressType);
 		Resource resource = getResourceFromAddress(identitySpider, a, address);
 		
 		Contact contact = identitySpider.createContact(viewpoint.getViewer(), resource);
+		// FIXME we aren't allowed to return a value, but it will be hard for the caller to figure out 
+		// what contact was created
 		
-		DataModel model = DataService.getModel();
-		DMSession session = model.currentSessionRO();
-
-		return session.findUnchecked(ContactDMO.class, contact.getGuid());
 	}
 	
 	@IQMethod(name="createUserContact", type=IQ.Type.set)
 	@IQParams({ "user" })
-	public ContactDMO createUserContact(UserViewpoint viewpoint, UserDMO userDMO) throws IQException, RetryException {
+	public void createUserContact(UserViewpoint viewpoint, UserDMO userDMO) throws IQException, RetryException {
 		IdentitySpider identitySpider = EJBUtil.defaultLookup(IdentitySpider.class);
 		
 		User user = identitySpider.lookupUser(userDMO.getKey());
 		Contact contact = identitySpider.createContact(viewpoint.getViewer(), user.getAccount());
-		
-		DataModel model = DataService.getModel();
-		DMSession session = model.currentSessionRO();
-
-		return session.findUnchecked(ContactDMO.class, contact.getGuid());		
+		// FIXME we aren't allowed to return a value, but it will be hard for the caller to figure out 
+		// what contact was created
 	}
 	
 	@IQMethod(name="deleteContact", type=IQ.Type.set)

Modified: dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/HippoPlugin.java
===================================================================
--- dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/HippoPlugin.java	2007-12-04 22:30:27 UTC (rev 6959)
+++ dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/HippoPlugin.java	2007-12-04 22:33:50 UTC (rev 6960)
@@ -38,6 +38,8 @@
 	private List<Module> internalModules = new ArrayList<Module>();
 	
 	private void addIQHandler(IQHandler handler) {
+		Log.debug("Adding IQ handler " + handler.getClass().getName() + " " + handler.getInfo().getNamespace());
+		
 		internalModules.add(handler);
 		handler.start();
 		



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]