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


Java CommitPage类代码示例

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


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

示例1: CommitHeaderPanel

import com.gitblit.wicket.pages.CommitPage; //导入依赖的package包/类
public CommitHeaderPanel(String id, String repositoryName, RevCommit c) {
	super(id);
	add(new LinkPanel("shortmessage", "title", StringUtils.trimString(c.getShortMessage(),
			Constants.LEN_SHORTLOG), CommitPage.class,
			WicketUtils.newObjectParameter(repositoryName, c.getName())));
	add(new Label("commitid", c.getName()));
	add(new Label("author", c.getAuthorIdent().getName()));
	add(WicketUtils.createDateLabel("date", c.getAuthorIdent().getWhen(), getTimeZone(), getTimeUtils()));
	add(new GravatarImage("authorAvatar", c.getAuthorIdent()));
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:11,代码来源:CommitHeaderPanel.java

示例2: init

import com.gitblit.wicket.pages.CommitPage; //导入依赖的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

示例3: init

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