當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。