Creates a new section in a project.

Returns the full record of the newly created section.

@param  project The project to create the section in
@return Request object
487036
public ItemRequest<Section> createInProject(String project) {
    
        String path = String.format("/projects/%s/sections", project);
        return new ItemRequest<Section>(this, Section.class, path, "POST");
    }
587326
private void readProject(Project project)
   {
      Task mpxjTask = m_projectFile.addTask();
      //project.getAuthor()
      mpxjTask.setBaselineCost(project.getBaselineCost());
      mpxjTask.setBaselineFinish(project.getBaselineFinishDate());
      mpxjTask.setBaselineStart(project.getBaselineStartDate());
      //project.getBudget();
      //project.getCompany()
      mpxjTask.setFinish(project.getFinishDate());
      //project.getGoal()
      //project.getHyperlinks()
      //project.getMarkerID()
      mpxjTask.setName(project.getName());
      mpxjTask.setNotes(project.getNote());
      mpxjTask.setPriority(project.getPriority());
      //      project.getSite()
      mpxjTask.setStart(project.getStartDate());
      //      project.getStyleProject()
      //      project.getTask()
      //      project.getTimeScale()
      //      project.getViewProperties()

      String projectIdentifier = project.getID().toString();
      mpxjTask.setGUID(UUID.nameUUIDFromBytes(projectIdentifier.getBytes()));

      //
      // Sort the tasks into the correct order
      //
      List<Document.Projects.Project.Task> tasks = new ArrayList<Document.Projects.Project.Task>(project.getTask());
      final AlphanumComparator comparator = new AlphanumComparator();

      Collections.sort(tasks, new Comparator<Document.Projects.Project.Task>()
      {
         @Override public int compare(Document.Projects.Project.Task o1, Document.Projects.Project.Task o2)
         {
            return comparator.compare(o1.getOutlineNumber(), o2.getOutlineNumber());
         }
      });

      Map<String, Task> map = new HashMap<String, Task>();
      map.put("", mpxjTask);

      for (Document.Projects.Project.Task task : tasks)
      {
         readTask(projectIdentifier, map, task);
      }
   }
1156221
@CheckForNull
    public static GitHubRepositoryName create(GithubProjectProperty projectProperty) {
        if (projectProperty == null) {
            return null;
        }

        return GitHubRepositoryName.create(projectProperty.getProjectUrlStr());
    }
1177773
public Project.Layouts.Layout.ViewSettings.Zoom createProjectLayoutsLayoutViewSettingsZoom()
   {
      return new Project.Layouts.Layout.ViewSettings.Zoom();
   }
157234
@SuppressWarnings("unchecked")
    @Override
    protected Project initProject() {
        Collection errors = new ArrayList();
        String projectFilePathOrURI = getProjectIdentifier();
        return new Project(projectFilePathOrURI, errors);
    }
913712
public void addSection(final Section SECTION) {
        if (null == SECTION) return;
        sections.add(SECTION);
        Collections.sort(sections, new SectionComparator());
        fireUpdateEvent(SECTION_EVENT);
    }
589788
public CollectionRequest<Task> projects(String task) {
    
        String path = String.format("/tasks/%s/projects", task);
        return new CollectionRequest<Task>(this, Task.class, path, "GET");
    }
416046
def create_project(self, name=None, project_id=None, path=None):
        

        if project_id is not None and project_id in self._projects:
            return self._projects[project_id]
        project = Project(name=name, project_id=project_id, path=path)
        self._check_available_disk_space(project)
        self._projects[project.id] = project
        return project
568276
@PostMapping("/addMappingProject")
  public String addMappingProject(
      @RequestParam("mapping-project-name") String name,
      @RequestParam("target-entity") String targetEntity,
      @RequestParam("depth") int depth) {
    MappingProject newMappingProject = mappingService.addMappingProject(name, targetEntity, depth);
    return "redirect:"
        + getMappingServiceMenuUrl()
        + "/mappingproject/"
        + newMappingProject.getIdentifier();
  }
214949
public CollectionRequest<Task> findBySection(String section) {
    
        String path = String.format("/sections/%s/tasks", section);
        return new CollectionRequest<Task>(this, Task.class, path, "GET");
    }
1166778
def create_project(self, key, name, description=""):
        
        url = 'rest/api/1.0/projects'
        data = {"key": key,
                "name": name,
                "description": description
                }
        return self.post(url, data=data)
976715
public function createProject(Project $project)
    {
        $request = $this->client->createRequest('POST', '/api/projects', null, array('insight_project' => $project->toArray()));

        return $this->serializer->deserialize(
            (string) $this->send($request)->getBody(),
            'SensioLabs\Insight\Sdk\Model\Project',
            'xml'
        );
    }
31942
def section(self, section):
        
        if not isinstance(self._container, ConfigUpdater):
            raise ValueError("Sections can only be added at section level!")
        if isinstance(section, str):
            # create a new section
            section = Section(section, container=self._container)
        elif not isinstance(section, Section):
            raise ValueError("Parameter must be a string or Section type!")
        if section.name in [block.name for block in self._container
                            if isinstance(block, Section)]:
            raise DuplicateSectionError(section.name)
        self._container.structure.insert(self._idx, section)
        self._idx += 1
        return self
796841
def _create_project(config):
    """"""
    try:
        response = config.pbclient.create_project(config.project['name'],
                                                  config.project['short_name'],
                                                  config.project['description'])
        check_api_error(response)
        return ("Project: %s created!" % config.project['short_name'])
    except exceptions.ConnectionError:
        return("Connection Error! The server %s is not responding" % config.server)
    except (ProjectNotFound, TaskNotFound):
        raise
1088490
public ItemRequest<Project> createInTeam(String team) {
    
        String path = String.format("/teams/%s/projects", team);
        return new ItemRequest<Project>(this, Project.class, path, "POST");
    }
947658
def create_project(self, name, description):
        
        self._cache_project_list_once()
        if name in [project.name for project in self.projects]:
            raise DuplicateNameError("There is already a project named {}".format(name))
        self.client.create_project(name, description)
        self.clear_project_cache()
        return name
361860
public AzkabanClientStatus createProject(String projectName,
                                           String description) throws AzkabanClientException {
    AzkabanMultiCallables.CreateProjectCallable callable =
       AzkabanMultiCallables.CreateProjectCallable.builder()
           .client(this)
           .projectName(projectName)
           .description(description)
           .build();

    return runWithRetry(callable, AzkabanClientStatus.class);
  }