2 * Copyright (C) 2016 - 2020 Free Software Foundation
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.
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.
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/>.
17 package org.mxchange.jcontactsbusiness.model.jobposition.status;
20 * An enumeration for job position status
22 * @author Roland Häder<roland@mxchange.org>
24 public enum JobPositionStatus {
27 * Open job position status (open for applications)
29 OPEN("JOB_POSITION_STATUS_OPEN", "job_position_status_open"), //NOI18N
32 * Hired job position status (new employee)
34 HIRED("JOB_POSITION_STATUS_HIRED", "job_position_status_hired"), //NOI18N
37 * Deleted job position status (by user)
39 DELETED("JOB_POSITION_STATUS_DELETED", "job_position_status_deleted"), //NOI18N
42 * Expired job position status (when no one applied for it)
44 EXPIRED("JOB_POSITION_STATUS_DELETED", "job_position_status_expired"), //NOI18N
47 * Locked job position status (by administrator)
49 LOCKED("JOB_POSITION_STATUS_LOCKED", "job_position_status_locked"); //NOI18N
52 * Message key for bundles
54 private final String messageKey;
59 private final String styleClass;
62 * Constructor with message key and CSS class
64 * @param messageKey Message key
65 * @param styleClass CSS class
67 private JobPositionStatus (final String messageKey, final String styleClass) {
69 if (null == messageKey) {
71 throw new NullPointerException("messageKey is null"); //NOI18N
72 } else if (messageKey.isEmpty()) {
74 throw new IllegalArgumentException("messageKey is empty"); //NOI18N
75 } else if (null == styleClass) {
77 throw new NullPointerException("styleClass is null"); //NOI18N
78 } else if (styleClass.isEmpty()) {
80 throw new IllegalArgumentException("styleClass is empty"); //NOI18N
84 this.messageKey = messageKey;
85 this.styleClass = styleClass;
89 * Getter for i18n bundle message key
91 * @return Message key for i18n bundles
93 public String getMessageKey () {
94 return this.messageKey;
98 * Getter for CSS class
102 public String getStyleClass () {
103 return this.styleClass;