View Javadoc
1   package fr.ifremer.dali.ui.swing.content.manage.referential.user.privileges;
2   
3   /*
4    * #%L
5    * Dali :: UI
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2014 - 2015 Ifremer
10   * %%
11   * This program is free software: you can redistribute it and/or modify
12   * it under the terms of the GNU Affero General Public License as published by
13   * the Free Software Foundation, either version 3 of the License, or
14   * (at your option) any later version.
15   * 
16   * This program is distributed in the hope that it will be useful,
17   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19   * GNU General Public License for more details.
20   * 
21   * You should have received a copy of the GNU Affero General Public License
22   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23   * #L%
24   */
25  
26  
27  import fr.ifremer.quadrige3.ui.core.dto.QuadrigeBean;
28  import fr.ifremer.dali.dto.referential.PersonDTO;
29  import fr.ifremer.dali.ui.swing.util.AbstractDaliBeanUIModel;
30  
31  
32  /**
33   * <p>PrivilegesDialogUIModel class.</p>
34   *
35   */
36  public class PrivilegesDialogUIModel extends AbstractDaliBeanUIModel<QuadrigeBean, PrivilegesDialogUIModel> {
37  
38      private PersonDTO user;
39      /** Constant <code>PROPERTY_USER="user"</code> */
40      public static final String PROPERTY_USER = "user";
41      private boolean editable;
42      /** Constant <code>PROPERTY_EDITABLE="editable"</code> */
43      public static final String PROPERTY_EDITABLE = "editable";
44  
45      /**
46       * <p>Constructor for PrivilegesDialogUIModel.</p>
47       */
48      protected PrivilegesDialogUIModel() {
49          super(null, null);
50      }
51  
52      /** {@inheritDoc} */
53      @Override
54      protected QuadrigeBean newBean() {
55          return null;
56      }
57  
58      /**
59       * <p>Getter for the field <code>user</code>.</p>
60       *
61       * @return a {@link fr.ifremer.dali.dto.referential.PersonDTO} object.
62       */
63      public PersonDTO getUser() {
64          return user;
65      }
66  
67      /**
68       * <p>Setter for the field <code>user</code>.</p>
69       *
70       * @param user a {@link fr.ifremer.dali.dto.referential.PersonDTO} object.
71       */
72      public void setUser(PersonDTO user) {
73          this.user = user;
74          firePropertyChange(PROPERTY_USER, null, user);
75      }
76  
77      /**
78       * <p>isEditable.</p>
79       *
80       * @return a boolean.
81       */
82      public boolean isEditable() {
83          return editable;
84      }
85  
86      /**
87       * <p>Setter for the field <code>editable</code>.</p>
88       *
89       * @param editable a boolean.
90       */
91      public void setEditable(boolean editable) {
92          this.editable = editable;
93          firePropertyChange(PROPERTY_EDITABLE, null, editable);
94      }
95  }