From 41ba1cfc63b30d6101f810fb69264752732f0116 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@hostsharing.net>
Date: Fri, 28 Oct 2011 16:51:11 +0200
Subject: [PATCH] more xmlrpc datatypes

---
 hsarback/src/de/hsadmin/remote/EMailAddressRemote.java       |   11 ++++++++++-
 hsarback/src/de/hsadmin/remote/EMailAliasRemote.java         |    9 ++++++++-
 hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java |    2 +-
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
index 170fe31..7adeaa8 100644
--- a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
+++ b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -270,7 +270,7 @@
 
 	private Processor createMovePacDomainContent(EntityManager em, Domain dom) {
 		Pac pac = dom.getUser().getPac();
-		String pacDir = pac.getAdminUser(em).getHomedir();
+		String pacDir = "/home/pacs/" + pac.getName();
 		String domDir = pacDir + "/doms/" + pac.getName() + ".hostsharing.net"; 
 		String[] sourceDirs = new String[] { "web", "web-ssl", "cgi", "cgi-ssl", "fastcgi", "fastcgi-ssl" } ;
 		String[] targetDirs = new String[] { "htdocs", "htdocs-ssl", "cgi", "cgi-ssl", "fastcgi", "fastcgi-ssl" } ;
diff --git a/hsarback/src/de/hsadmin/remote/EMailAddressRemote.java b/hsarback/src/de/hsadmin/remote/EMailAddressRemote.java
index dfa01eb..f41b98c 100644
--- a/hsarback/src/de/hsadmin/remote/EMailAddressRemote.java
+++ b/hsarback/src/de/hsadmin/remote/EMailAddressRemote.java
@@ -1,7 +1,9 @@
 package de.hsadmin.remote;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.StringTokenizer;
 
 import de.hsadmin.core.model.AbstractEntity;
 import de.hsadmin.mods.dom.Domain;
@@ -25,7 +27,14 @@
 		if (assertNotNull(domain)) map.put("domain", domain);
 		if (assertNotNull(admin)) map.put("admin", admin);
 		if (assertNotNull(pac)) map.put("pac", pac);
-		if (assertNotNull(target)) map.put("target", target);
+		if (assertNotNull(target)) {
+			StringTokenizer tokenizer = new StringTokenizer(target, ",");
+			List<String> tokenList = new ArrayList<String>(); 
+			while (tokenizer.hasMoreTokens()) {
+				tokenList.add(tokenizer.nextToken().trim());
+			}
+			map.put("target", tokenList);
+		}
 		if (assertNotNull(localpart)) map.put("localpart", localpart);
 		if (assertNotNull(subdomain)) map.put("subdomain", subdomain);
 		if (assertNotNull(emailaddress)) map.put("emailaddress", emailaddress);
diff --git a/hsarback/src/de/hsadmin/remote/EMailAliasRemote.java b/hsarback/src/de/hsadmin/remote/EMailAliasRemote.java
index 998c8f7..c047aa6 100644
--- a/hsarback/src/de/hsadmin/remote/EMailAliasRemote.java
+++ b/hsarback/src/de/hsadmin/remote/EMailAliasRemote.java
@@ -1,7 +1,9 @@
 package de.hsadmin.remote;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.StringTokenizer;
 
 import de.hsadmin.core.model.AbstractEntity;
 import de.hsadmin.mods.email.EMailAlias;
@@ -18,7 +20,12 @@
 		map.put("id", id);
 		map.put("name", name);
 		map.put("pac", pac);
-		map.put("target", target);
+		StringTokenizer tokenizer = new StringTokenizer(target, ",");
+		List<String> tokenList = new ArrayList<String>(); 
+		while (tokenizer.hasMoreTokens()) {
+			tokenList.add(tokenizer.nextToken().trim());
+		}
+		map.put("target", tokenList);
 	}
 
 	@Override

--
Gitblit v1.9.3