
com.databasesandlife.util.wicket.CleartextPasswordConverter Maven / Gradle / Ivy
package com.databasesandlife.util.wicket;
import com.databasesandlife.util.gwtsafe.CleartextPassword;
import org.apache.wicket.util.convert.ConversionException;
import org.apache.wicket.util.convert.IConverter;
import java.util.Locale;
/**
* Wicket Converter for {@link CleartextPassword}.
*
* @author This source is copyright Adrian Smith and licensed under the LGPL 3.
* @see Project on GitHub
*/
public class CleartextPasswordConverter implements IConverter {
@Override public CleartextPassword convertToObject(String value, Locale locale)
throws ConversionException {
if (value == null) return null;
return new CleartextPassword(value);
}
@Override public String convertToString(CleartextPassword value, Locale locale) {
if (value == null) return null;
return value.getCleartext();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy