本文整理了Java中com.atlassian.jira.project.Project.getUrl()
方法的一些代码示例,展示了Project.getUrl()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.getUrl()
方法的具体详情如下:
包路径:com.atlassian.jira.project.Project
类名称:Project
方法名:getUrl
暂无
代码示例来源:origin: com.atlassian.studio/studio-theme-jira-plugin
@Override
public String getHomeUrl()
{
return getProject().getUrl();
}
}
代码示例来源:origin: com.atlassian.studio/studio-theme-jira-plugin
public String getHtml(Project project, User user)
{
final String url = project.getUrl();
return descriptor.getHtml("view", EasyMap.build("url", StringUtils.isBlank(url) ? null : url.trim(), "pid", project.getId()));
}
代码示例来源:origin: com.atlassian.studio/studio-theme-jira-plugin
/**
* Displays project homeurl
*/
@Override
public String doDefault() throws Exception
{
this.homeurl = getProjectObject().getUrl();
calculateUrls();
return SUCCESS;
}
代码示例来源:origin: com.atlassian.studio/studio-theme-jira-plugin
private List<StudioProject> getRecentlyViewedProjects(final StudioProject currentProject, final List<String> recentProjectKeys)
{
final List<StudioProject> projects = new ArrayList<StudioProject>();
for (final String key : recentProjectKeys)
{
final Project project = projectManager.getProjectObjByKey(key);
if (project != null)
{
// Don't include the 'selected' project in this list
if (currentProject == null || !currentProject.getKey().equalsIgnoreCase(key))
{
projects.add(new StudioProjectImpl(key, project.getName(), project.getDescription(), project.getId(), project.getUrl()));
}
}
}
return projects;
}
代码示例来源:origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin
public RemoteProject(Project project, ApplicationProperties applicationProperties)
{
super(project.getId() == null ? "" : project.getId().toString(), project.getName());
this.key = project.getKey();
this.url = applicationProperties.getString(APKeys.JIRA_BASEURL) + "/browse/" + key;
this.projectUrl = project.getUrl();
this.lead = project.getLeadUserName();
this.description = project.getDescription();
}
代码示例来源:origin: com.atlassian.jira/jira-api
/**
* Build a Network project instance from a local Project.
*
* @param project the local project
* @return a NetworkProject instance representing the given local project.
*/
@Nonnull
public static RemoteProject from(final Project project)
{
return new RemoteProject(project.getId(), project.getKey(), project.getName(), project.getDescription(), RemoteUser.from(project.getProjectLead()), project.getUrl(), null, RemoteAvatar.from(project));
}
代码示例来源:origin: com.atlassian.studio/studio-theme-jira-plugin
private StudioProject getCurrentProject(final String currentProjectKey)
{
if (currentProjectKey != null)
{
final Project project = projectManager.getProjectObjByKey(currentProjectKey);
if (project != null)
{
return new StudioProjectImpl(project.getKey(), project.getName(), project.getDescription(), project.getId(), project.getUrl());
}
}
return null;
}
代码示例来源:origin: com.atlassian.jira/jira-rest-plugin
project.getDescription(), project.getLeadUserName(), project.getUrl(), project.getAssigneeType(), avatarId);
if (!updateValidationResult.isValid())
代码示例来源:origin: com.atlassian.jira/jira-core
public ProjectBean(final Project project, final boolean recent)
{
this(
project.getKey(),
project.getName(),
project.getId(),
hasDefaultAvatar(project),
project.getProjectLead(),
project.getProjectCategoryObject(),
recent,
project.getUrl(),
project.getProjectTypeKey()
);
}
代码示例来源:origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin
com.atlassian.jira.bc.project.ProjectService.UpdateProjectValidationResult validateSetAvatar(final User user, final Project project, final Long avatarId)
{
Long effectiveAvatarId = avatarId == null ? avatarManager.getDefaultAvatarId(PROJECT) : avatarId;
return projectService.validateUpdateProject(
user,
project.getName(),
project.getKey(),
project.getDescription(),
project.getLeadUserName(),
project.getUrl(),
project.getAssigneeType(),
effectiveAvatarId);
}
代码示例来源:origin: com.atlassian.jira/jira-rest-plugin
private ProjectBeanBuilder summaryProjectBuilder(Project project, String expand)
{
ProjectBeanBuilder builder = shortProjectBuilder(project)
.expand(expand)
.description(project.getDescription())
.url(project.getUrl())
.muteRoles()
.muteAssigneeType()
.muteUrl();
//To maintain strict compatibility with previous project list we override the self URL generation behaviour
//that projects get by default with the behaviour that was present from ProjectJsonBean
//See JDEV-22464 for more details
builder.self(URI.create(jiraBaseUrls.restApi2BaseUrl() + "project/" + project.getId().toString()));
String leadUserKey = project.getLeadUserKey();
final ApplicationUser user = userManager.getUserByKeyEvenWhenUnknown(leadUserKey);
builder.lead(user);
return builder;
}
代码示例来源:origin: com.atlassian.jira/jira-core
private List<ChangedValue> buildChangedValues(final Project originalProject, final Project currentProject)
{
final ChangedValuesBuilder changedValues = new ChangedValuesBuilder();
changedValues.addIfDifferent("common.words.name", originalProject == null ? null : originalProject.getName(), currentProject.getName());
changedValues.addIfDifferent("common.words.key", originalProject == null ? null : originalProject.getKey(), currentProject.getKey());
changedValues.addIfDifferent("common.concepts.description", originalProject == null ? null : originalProject.getDescription(), currentProject.getDescription());
changedValues.addIfDifferent("common.concepts.url", originalProject == null ? null : originalProject.getUrl(), currentProject.getUrl());
changedValues.addIfDifferent("common.concepts.projectlead", originalProject == null ? null : originalProject.getLeadUserName(), currentProject.getLeadUserName());
changedValues.addIfDifferent("admin.projects.default.assignee", originalProject == null ? null : pre(originalProject.getAssigneeType()), pre(currentProject.getAssigneeType()));
return changedValues.build();
}
代码示例来源:origin: com.atlassian.jira/jira-rest-plugin
@Override
public Response apply(final Project project)
{
final String id = avatarBean.getId();
Long avatarId;
try
{
avatarId = id == null ? null : Long.valueOf(id);
}
catch (NumberFormatException e)
{
avatarId = null;
}
final ProjectService.UpdateProjectValidationResult updateProjectValidationResult =
projectService.validateUpdateProject(authContext.getUser(), project.getName(), project.getKey(),
project.getDescription(), project.getLeadUserName(), project.getUrl(), project.getAssigneeType(),
avatarId);
if (!updateProjectValidationResult.isValid())
{
throwWebException(updateProjectValidationResult.getErrorCollection());
}
projectService.updateProject(updateProjectValidationResult);
return responses.noContent();
}
});
代码示例来源:origin: com.atlassian.studio/studio-theme-jira-plugin
@Override
public String doExecute()
{
// The JIRA project has already been created via the AddStudioProject action
final Project project = projectManager.getProjectObj(pid);
// We are now going to create the "project" in the linked applications
products = studioProjectService.create(getJiraServiceContext(), new StudioProjectImpl(project.getKey(), project.getName(), project.getDescription(), project.getId(), project.getUrl()));
if (hasAnyErrors() || projectsCreatedUnsuccessfully())
{
return redirectToGetErrorPage();
}
return getSuccessResult();
}
代码示例来源:origin: com.atlassian.jira/jira-rest-plugin
builder.lead(user);
builder.components(project.getProjectComponents());
builder.url(project.getUrl());
builder.versions(project.getVersions());
builder.assigneeType(project.getAssigneeType());
代码示例来源:origin: com.atlassian.jira/jira-core
@RequiresXsrfCheck
protected String doExecute() throws Exception
{
if (!(hasProjectAdminPermission() || hasAdminPermission()))
{
return "securitybreach";
}
final Project projectObject = getProjectObject();
final ProjectService.UpdateProjectValidationResult result =
projectService.validateUpdateProject(getLoggedInUser(), projectObject.getName(), projectObject.getKey(),
projectObject.getDescription(), getLead(), projectObject.getUrl(), getAssigneeType(), getAvatarId());
projectService.updateProject(result);
if (isInlineDialogMode())
{
return returnComplete();
}
return getRedirect("/plugins/servlet/project-config/" + getProjectObject().getKey() + "/roles");
}
代码示例来源:origin: com.atlassian.jira/jira-core
protected void doValidation()
{
// First check that the Project still exists
if (getProjectObject() == null)
{
addErrorMessage(getText("admin.errors.project.no.project.with.id"));
// Don't try to do any more validation.
return;
}
final Project projectObject = getProjectObject();
final ProjectService.UpdateProjectValidationResult result =
projectService.validateUpdateProject(getLoggedInUser(), projectObject.getName(), projectObject.getKey(),
projectObject.getDescription(), getLead(), projectObject.getUrl(), getAssigneeType(), getAvatarId());
if (!result.isValid())
{
//map keyed errors to JSP field names
mapErrorCollection(result.getErrorCollection());
}
if (getLeadUserObj() == null)
{
setLeadError(getLead());
}
}
代码示例来源:origin: com.atlassian.jira/jira-core
public String doDefault() throws Exception
{
// check if the project exists:
final Project projectObject = getProjectObject();
if (projectObject == null)
{
return handleProjectDoesNotExist();
}
if (!(hasProjectAdminPermission() || hasAdminPermission()))
{
return "securitybreach";
}
setName(projectObject.getName());
setLead(userKeyService.getUsernameForKey(projectObject.getLeadUserKey()));
setKeyEdited(false);
final String key = projectObject.getKey();
setKey(key);
setOriginalKey(key);
setUrl(projectObject.getUrl());
setDescription(projectObject.getDescription());
setAssigneeType(projectObject.getAssigneeType());
setAvatarId(projectObject.getAvatar().getId());
return INPUT;
}
代码示例来源:origin: com.atlassian.jira/jira-core
public String doDefault() throws Exception
{
// check if the project exists:
if (getProjectObject() == null)
{
return handleProjectDoesNotExist();
}
if (!(hasProjectAdminPermission() || hasAdminPermission()))
{
return "securitybreach";
}
setName(getProjectObject().getName());
setAvatarId(getProjectObject().getAvatar() != null ? getProjectObject().getAvatar().getId() : null);
setLead(getProjectObject().getLeadUserName());
setUrl(getProjectObject().getUrl());
setDescription(getProjectObject().getDescription());
setAssigneeType(getProjectObject().getAssigneeType());
return INPUT;
}
代码示例来源:origin: com.atlassian.jira/jira-rest-plugin
firstIfNotNull(updateData.getDescription(), projectToEdit.getDescription()),
firstIfNotNull(updateData.getLead(), projectToEdit.getProjectLead().getName()),
firstIfNotNull(updateData.getUrl(), projectToEdit.getUrl()),
firstIfNotNull(updateData.getAssigneeTypeOrNull(), projectToEdit.getAssigneeType()),
firstIfNotNull(updateData.getAvatarId(), projectToEdit.getAvatar().getId()));
内容来源于网络,如有侵权,请联系作者删除!