Last active
December 19, 2015 01:09
-
-
Save osamingo/5873807 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public enum RoutesEnum { | |
| TOP("/", "portal/top"), | |
| DETAIL("/{mediaId}", "media/detail"); | |
| private String urlPath; | |
| private String filePath; | |
| RoutesEnum(String urlPath, String filePath) { | |
| this.urlPath = urlPath; | |
| this.filePath = filePath; | |
| } | |
| public String urlPath() { | |
| return this.urlPath; | |
| } | |
| public String filePath() { | |
| return this.filePath; | |
| } | |
| @Override | |
| public String toString() { | |
| return new StringBuilder(this.toString()) | |
| .append(" [ urlPath = ").append(urlPath) | |
| .append(", filePath = ").append(filePath) | |
| .append(" ]").toString(); | |
| } | |
| } |
BaseRouteみたいなインターフェイス作って、メソッドoverrideさせる
public enum PortalRoutesEnum implements BaseRouteEnum { ... }
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PublicRoutesEnum -> 公開面
PrivateRoutesEnum -> 管理面
PortalRoutesEnum -> 運営が提供する面
みたいに分けたほうがいい。