1 package eu
.etaxonomy
.cdm
.remote
.editor
;
3 import java
.beans
.PropertyEditorSupport
;
4 import java
.util
.ArrayList
;
13 public class UUIDListPropertyEditor
extends PropertyEditorSupport
{
15 public void setAsText(String text
) {
16 String separator
= ",";
17 List
<UUID
> uuidList
= new ArrayList
<UUID
>();
18 if (text
.contains(",")){
19 //set the value for more than one UUID
20 String
[] uuidStringList
= text
.split(separator
);
21 for (String element
: uuidStringList
) {
22 uuidList
.add(UUID
.fromString(element
));
24 }else{//set the value of the single UUID
25 uuidList
.add(UUID
.fromString(text
));