@@ -0,0 +1,1040 @@
+/**%0A * This Source Code Form is subject to the terms of the Mozilla Public License,%0A * v. 2.0. If a copy of the MPL was not distributed with this file, You can%0A * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under%0A * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.%0A *%0A * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS%0A * graphic logo is a trademark of OpenMRS Inc.%0A */%0Apackage org.openmrs.customdatatype.datatype;%0A%0Aimport org.apache.commons.lang.StringUtils;%0Aimport org.openmrs.Provider;%0Aimport org.openmrs.api.context.Context;%0A%0A/**%0A * This is a class for custom datatypes for providers%0A *%0A * @since 2.0%0A */%0Apublic class ProviderDatatype extends BaseMetadataDatatype%3CProvider%3E %7B%0A%09%0A%09/**%0A%09 * @see org.openmrs.customdatatype.SerializingCustomDatatype#deserialize(String)%0A%09 * @override%0A%09 */%0A%09public Provider deserialize(String uuid) %7B%0A%09%09if (StringUtils.isBlank(uuid)) %7B%0A%09%09%09return null;%0A%09%09%7D%0A%09%09return Context.getProviderService().getProviderByUuid(uuid);%0A%09%7D%0A%7D%0A

Create a custom data type and its associated handler for providers - TRUNK-3623