package cn.com.origin.autocode.common;

import cn.com.origin.autocodemanager.common.IsShowAutocodeManagerPerspective;

import com.teamcenter.rac.aifrcp.AIFUtility;
import com.teamcenter.rac.kernel.TCException;
import com.teamcenter.rac.kernel.TCSession;

public class IsShowAutocodePerspective {
	private String showAutocodeUserOptionName = "origin_showAutocodeUsers";

	public IsShowAutocodePerspective() {

	}

	public boolean getValue() {
		boolean flag = false;
		try {
			TCSession session = (TCSession) AIFUtility.getCurrentApplication().getSession();
			String userID = session.getUser().getUserId();
			flag = new IsShowAutocodeManagerPerspective().isExist(userID, showAutocodeUserOptionName);
		} catch (TCException e) {
			e.printStackTrace();
		}
		return flag;
	}

}
