/**
  * Adds a new exercise type.
  *
  * Called when this component receives an HTTP POST request to
  * /exercisefiletype(/).
  * The request body should contain a JSON object representing the
  * new exercise file type's attributes.
  */
 public function addExerciseFileType($callName, $input, $params = array())
 {
     $positive = function ($input) {
         // sets the new auto-increment id
         $obj = new ExerciseFileType();
         $obj->setId($input[0]->getInsertId());
         return array("status" => 201, "content" => $obj);
     };
     return $this->_component->callSqlTemplate('out2', dirname(__FILE__) . '/Sql/AddExerciseFileType.sql', array('values' => $input->getInsertData()), 201, $positive, array(), 'Model::isProblem', array(new ExerciseFileType()));
 }