| 1 | 0 | package jp.co.y_net.amm; |
| 2 | |
|
| 3 | |
import jp.co.y_net.amm.api.ApiChallengestring; |
| 4 | |
import jp.co.y_net.amm.api.ApiDatainitialize; |
| 5 | |
import jp.co.y_net.amm.api.ApiGroupmember; |
| 6 | |
import jp.co.y_net.amm.api.ApiInfo; |
| 7 | |
import jp.co.y_net.amm.api.ApiLogincheck; |
| 8 | |
import jp.co.y_net.amm.api.ApiLogout; |
| 9 | |
import jp.co.y_net.amm.api.ApiMember; |
| 10 | |
import jp.co.y_net.amm.api.ApiMembergroup; |
| 11 | |
import jp.co.y_net.amm.common.AppLogger; |
| 12 | |
import jp.co.y_net.amm.page.DashboardPage; |
| 13 | |
import jp.co.y_net.amm.page.EntryPasswordPage; |
| 14 | |
import jp.co.y_net.amm.page.ErrorPage; |
| 15 | |
import jp.co.y_net.amm.page.GroupListPage; |
| 16 | |
import jp.co.y_net.amm.page.InfoListPage; |
| 17 | |
import jp.co.y_net.amm.page.InfoPage; |
| 18 | |
import jp.co.y_net.amm.page.LoginPage; |
| 19 | |
import jp.co.y_net.amm.page.MemberDetailPage; |
| 20 | |
import jp.co.y_net.amm.page.MemberListPage; |
| 21 | |
import jp.co.y_net.amm.page.OrgDetailPage; |
| 22 | |
import jp.co.y_net.amm.page.OrgEntryDetailPage; |
| 23 | |
import jp.co.y_net.amm.page.OrgEntryListPage; |
| 24 | |
import jp.co.y_net.amm.page.OrgEntryPage; |
| 25 | |
import jp.co.y_net.amm.page.OrgMemberListPage; |
| 26 | |
import jp.co.y_net.amm.page.PasswordResetPage; |
| 27 | |
import jp.co.y_net.amm.page.TopPage; |
| 28 | |
|
| 29 | |
import org.apache.wicket.Page; |
| 30 | |
import org.apache.wicket.RuntimeConfigurationType; |
| 31 | |
import org.apache.wicket.protocol.http.WebApplication; |
| 32 | |
import org.apache.wicket.request.Request; |
| 33 | |
import org.apache.wicket.request.Response; |
| 34 | |
import org.apache.wicket.spring.injection.annot.SpringComponentInjector; |
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | 0 | public class WicketApplication extends WebApplication { |
| 40 | |
|
| 41 | |
|
| 42 | |
@Override |
| 43 | |
public Class<? extends Page> getHomePage() { |
| 44 | 0 | return TopPage.class; |
| 45 | |
} |
| 46 | |
@Override |
| 47 | |
protected void init() { |
| 48 | 0 | super.init(); |
| 49 | |
|
| 50 | 0 | getRequestCycleSettings().setResponseRequestEncoding("UTF-8"); |
| 51 | 0 | getMarkupSettings().setDefaultMarkupEncoding("UTF-8"); |
| 52 | |
|
| 53 | 0 | getComponentInstantiationListeners().add(new SpringComponentInjector(this)); |
| 54 | |
|
| 55 | 0 | getMarkupSettings().setDefaultBeforeDisabledLink(""); |
| 56 | 0 | getMarkupSettings().setDefaultAfterDisabledLink(""); |
| 57 | |
|
| 58 | |
|
| 59 | |
|
| 60 | |
|
| 61 | |
|
| 62 | |
|
| 63 | 0 | mountPage("/api/challengestring", ApiChallengestring.class); |
| 64 | 0 | mountPage("/api/logincheck", ApiLogincheck.class); |
| 65 | 0 | mountPage("/api/logout", ApiLogout.class); |
| 66 | 0 | mountPage("/api/member", ApiMember.class); |
| 67 | 0 | mountPage("/api/info", ApiInfo.class); |
| 68 | 0 | mountPage("/api/datainitialize", ApiDatainitialize.class); |
| 69 | |
|
| 70 | 0 | mountPage("/info", InfoPage.class); |
| 71 | 0 | mountPage("/orgentry", OrgEntryPage.class); |
| 72 | 0 | mountPage("/passwordreset", PasswordResetPage.class); |
| 73 | |
|
| 74 | 0 | mountPage("/memberlist", MemberListPage.class); |
| 75 | 0 | mountPage("/orgdetail", OrgDetailPage.class); |
| 76 | |
|
| 77 | 0 | mountPage("/memberdetail", MemberDetailPage.class); |
| 78 | |
|
| 79 | 0 | mountPage("/orgentrylist", OrgEntryListPage.class); |
| 80 | 0 | mountPage("/orgmemberlist", OrgMemberListPage.class); |
| 81 | 0 | mountPage("/infolist", InfoListPage.class); |
| 82 | |
|
| 83 | 0 | mountPage("/entrypassword", EntryPasswordPage.class); |
| 84 | 0 | mountPage("/orgentrydetail", OrgEntryDetailPage.class); |
| 85 | |
|
| 86 | |
|
| 87 | 0 | mountPage("/grouplist", GroupListPage.class); |
| 88 | |
|
| 89 | |
|
| 90 | 0 | mountPage("/dashboard", DashboardPage.class); |
| 91 | |
|
| 92 | |
|
| 93 | 0 | mountPage("/api/membergroup", ApiMembergroup.class); |
| 94 | |
|
| 95 | 0 | mountPage("/api/groupmember", ApiGroupmember.class); |
| 96 | |
|
| 97 | |
|
| 98 | |
|
| 99 | |
|
| 100 | |
|
| 101 | |
|
| 102 | 0 | getApplicationSettings().setPageExpiredErrorPage(LoginPage.class); |
| 103 | |
|
| 104 | 0 | getApplicationSettings().setInternalErrorPage(ErrorPage.class); |
| 105 | |
|
| 106 | 0 | this.getPageSettings().setVersionPagesByDefault(false); |
| 107 | |
|
| 108 | 0 | getMarkupSettings().setStripWicketTags(true); |
| 109 | |
|
| 110 | 0 | getRequestCycleListeners().add(new AppRequestCycleListener()); |
| 111 | 0 | |
| 112 | |
|
| 113 | |
|
| 114 | 0 | } |
| 115 | |
|
| 116 | 0 | |
| 117 | |
@Override |
| 118 | |
public AppSession newSession(Request request, Response response) { |
| 119 | 0 | return new AppSession(request); |
| 120 | |
} |
| 121 | |
|
| 122 | |
|
| 123 | |
|
| 124 | 0 | |
| 125 | |
@Override |
| 126 | 0 | public RuntimeConfigurationType getConfigurationType() { |
| 127 | 0 | if(AppLogger.isDebug()) { |
| 128 | 0 | |
| 129 | 0 | return RuntimeConfigurationType.DEVELOPMENT; |
| 130 | |
} else { |
| 131 | 0 | return RuntimeConfigurationType.DEPLOYMENT; |
| 132 | |
} |
| 133 | |
} |
| 134 | |
|
| 135 | |
} |
| 136 | |
|
| 137 | |
|
| 138 | |
|
| 139 | |
|
| 140 | |
|
| 141 | |
|
| 142 | |
|
| 143 | |
|
| 144 | |
|
| 145 | |
|
| 146 | |
|
| 147 | |
|
| 148 | |
|
| 149 | |
|