]> git.mxchange.org Git - jcontacts-business-core.git/blob - src/org/mxchange/jcontactsbusiness/model/jobposition/status/JobPositionStatus.java
Continued:
[jcontacts-business-core.git] / src / org / mxchange / jcontactsbusiness / model / jobposition / status / JobPositionStatus.java
1 /*
2  * Copyright (C) 2016 - 2020 Free Software Foundation
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.jcontactsbusiness.model.jobposition.status;
18
19 /**
20  * An enumeration for job position status
21  * <p>
22  * @author Roland Häder<roland@mxchange.org>
23  */
24 public enum JobPositionStatus {
25
26         /**
27          * Open job position status (open for applications)
28          */
29         OPEN("JOB_POSITION_STATUS_OPEN", "job_position_status_open"), //NOI18N
30
31         /**
32          * Hired job position status (new employee)
33          */
34         HIRED("JOB_POSITION_STATUS_HIRED", "job_position_status_hired"), //NOI18N
35
36         /**
37          * Deleted job position status (by user)
38          */
39         DELETED("JOB_POSITION_STATUS_DELETED", "job_position_status_deleted"), //NOI18N
40
41         /**
42          * Expired job position status (when no one applied for it)
43          */
44         EXPIRED("JOB_POSITION_STATUS_DELETED", "job_position_status_expired"), //NOI18N
45
46         /**
47          * Locked job position status (by administrator)
48          */
49         LOCKED("JOB_POSITION_STATUS_LOCKED", "job_position_status_locked"); //NOI18N
50
51         /**
52          * Message key for bundles
53          */
54         private final String messageKey;
55
56         /**
57          * CSS class
58          */
59         private final String styleClass;
60
61         /**
62          * Constructor with message key and CSS class
63          * <p>
64          * @param messageKey Message key
65          * @param styleClass CSS class
66          */
67         private JobPositionStatus (final String messageKey, final String styleClass) {
68                 // Validate parameter
69                 if (null == messageKey) {
70                         // Throw NPE
71                         throw new NullPointerException("messageKey is null"); //NOI18N
72                 } else if (messageKey.isEmpty()) {
73                         // Throw IAE
74                         throw new IllegalArgumentException("messageKey is empty"); //NOI18N
75                 } else if (null == styleClass) {
76                         // Throw NPE
77                         throw new NullPointerException("styleClass is null"); //NOI18N
78                 } else if (styleClass.isEmpty()) {
79                         // Throw IAE
80                         throw new IllegalArgumentException("styleClass is empty"); //NOI18N
81                 }
82
83                 // Set all
84                 this.messageKey = messageKey;
85                 this.styleClass = styleClass;
86         }
87
88         /**
89          * Getter for i18n bundle message key
90          * <p>
91          * @return Message key for i18n bundles
92          */
93         public String getMessageKey () {
94                 return this.messageKey;
95         }
96
97         /**
98          * Getter for CSS class
99          * <p>
100          * @return CSS class
101          */
102         public String getStyleClass () {
103                 return this.styleClass;
104         }
105
106 }