-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
1,204 additions
and
952 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
app-core/src/main/java/com/mercury/platform/core/MercuryConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package com.mercury.platform.core; | ||
|
||
public class MercuryConstants { | ||
public static final String APP_VERSION = "1.0.1.6.1"; | ||
public static final String APP_VERSION = "1.0.1.7.0"; | ||
public static final String SERVER_HOST = "exslims.ddns.net"; | ||
public static final int PORT = 5555; | ||
} |
51 changes: 25 additions & 26 deletions
51
app-core/src/main/java/com/mercury/platform/core/misc/WhisperNotifierStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
package com.mercury.platform.core.misc; | ||
|
||
import java.util.EnumSet; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* Created by Константин on 13.12.2016. | ||
*/ | ||
public enum WhisperNotifierStatus { | ||
ALWAYS(0), | ||
ALTAB(1), | ||
NONE(2); | ||
|
||
private static final Map<Integer, WhisperNotifierStatus> lookup | ||
= new HashMap<>(); | ||
static { | ||
for (WhisperNotifierStatus w : EnumSet.allOf(WhisperNotifierStatus.class)){ | ||
lookup.put(w.getCode(),w); | ||
ALWAYS { | ||
@Override | ||
public String asPretty() { | ||
return "Always play a sound"; | ||
} | ||
} | ||
private int code; | ||
private WhisperNotifierStatus(int code){ | ||
this.code = code; | ||
} | ||
}, | ||
ALTAB { | ||
@Override | ||
public String asPretty() { | ||
return "Only when tabbed out"; | ||
} | ||
}, | ||
NONE { | ||
@Override | ||
public String asPretty() { | ||
return "Never"; | ||
} | ||
}; | ||
|
||
public int getCode() { | ||
return code; | ||
} | ||
public static WhisperNotifierStatus get(int code){ | ||
return lookup.get(code); | ||
public abstract String asPretty(); | ||
public static WhisperNotifierStatus valueOfPretty(String s){ | ||
for (WhisperNotifierStatus status : WhisperNotifierStatus.values()) { | ||
if(status.asPretty().equals(s)){ | ||
return status; | ||
} | ||
} | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ | |
public interface KeyValueConfigurationService<K, T> { | ||
T get(K key); | ||
Map<K,T> getMap(); | ||
void set(Map<K,T> map); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
|
||
public interface PlainConfigurationService<T> { | ||
T get(); | ||
void set(T descriptor); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 47 additions & 6 deletions
53
app-core/src/main/java/com/mercury/platform/shared/config/descriptor/HotKeyType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,52 @@ | ||
package com.mercury.platform.shared.config.descriptor; | ||
|
||
|
||
import java.util.Arrays; | ||
import java.util.stream.Collectors; | ||
|
||
public enum HotKeyType { | ||
INVITE_PLAYER, | ||
TRADE_PLAYER, | ||
KICK_PLAYER, | ||
STILL_INTERESTING, | ||
CLOSE_NOTIFICATION, | ||
EXPAND_ALL | ||
INVITE_PLAYER { | ||
@Override | ||
public String getIconPath() { | ||
return "app/invite.png"; | ||
} | ||
}, | ||
TRADE_PLAYER { | ||
@Override | ||
public String getIconPath() { | ||
return "app/trade.png"; | ||
} | ||
}, | ||
KICK_PLAYER { | ||
@Override | ||
public String getIconPath() { | ||
return "app/kick.png"; | ||
} | ||
}, | ||
STILL_INTERESTING { | ||
@Override | ||
public String getIconPath() { | ||
return "app/still-interesting.png"; | ||
} | ||
}, | ||
CLOSE_NOTIFICATION { | ||
@Override | ||
public String getIconPath() { | ||
return "app/close.png"; | ||
} | ||
}; | ||
// EXPAND_ALL { | ||
// @Override | ||
// public String getIconPath() { | ||
// return null; | ||
// } | ||
// }; | ||
|
||
public abstract String getIconPath(); | ||
public static boolean contains(String entry){ | ||
return Arrays.stream(HotKeyType.values()) | ||
.filter(it -> it.name().equals(entry)) | ||
.collect(Collectors.toList()) | ||
.size() != 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
app-core/src/main/java/com/mercury/platform/shared/entity/message/FlowDirections.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package com.mercury.platform.shared.entity.message; | ||
|
||
public enum FlowDirections { | ||
import java.io.Serializable; | ||
|
||
public enum FlowDirections implements Serializable{ | ||
UPWARDS, DOWNWARDS | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.