public interface ProjectService
Modifier and Type | Method and Description |
---|---|
Project |
createProject(OrganizationDescriptor organizationContext,
String projectName,
List<Attribute> attributes)
Create a project within the specified organization.
|
void |
deleteProject(ProjectDescriptor project)
Delete the specified project.
|
List<AttributeDefinition> |
getAttributeDefinitionsForProject()
Get the set of definitions for attributes defined for project type including system and extended attribute types.
|
List<AttributeDefinition> |
getAttributeDefinitionsForProjectType()
Deprecated.
As of Java API 1.7. Replaced with
getAttributeDefinitionsForProject() . |
List<Attribute> |
getCreationAttributesForProject()
Get the set of attributes that can be used for creating a project.
|
List<Attribute> |
getCreationAttributesForProjectType()
Deprecated.
As of Java API 1.7. Replaced with
getCreationAttributesForProject() . |
Project |
getProjectByIdentifier(String projectIdentifier)
Get a project using its unique identifier in the system.
|
Project |
getProjectByName(OrganizationDescriptor organization,
String projectName)
Get project by specifying the organization context and name within that context.
|
ProjectDescriptor |
getProjectDescriptorByIdentifier(String projectIdentifier)
Get a light-weight representation of a project using its unique identifier in the system.
|
ProjectDescriptor |
getProjectDescriptorByName(OrganizationDescriptor organization,
String projectName)
Get a light-weight representation of a project by specifying the organization context and name within that
context.
|
List<ProjectDescriptor> |
getProjectDescriptorsByOrganization(OrganizationDescriptor organization)
Get light-weight representations of all projects associated with the given organization context.
|
List<Project> |
getProjectsByOrganization(OrganizationDescriptor organization)
Get all projects associated with the given organization context.
|
boolean |
projectExists(OrganizationDescriptor organization,
String projectName)
Test the existence of a project by its organization context and name.
|
Project |
renameProject(Project project,
String newName)
Rename the specified project with the new name specified.
|
Project |
setProjectState(ProjectDescriptor projectDescriptor,
State state,
String comment,
boolean includeAnalyses)
Set the state for the project
|
Project |
updateProject(Project project)
Update a project.
|
Project createProject(OrganizationDescriptor organizationContext, String projectName, List<Attribute> attributes) throws OrganizationNotFoundException, ProjectExistsException
organizationContext
- Organization with which this project will be associatedprojectName
- Name of the projectattributes
- A collection of Attribute
objects associated with the Project type
that can be specified at project creation. Use
getCreationAttributesForProjectType()
to get the
collection of creation attributes.OrganizationNotFoundException
- The specified organization does not exist in the systemProjectExistsException
- A project already exists in the system with that name and parent organization.Project updateProject(Project project) throws ProjectNotFoundException
project
- The project to be updated.ProjectNotFoundException
- Thrown if a project with the specified identifier does not exist in the system.ProjectDescriptor.setAttributes(List)
,
Project.setLead(String)
Project getProjectByIdentifier(String projectIdentifier) throws ProjectNotFoundException
projectIdentifier
- The unique identifier representing this project.ProjectNotFoundException
- A project with the specified identifier does not exist in the system.ProjectDescriptor getProjectDescriptorByIdentifier(String projectIdentifier) throws ProjectNotFoundException
projectIdentifier
- The unique identifier representing this project.ProjectNotFoundException
- A project with the specified identifier does not exist in the system.Project getProjectByName(OrganizationDescriptor organization, String projectName) throws ProjectNotFoundException
organization
- The parent organization of the project.projectName
- The name of the projectProjectNotFoundException
- A project with the specified name does not exist in the specified organization.ProjectDescriptor getProjectDescriptorByName(OrganizationDescriptor organization, String projectName) throws ProjectNotFoundException
organization
- The parent organization of the project.projectName
- The name of the projectProjectNotFoundException
- A project with the specified name does not exist in the specified organization.List<ProjectDescriptor> getProjectDescriptorsByOrganization(OrganizationDescriptor organization) throws OrganizationNotFoundException
organization
- The parent organization of the projects.OrganizationNotFoundException
- The specified organization does not exist.List<Project> getProjectsByOrganization(OrganizationDescriptor organization) throws OrganizationNotFoundException
organization
- The parent organization of the projects.OrganizationNotFoundException
- The specified organization does not exist.boolean projectExists(OrganizationDescriptor organization, String projectName)
organization
- The parent organization of the project.projectName
- The name of the project in question.void deleteProject(ProjectDescriptor project) throws ProjectNotFoundException
project
- The project to be deleted.ProjectNotFoundException
- The project to be deleted does not exist.Project renameProject(Project project, String newName) throws ProjectNotFoundException, ProjectRenameException
project
- The project to be renamed.newName
- The new name for the project.ProjectNotFoundException
- The project to be deleted does not exist.ProjectRenameException
- The project can not be given the specified name.@Deprecated List<Attribute> getCreationAttributesForProjectType() throws TypeNotFoundException
getCreationAttributesForProject()
.TypeNotFoundException
List<Attribute> getCreationAttributesForProject() throws TypeNotFoundException
TypeNotFoundException
@Deprecated List<AttributeDefinition> getAttributeDefinitionsForProjectType() throws TypeNotFoundException
getAttributeDefinitionsForProject()
.TypeNotFoundException
List<AttributeDefinition> getAttributeDefinitionsForProject() throws TypeNotFoundException
TypeNotFoundException
Project setProjectState(ProjectDescriptor projectDescriptor, State state, String comment, boolean includeAnalyses) throws ProjectNotFoundException, ProjectStateException
projectDescriptor
- The light-weight representation of the projectstate
- The state to set on the projectcomment
- Optionally, a comment about the state changeincludeAnalyses
- Whether to apply the state change to analyses as wellProjectNotFoundException
- The project does not exist.ProjectStateException
- The project state could not be set.Copyright (c) 2017, SAS Institute Inc., Cary, NC, USA