Subversion Repositories XServices

Rev

Rev 177 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 177 Rev 195
Line 14... Line 14...
14
 *   limitations under the License.
14
 *   limitations under the License.
15
 */
15
 */
Line 16... Line 16...
16
 
16
 
Line 17... Line 17...
17
package net.brutex.xservices.ws.impl;
17
package net.brutex.xservices.ws.impl;
-
 
18
 
18
 
19
import java.util.HashSet;
19
import java.util.ArrayList;
20
import java.util.Iterator;
20
import java.util.StringTokenizer;
21
import java.util.StringTokenizer;
Line 21... Line 22...
21
import java.util.regex.Matcher;
22
import java.util.regex.Matcher;
Line 104... Line 105...
104
	public String removeCRLF(String paramString) throws XServicesFault {
105
	public String removeCRLF(String paramString) throws XServicesFault {
105
		String value = paramString.replaceAll("[\r\n]", "");
106
		String value = paramString.replaceAll("[\r\n]", "");
106
		return value;
107
		return value;
107
	}
108
	}
Line -... Line 109...
-
 
109
 
-
 
110
  public String handleStringLists(String basestring, String addstring, String removestring, String delimiter) throws XServicesFault {
-
 
111
		StringTokenizer base = new StringTokenizer(basestring, delimiter);
-
 
112
		StringTokenizer add = new StringTokenizer(addstring, delimiter);
-
 
113
		StringTokenizer remove = new StringTokenizer(removestring, delimiter);
-
 
114
                HashSet<String> hset = new HashSet<String>();
-
 
115
		String result = new String();
-
 
116
                
-
 
117
		while(base.hasMoreTokens()) {
-
 
118
			hset.add(base.nextToken().toString() );
-
 
119
		}
-
 
120
		while(add.hasMoreTokens()) {
-
 
121
			hset.add(add.nextToken().toString() );
-
 
122
		}
-
 
123
		while(remove.hasMoreTokens()) {
-
 
124
			hset.remove(remove.nextToken().toString() );
-
 
125
		}
-
 
126
                Iterator<String> hsetit = hset.iterator();
-
 
127
		while(hsetit.hasNext()) {
-
 
128
			result = result.concat(hsetit.next().toString() + delimiter);
-
 
129
		}
-
 
130
		return result;
-
 
131
	}
-
 
132
 
108
 
133
  
109
  private int getFlags(String flags) {
134
  private int getFlags(String flags) {
110
    int allflags = 0;
135
    int allflags = 0;
111
    if (flags.contains("i")) {
136
    if (flags.contains("i")) {
112
      allflags += 2;
137
      allflags += 2;