001
014
015 package com.liferay.portal.kernel.license.messaging;
016
017
020 public enum LCSPortletState {
021
022 GOOD(1), NO_AVAILABLE_SERVERS(2), NO_CONNECTION(3), NOT_REGISTERED(5),
023 NO_SUBSCRIPTION(4), PLUGIN_ABSENT(0), UNDEFINED(Integer.MAX_VALUE);
024
025 public static LCSPortletState valueOf(int intValue) {
026 if (intValue == 0) {
027 return PLUGIN_ABSENT;
028 }
029 else if (intValue == 1) {
030 return GOOD;
031 }
032 else if (intValue == 2) {
033 return NO_AVAILABLE_SERVERS;
034 }
035 else if (intValue == 3) {
036 return NO_CONNECTION;
037 }
038 else if (intValue == 4) {
039 return NO_SUBSCRIPTION;
040 }
041 else if (intValue == 5) {
042 return NOT_REGISTERED;
043 }
044
045 return UNDEFINED;
046 }
047
048 public int intValue() {
049 return _state;
050 }
051
052 private LCSPortletState(int state) {
053 _state = state;
054 }
055
056 private final int _state;
057
058 }