16,7 → 16,8 |
|
package net.brutex.xservices.ws.impl; |
|
import java.util.ArrayList; |
import java.util.HashSet; |
import java.util.Iterator; |
import java.util.StringTokenizer; |
import java.util.regex.Matcher; |
import java.util.regex.Pattern; |
106,6 → 107,30 |
return value; |
} |
|
public String handleStringLists(String basestring, String addstring, String removestring, String delimiter) throws XServicesFault { |
StringTokenizer base = new StringTokenizer(basestring, delimiter); |
StringTokenizer add = new StringTokenizer(addstring, delimiter); |
StringTokenizer remove = new StringTokenizer(removestring, delimiter); |
HashSet<String> hset = new HashSet<String>(); |
String result = new String(); |
|
while(base.hasMoreTokens()) { |
hset.add(base.nextToken().toString() ); |
} |
while(add.hasMoreTokens()) { |
hset.add(add.nextToken().toString() ); |
} |
while(remove.hasMoreTokens()) { |
hset.remove(remove.nextToken().toString() ); |
} |
Iterator<String> hsetit = hset.iterator(); |
while(hsetit.hasNext()) { |
result = result.concat(hsetit.next().toString() + delimiter); |
} |
return result; |
} |
|
|
private int getFlags(String flags) { |
int allflags = 0; |
if (flags.contains("i")) { |