add a application to this company.
        :param application: the application to add on this company
        :param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
        add the application object on list to be added on next save().
        :return:

def add_application(self, application, sync=True):
        """
        add a application to this company.
        :param application: the application to add on this company
        :param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
        add the application object on list to be added on next save().
        :return:
        """
        LOGGER.debug("Company.add_application")
        if not sync:
            self.applications_2_add.append(application)
        else:
            if application.id is None:
                application.save()
            if self.id is not None and application.id is not None:
                params = {
                    'id': self.id,
                    'applicationID': application.id
                }
                args = {'http_operation': 'GET', 'operation_path': 'update/applications/add', 'parameters': params}
                response = CompanyService.requester.call(args)
                if response.rc != 0:
                    LOGGER.warning(
                        'Company.add_application - Problem while updating company ' + self.name +
                        '. Reason: ' + str(response.response_content) + '-' + str(response.error_message) +
                        " (" + str(response.rc) + ")"
                    )
                else:
                    self.applications_ids.append(application.id)
                    application.sync()
            else:
                LOGGER.warning(
                    'Company.add_application - Problem while updating company ' + self.name + '. Reason: application ' +
                    application.name + ' id is None or self.id is None'
                )