本文整理了Java中org.guvnor.structure.repositories.Repository.getPublicURIs
方法的一些代码示例,展示了Repository.getPublicURIs
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getPublicURIs
方法的具体详情如下:
包路径:org.guvnor.structure.repositories.Repository
类名称:Repository
方法名:getPublicURIs
暂无
代码示例来源:origin: org.guvnor/guvnor-structure-client
public void onAnchorSelected(final String protocol) {
for (PublicURI publicURI : repository.getPublicURIs()) {
if (protocol.equals(getProtocol(publicURI))) {
view.setDaemonURI(publicURI.getURI());
break;
}
}
}
代码示例来源:origin: kiegroup/appformer
public void onAnchorSelected(final String protocol) {
for (PublicURI publicURI : repository.getPublicURIs()) {
if (protocol.equals(getProtocol(publicURI))) {
view.setDaemonURI(publicURI.getURI());
break;
}
}
}
代码示例来源:origin: org.guvnor/guvnor-structure-client
private void setPublicURIs() {
int count = 0;
for (final PublicURI publicURI : repository.getPublicURIs()) {
if (count == 0) {
view.setDaemonURI(publicURI.getURI());
}
final String protocol = getProtocol(publicURI);
view.addProtocol(protocol);
count++;
}
}
代码示例来源:origin: kiegroup/appformer
private void setPublicURIs() {
int count = 0;
for (final PublicURI publicURI : repository.getPublicURIs()) {
if (count == 0) {
view.setDaemonURI(publicURI.getURI());
}
final String protocol = getProtocol(publicURI);
view.addProtocol(protocol);
count++;
}
}
代码示例来源:origin: org.guvnor/guvnor-structure-backend
public RepositoryInfo getRepositoryInfo(final String alias) {
final Repository repo = getRepository(alias);
String ouName = null;
for (final OrganizationalUnit ou : organizationalUnitService.getAllOrganizationalUnits()) {
for (Repository repository : ou.getRepositories()) {
if (repository.getAlias().equals(alias)) {
ouName = ou.getName();
}
}
}
return new RepositoryInfo(repo.getIdentifier(),
alias,
ouName,
repo.getRoot(),
repo.getPublicURIs(),
getRepositoryHistory(alias,
0,
HISTORY_PAGE_SIZE));
}
代码示例来源:origin: kiegroup/appformer
public void setRepository(final Repository repository,
final String branch) {
this.repository = repository;
view.setPresenter(this);
view.setRepositoryName(repository.getAlias());
view.setRepositoryDescription(CoreConstants.INSTANCE.Empty());
if (repository.getPublicURIs().size() > 0) {
view.showAvailableProtocols();
}
setPublicURIs();
view.setUriId("view-uri-for-" + repository.getAlias());
populateBranches(branch);
view.refresh();
}
代码示例来源:origin: kiegroup/appformer
private void repositoryLoadTest(final List<PublicURI> uris,
final List<Branch> branches) {
when(repository.getAlias()).thenReturn("TestRepo");
when(repository.getPublicURIs()).thenReturn(publicURIs);
when(repository.getBranches()).thenReturn(branches);
presenter.setRepository(repository,
"master");
verify(view).setPresenter(presenter);
verify(view).setRepositoryName("TestRepo");
//protocols configuration
if (uris.size() > 0) {
verify(view).showAvailableProtocols();
verify(view).setDaemonURI(uris.get(0).getURI());
for (PublicURI publicURI : uris) {
verify(view).addProtocol(publicURI.getProtocol());
}
}
verify(view).setUriId("view-uri-for-" + "TestRepo");
//branches configuration
verify(view).clearBranches();
Collections.reverse(branches);
for (final Branch branch : branches) {
verify(view).addBranch(branch.getName());
}
verify(view).setSelectedBranch("master");
verify(view).refresh();
}
代码示例来源:origin: org.guvnor/guvnor-structure-client
private void repositoryLoadTest(List<PublicURI> uris,
List<String> branches) {
when(repository.getAlias()).thenReturn("TestRepo");
when(repository.getPublicURIs()).thenReturn(publicURIs);
when(repository.getBranches()).thenReturn(branches);
presenter.setRepository(repository,
"master");
verify(view).setPresenter(presenter);
verify(view).setRepositoryName("TestRepo");
verify(view).setUpdateEnabled(false);
verify(view).setDeleteEnabled(false);
//protocols configuration
if (uris.size() > 0) {
verify(view).showAvailableProtocols();
verify(view).setDaemonURI(uris.get(0).getURI());
for (PublicURI publicURI : uris) {
verify(view).addProtocol(publicURI.getProtocol());
}
}
verify(view).setUriId("view-uri-for-" + "TestRepo");
//branches configuration
verify(view).clearBranches();
Collections.reverse(branches);
for (String branch : branches) {
verify(view).addBranch(branch);
}
verify(view).setSelectedBranch("master");
verify(view).refresh();
}
代码示例来源:origin: kiegroup/appformer
@Override
public RepositoryInfo getRepositoryInfo(final Space space,
final String alias) {
Repository repo = getRepositoryFromSpace(space,
alias);
return new RepositoryInfo(repo.getIdentifier(),
alias,
repo.getSpace().getName(),
getRepositoryRootPath(repo),
repo.getPublicURIs(),
getRepositoryHistory(repo.getSpace(),
alias,
0,
HISTORY_PAGE_SIZE));
}
代码示例来源:origin: org.guvnor/guvnor-structure-client
public void setRepository(final Repository repository,
final String branch) {
this.repository = repository;
view.setPresenter(this);
view.setRepositoryName(repository.getAlias());
view.setRepositoryDescription(CoreConstants.INSTANCE.Empty());
if (repository.getPublicURIs().size() > 0) {
view.showAvailableProtocols();
}
setPublicURIs();
view.setUriId("view-uri-for-" + repository.getAlias());
populateBranches(branch);
boolean canUpdate = repositoryController.canUpdateRepository(repository);
boolean canDelete = repositoryController.canDeleteRepository(repository);
view.setUpdateEnabled(canUpdate);
view.setDeleteEnabled(canDelete);
view.refresh();
}
代码示例来源:origin: kiegroup/appformer
private ProjectResponse getProjectResponse(WorkspaceProject workspaceProject) {
final ProjectResponse projectResponse = new ProjectResponse();
projectResponse.setName(workspaceProject.getName());
projectResponse.setSpaceName(workspaceProject.getOrganizationalUnit().getName());
if (workspaceProject.getMainModule() != null) {
projectResponse.setGroupId(workspaceProject.getMainModule().getPom().getGav().getGroupId());
projectResponse.setVersion(workspaceProject.getMainModule().getPom().getGav().getVersion());
projectResponse.setDescription(workspaceProject.getMainModule().getPom().getDescription());
}
final ArrayList<org.guvnor.rest.client.PublicURI> publicURIs = new ArrayList<>();
for (PublicURI publicURI : workspaceProject.getRepository().getPublicURIs()) {
final org.guvnor.rest.client.PublicURI responseURI = new org.guvnor.rest.client.PublicURI();
responseURI.setProtocol(publicURI.getProtocol());
responseURI.setUri(publicURI.getURI());
publicURIs.add(responseURI);
}
projectResponse.setPublicURIs(publicURIs);
return projectResponse;
}
内容来源于网络,如有侵权,请联系作者删除!