当前位置: 首页>>代码示例>>Java>>正文


Java GitSearchPage类代码示例

本文整理汇总了Java中com.gitblit.wicket.pages.GitSearchPage的典型用法代码示例。如果您正苦于以下问题:Java GitSearchPage类的具体用法?Java GitSearchPage怎么用?Java GitSearchPage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GitSearchPage类属于com.gitblit.wicket.pages包,在下文中一共展示了GitSearchPage类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import com.gitblit.wicket.pages.GitSearchPage; //导入依赖的package包/类
@Override
public void init() {
	super.init();

	// Setup page authorization mechanism
	boolean useAuthentication = GitBlit.getBoolean(Keys.web.authenticateViewPages, false)
			|| GitBlit.getBoolean(Keys.web.authenticateAdminPages, false);
	if (useAuthentication) {
		AuthorizationStrategy authStrategy = new AuthorizationStrategy();
		getSecuritySettings().setAuthorizationStrategy(authStrategy);
		getSecuritySettings().setUnauthorizedComponentInstantiationListener(authStrategy);
	}

	// Grab Browser info (like timezone, etc)
	if (GitBlit.getBoolean(Keys.web.useClientTimezone, false)) {
		getRequestCycleSettings().setGatherExtendedBrowserInfo(true);
	}

	// configure the resource cache duration to 90 days for deployment
	if (!GitBlit.isDebugMode()) {
		getResourceSettings().setDefaultCacheDuration(90 * 86400);
	}

	// setup the standard gitweb-ish urls
	mount("/repositories", RepositoriesPage.class);
	mount("/overview", OverviewPage.class, "r", "h");
	mount("/summary", SummaryPage.class, "r");
	mount("/pushes", PushesPage.class, "r", "h");
	mount("/commits", LogPage.class, "r", "h");
	mount("/log", LogPage.class, "r", "h");
	mount("/tags", TagsPage.class, "r");
	mount("/branches", BranchesPage.class, "r");
	mount("/commit", CommitPage.class, "r", "h");
	mount("/tag", TagPage.class, "r", "h");
	mount("/tree", TreePage.class, "r", "h", "f");
	mount("/blob", BlobPage.class, "r", "h", "f");
	mount("/raw", RawPage.class, "r", "h", "f");
	mount("/blobdiff", BlobDiffPage.class, "r", "h", "f");
	mount("/commitdiff", CommitDiffPage.class, "r", "h");
	mount("/compare", ComparePage.class, "r", "h");
	mount("/patch", PatchPage.class, "r", "h", "f");
	mount("/history", HistoryPage.class, "r", "h", "f");
	mount("/search", GitSearchPage.class);
	mount("/metrics", MetricsPage.class, "r");
	mount("/blame", BlamePage.class, "r", "h", "f");
	mount("/users", UsersPage.class);
	mount("/logout", LogoutPage.class);

	// setup ticket urls
	mount("/tickets", TicketsPage.class, "r");
	mount("/ticket", TicketPage.class, "r", "f");

	// setup the markdown urls
	mount("/docs", DocsPage.class, "r");
	mount("/markdown", MarkdownPage.class, "r", "h", "f");

	// federation urls
	mount("/proposal", ReviewProposalPage.class, "t");
	mount("/registration", FederationRegistrationPage.class, "u", "n");

	mount("/activity", ActivityPage.class, "r", "h");
	mount("/gravatar", GravatarProfilePage.class, "h");
	mount("/lucene", LuceneSearchPage.class);
	mount("/project", ProjectPage.class, "p");
	mount("/projects", ProjectsPage.class);
	mount("/user", UserPage.class, "user");
	mount("/forks", ForksPage.class, "r");
	mount("/fork", ForkPage.class, "r");
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:70,代码来源:GitBlitWebApp.java

示例2: init

import com.gitblit.wicket.pages.GitSearchPage; //导入依赖的package包/类
@Override
public void init() {
	super.init();

	// Setup page authorization mechanism
	boolean useAuthentication = GitBlit.getBoolean(Keys.web.authenticateViewPages, false)
			|| GitBlit.getBoolean(Keys.web.authenticateAdminPages, false);
	if (useAuthentication) {
		AuthorizationStrategy authStrategy = new AuthorizationStrategy();
		getSecuritySettings().setAuthorizationStrategy(authStrategy);
		getSecuritySettings().setUnauthorizedComponentInstantiationListener(authStrategy);
	}

	// Grab Browser info (like timezone, etc)
	if (GitBlit.getBoolean(Keys.web.useClientTimezone, false)) {
		getRequestCycleSettings().setGatherExtendedBrowserInfo(true);
	}

	// configure the resource cache duration to 90 days for deployment
	if (!GitBlit.isDebugMode()) {
		getResourceSettings().setDefaultCacheDuration(90 * 86400);
	}

	// setup the standard gitweb-ish urls
	mount("/summary", SummaryPage.class, "r");
	mount("/log", LogPage.class, "r", "h");
	mount("/tags", TagsPage.class, "r");
	mount("/branches", BranchesPage.class, "r");
	mount("/commit", CommitPage.class, "r", "h");
	mount("/tag", TagPage.class, "r", "h");
	mount("/tree", TreePage.class, "r", "h", "f");
	mount("/blob", BlobPage.class, "r", "h", "f");
	mount("/raw", RawPage.class, "r", "h", "f");
	mount("/blobdiff", BlobDiffPage.class, "r", "h", "f");
	mount("/commitdiff", CommitDiffPage.class, "r", "h");
	mount("/patch", PatchPage.class, "r", "h", "f");
	mount("/history", HistoryPage.class, "r", "h", "f");
	mount("/search", GitSearchPage.class);
	mount("/metrics", MetricsPage.class, "r");
	mount("/blame", BlamePage.class, "r", "h", "f");
	mount("/users", UsersPage.class);
	mount("/logout", LogoutPage.class);

	// setup ticket urls
	mount("/tickets", TicketsPage.class, "r");
	mount("/ticket", TicketPage.class, "r", "f");

	// setup the markdown urls
	mount("/docs", DocsPage.class, "r");
	mount("/markdown", MarkdownPage.class, "r", "h", "f");

	// federation urls
	mount("/proposal", ReviewProposalPage.class, "t");
	mount("/registration", FederationRegistrationPage.class, "u", "n");

	mount("/activity", ActivityPage.class, "r", "h");
	mount("/gravatar", GravatarProfilePage.class, "h");
	mount("/lucene", LuceneSearchPage.class);
	mount("/project", ProjectPage.class, "p");
	mount("/projects", ProjectsPage.class);
	mount("/user", UserPage.class, "user");
	mount("/forks", ForksPage.class, "r");
	mount("/fork", ForkPage.class, "r");
}
 
开发者ID:BullShark,项目名称:IRCBlit,代码行数:65,代码来源:GitBlitWebApp.java


注:本文中的com.gitblit.wicket.pages.GitSearchPage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。