New Jide License
[indepmod/experimental.git] / IndependentModeler / src / cz / cvut / promod / services / userService / UserServiceImpl.java
blob5c61e50eb356b9c32557f1913817a8f674c31857
1 package cz.cvut.promod.services.userService;
3 import com.jgoodies.binding.value.ValueModel;
4 import com.jgoodies.binding.beans.Model;
5 import com.jgoodies.binding.PresentationModel;
7 /**
8 * ProMod, master thesis project
9 * User: Petr Zverina, petr.zverina@gmail.com
10 * Date: 17:51:26, 10.10.2009
13 /**
14 * UserService implementation
16 public class UserServiceImpl extends Model implements UserService{
18 public static String USER_PROPERTY = "user";
19 private String user;
21 private final PresentationModel<UserServiceImpl> presentationModel = new PresentationModel<UserServiceImpl>(this);
22 private final ValueModel userValueModel = presentationModel.getModel(USER_PROPERTY);
24 /** {@inheritDoc} */
25 public String getUser() {
26 return user;
29 /** {@inheritDoc} */
30 public void setUser(final String user) {
31 final String oldUser = this.user;
32 this.user = user;
33 firePropertyChange(USER_PROPERTY, oldUser, user);
36 /** {@inheritDoc} */
37 public ValueModel getUserValueModel() {
38 return userValueModel;
41 /** {@inheritDoc} */
42 public boolean check() {
43 return true;