Creates the new
Project in current container with specified source storage (in other
words, imports a remote project).
Fires following events:
ResourceChangedEvent when project has successfully created.
Calling this method doesn't import a project immediately. To complete the request method
ProjectRequest#send() should be called.
Calling
ProjectRequest#send() produces new
Project resource.
The supplied argument
name should be a valid and pass validation within
NameUtils#checkProjectName(String).
Example of usage for creating a new project:
ProjectConfig config = ... ;
Container workspace = ... ;
Promise newProjectPromise = workspace.importProject()
.withBody(config)
.send();
newProjectPromise.then(new Operation() {
public void apply(Project newProject) throws OperationException {
//do something with new project
}
});
Fires
ResourceChangedEvent with the following
ResourceDelta: Delta kind:
ResourceDelta#ADDED. Created resource (instance of
Project) provided by
ResourceDelta#getResource()