package com.cloudcc.core;

public class UserInfo extends CCObject {
	// Binding information
	public String binding;
	private String timeZone;

	public String getTimeZone() {
		return timeZone;
	}

	public void setTimeZone(String timeZone) {
		this.timeZone = timeZone;
	}

	// Get user ID
	public String getUserId() {
		return (String) this.get("id");
	}

	// Get role ID
	public String getRoleId() {
		return (String) this.get("role");
	}

	// Constructor, accepts username and password
	public UserInfo(String username, String pwd) throws Exception {
		this.put("userName", username);
		this.put("password", pwd);
	}

	// Default constructor
	public UserInfo() {

	}

	// Get login name
	public String getLoginName() {
		return (String) this.get("userName");
	}

	// Get profile ID
	public String getProfileId() {
		return (String) this.get("profileId");
	}

	// Set binding information
	public void setBinding(String bind) {
		this.binding = bind;
		this.put("binding", bind);
	}

	// Get binding information
	public String getBinding() {
		if (this.binding == null) {
			return (String) this.get("binding");
		} else {
			return this.binding;
		}
	}

	// Get user name
	public String getUserName() {
		return (String) this.get("name");
	}

	public Boolean isIspartner() {
		return false;
	}
}
