package com.dbs.mplus.fatima.util;

import com.dbs.mplus.fatima.MPlusConstants;
import com.dbs.mplus.fatima.framework.util.MPlusStringUtil;

/**
 * 주소 문자열 관리 
 * 
 * @author hyeeun 
 *
 */
public class AddrUtil {
	private static String startPage; 
	private static String notifyEventPage; 
	private static String versionPage; 
	private static String helperPage;
	
	/**
	 * 시작주소 
	 * @return
	 */
	public static String getStartPage() { 
		if(MPlusStringUtil.isEmpty(startPage)) {
			startPage = MPlusConstants.SERVICE_URL + MPlusConstants.SERVICE_START_ADDR;
		}
		
		return startPage; 
	}

	/**
	 * 비콘이벤트 발생했을때 붙을 페이지 주소
	 * @return
	 */
	public static String getNotifyEventPage() {
		if(MPlusStringUtil.isEmpty(notifyEventPage)) {
			notifyEventPage = MPlusConstants.SERVICE_URL + MPlusConstants.SERVICE_WELCOME_ADDR;
		}

		return notifyEventPage;
	}
	
	/**
	 * 버전확인 주소 
	 * @return
	 */
	public static String getVersionPage() { 
		if(MPlusStringUtil.isEmpty(versionPage)) {
			versionPage = MPlusConstants.SERVICE_URL + MPlusConstants.SERVICE_VERSION_ADDR;
		}
		
		return versionPage;  
	}
	/**
	 * 도우미 페이지
	 * @return
	 */
	public static String getHelperPage() {
		if(MPlusStringUtil.isEmpty(helperPage)) {
			helperPage = MPlusConstants.SERVICE_URL + MPlusConstants.SERVICE_HELPER_ADDR;
		}

		return helperPage;
	}
}

