com.atlassian.jira.bc.project
Class DefaultProjectService

java.lang.Object
  extended by com.atlassian.jira.bc.project.DefaultProjectService
All Implemented Interfaces:
ProjectService

public class DefaultProjectService
extends Object
implements ProjectService


Field Summary
 
Fields inherited from interface com.atlassian.jira.bc.project.ProjectService
PROJECT_DESCRIPTION, PROJECT_KEY, PROJECT_LEAD, PROJECT_NAME, PROJECT_URL
 
Constructor Summary
DefaultProjectService(JiraAuthenticationContext jiraAuthenticationContext, ProjectManager projectManager, ApplicationProperties applicationProperties)
           
 
Method Summary
 boolean isValidAllProjectData(JiraServiceContext serviceContext, String name, String key, String lead, String url, Long assigneeType)
          Will validate all project fields setting the appropriate errors in the JiraServiceContext if any errors occur.
 boolean isValidRequiredProjectData(JiraServiceContext serviceContext, String name, String key, String lead)
          Will validate the fields required for creating a project and setting the appropriate validation errors in the JiraServiceContext if any errors occur.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultProjectService

public DefaultProjectService(JiraAuthenticationContext jiraAuthenticationContext,
                             ProjectManager projectManager,
                             ApplicationProperties applicationProperties)
Method Detail

isValidAllProjectData

public boolean isValidAllProjectData(JiraServiceContext serviceContext,
                                     String name,
                                     String key,
                                     String lead,
                                     String url,
                                     Long assigneeType)
Description copied from interface: ProjectService
Will validate all project fields setting the appropriate errors in the JiraServiceContext if any errors occur.

Specified by:
isValidAllProjectData in interface ProjectService
Parameters:
serviceContext - containing the errorCollection that will be populated with any validation errors that are encountered
name - the name of the project @NotNull
key - the key of the project @NotNull
lead - the project lead @NotNull
url - the project URL (optional)
assigneeType - the default assignee type (optional - only appears on some forms)
Returns:
true if project data is valid, false otherwise

isValidRequiredProjectData

public boolean isValidRequiredProjectData(JiraServiceContext serviceContext,
                                          String name,
                                          String key,
                                          String lead)
Description copied from interface: ProjectService
Will validate the fields required for creating a project and setting the appropriate validation errors in the JiraServiceContext if any errors occur.

Specified by:
isValidRequiredProjectData in interface ProjectService
Parameters:
serviceContext - containing the errorCollection that will be populated with any validation errors that are encountered
name - the name of the project @NotNull
key - the key of the project @NotNull
lead - the project lead @NotNull
Returns:
true if project data is valid, false otherwise


Copyright © 2002-2007 Atlassian. All Rights Reserved.