com.abavilla.fpi.load.beanloader.PhoneNumberUtilLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fpi-load-api-core Show documentation
Show all versions of fpi-load-api-core Show documentation
FPI Reactive backend Topup API, contains usage for DTOne and GlobeLabs Rewards API with callback functionality
The newest version!
/******************************************************************************
* FPI Application - Abavilla *
* Copyright (C) 2022 Vince Jerald Villamora *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see . *
******************************************************************************/
package com.abavilla.fpi.load.beanloader;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import com.google.i18n.phonenumbers.PhoneNumberToCarrierMapper;
import com.google.i18n.phonenumbers.PhoneNumberUtil;
/**
* Bean definition for {@link PhoneNumberUtil}.
*
* @author Vince Villamora
*/
@ApplicationScoped
public class PhoneNumberUtilLoader {
/**
* Creates a {@link PhoneNumberUtil} instance using the default configurations
*
* @return {@link PhoneNumberUtil} instance
*/
@Produces
PhoneNumberUtil phoneNumberUtil() {
return PhoneNumberUtil.getInstance();
}
@Produces
PhoneNumberToCarrierMapper phoneNumberToCarrierMapper() {
return PhoneNumberToCarrierMapper.getInstance();
}
}