All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jpattern.gwt.client.session.UserData Maven / Gradle / Ivy

There is a newer version: 2.45.7
Show newest version
/* ----------------------------------------------------------------------------
*     PROJECT : EURES
*
*     PACKAGE : eu.europa.ec.empl.eures.xxx
*        FILE : UserData.java
*
*  CREATED BY : ARHS Developments
*          ON : 6 Oct 2011
*
* MODIFIED BY : ARHS Developments
*          ON : $LastChangedDate
*     VERSION : $LastChangedRevision
*
* ----------------------------------------------------------------------------
* Copyright (c) 2011 European Commission - DG EMPL
* ----------------------------------------------------------------------------
*/
package com.jpattern.gwt.client.session;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 *
 * @author ARHS Developments - cinafr
 * @version $Revision
 */
public class UserData implements IUserData {

	private final String username;
	private final boolean valid;
	private final List roles;
	
	public UserData (String username, boolean valid) {
		this(username, valid , new ArrayList());
	}

	public UserData (String username, boolean valid, String[] roles) {
		this(username, valid, Arrays.asList(roles));
	}
	
	public UserData (String username, boolean valid, List roles) {
		this.username = username;
		this.valid = valid;
		this.roles = roles;
	}
	
	/**
	 * @return the username
	 */
	@Override
	public String getUsername() {
		return username;
	}
	
	/**
	 * @return the valid
	 */
	@Override
	public boolean isValid() {
		return valid;
	}


	@Override
	public List getRoles() {
		return roles ;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy