1
|
package eu.etaxonomy.taxeditor.handler;
|
2
|
|
3
|
import java.util.UUID;
|
4
|
|
5
|
import org.eclipse.core.commands.AbstractParameterValueConverter;
|
6
|
import org.eclipse.core.commands.ParameterValueConversionException;
|
7
|
|
8
|
public class UuidParameterConverter extends AbstractParameterValueConverter {
|
9
|
|
10
|
public UuidParameterConverter() {
|
11
|
// TODO Auto-generated constructor stub
|
12
|
}
|
13
|
|
14
|
@Override
|
15
|
public Object convertToObject(String parameterValue) throws ParameterValueConversionException {
|
16
|
return UUID.fromString(parameterValue);
|
17
|
}
|
18
|
|
19
|
@Override
|
20
|
public String convertToString(Object parameterValue) throws ParameterValueConversionException {
|
21
|
return parameterValue.toString();
|
22
|
}
|
23
|
|
24
|
}
|