Saves modification to the api server.
436777
def save(self, inplace=True):
        
        modified = self._modified_data()
        if bool(modified):
            new_data = self.permissions.copy()
            new_data.update(modified['permissions'])
            data = {
                'permissions': new_data
            }
            url = six.text_type(self.href)
            self._api.patch(url=url, data=data, append_base=False)
        else:
            raise ResourceNotModified()
1313312
async def save(self):
        """"""
        if hasattr(self._handler, "update"):
            if self._changed_data:
                update_data = dict(self._changed_data)
                update_data.update({
                    key: self._orig_data[key]
                    for key in self._handler.params
                })
                self._data = await self._handler.update(**update_data)
        else:
            raise AttributeError(
                "'%s' object doesn't support save." % type(self).__name__)
414219
public synchronized void save() {
        SharedPreferences prefs = loadSharedPreferences("object");

        if (find(getId()) == null) {
            addObject();

            modelListenerHandler.execOnUpdateListeners(this, OnUpdateListener.Status.CREATED);

            if (cache && cachedObjects != null) {
                cachedObjects.add((T) this);
            }
        } else {
            modelListenerHandler.execOnUpdateListeners(this, OnUpdateListener.Status.UPDATED);
        }

        prefs.edit().putString(String.valueOf(getId()), toJson().toString()).commit();
    }
742402
def save(self):
        

        if self.object_id:
            # update event
            if not self._track_changes:
                return True  # there's nothing to update
            url = self.build_url(
                self._endpoints.get('event').format(id=self.object_id))
            method = self.con.patch
            data = self.to_api_data(restrict_keys=self._track_changes)
        else:
            # new event
            if self.calendar_id:
                url = self.build_url(
                    self._endpoints.get('event_calendar').format(
                        id=self.calendar_id))
            else:
                url = self.build_url(self._endpoints.get('event_default'))
            method = self.con.post
            data = self.to_api_data()

        response = method(url, data=data)
        if not response:
            return False

        self._track_changes.clear()  # clear the tracked changes

        if not self.object_id:
            # new event
            event = response.json()

            self.object_id = event.get(self._cc('id'), None)

            self.__created = event.get(self._cc('createdDateTime'), None)
            self.__modified = event.get(self._cc('lastModifiedDateTime'), None)

            self.__created = parse(self.__created).astimezone(
                self.protocol.timezone) if self.__created else None
            self.__modified = parse(self.__modified).astimezone(
                self.protocol.timezone) if self.__modified else None
        else:
            self.__modified = self.protocol.timezone.localize(dt.datetime.now())

        return True
145946
public function save()
    {
        if ($this->_state == CRUD::CREATE_STAT) {
            $this->add();
        } elseif ($this->_state == CRUD::UPDATE_STAT) {
            $this->edit();
        }
    }
1304444
def save(self, inplace=True):
        
        data = self._modified_data()
        data = data['permissions']
        if bool(data):
            url = six.text_type(self.href) + self._URL['permissions']
            extra = {'resource': self.__class__.__name__, 'query': data}
            logger.info('Modifying permissions', extra=extra)
            self._api.patch(url=url, data=data, append_base=False)
        else:
            raise ResourceNotModified()
653843
function save() {
          $.jsonCall('/apos-pages/' + action,
            data,
            function(data) {
              apos.redirect(data.slug);
            },
            function() {
              alert('Server error');
              callback('Server error');
            }
          );
        }
1080738
def save(self):
        """"""
        try:
            # ensure file is encoded properly while saving
            self.project.main_file.encoding = 'utf_8'
            self.project.save_main()
            if self.fix:
                LOGGER.info("Saved changes to '%s'", self.filename)
        except:  # pylint: disable=W0702
            LOGGER.error("Unable to save '%s'", self.filename)
            sys.exit(1)
1185641
def save(self):
        """"""
        if self.rater is not None:
            self.rater.set('modified', datetime.now().isoformat())

        xml = parseString(tostring(self.root))
        with open(self.xml_file, 'w') as f:
            f.write(xml.toxml())
599619
def save(self, inplace=True):
        
        modified_data = self._modified_data()
        if bool(modified_data):
            dataset_request_data = {}

            name = modified_data.pop('name', None)
            description = modified_data.pop('description', None)
            dataset_request_data.update(modified_data)

            if name:
                dataset_request_data['name'] = name

            if description:
                dataset_request_data['description'] = description

            response = self._api.patch(
                url=self._URL['get'].format(id=self.id),
                data=dataset_request_data
            )
            data = response.json()

            dataset = Dataset(api=self._api, **data)
            return dataset
839653
public void save() {

        CmsRpcAction<CmsAliasEditValidationReply> action = new CmsRpcAction<CmsAliasEditValidationReply>() {

            @Override
            public void execute() {

                start(200, false);

                CmsAliasSaveValidationRequest saveRequest = new CmsAliasSaveValidationRequest();
                saveRequest.setSiteRoot(m_siteRoot);
                List<CmsAliasTableRow> rows = m_view.getLiveData();
                saveRequest.setEditedData(rows);
                saveRequest.setRewriteData(m_view.getRewriteData());
                saveRequest.getDeletedIds().addAll(m_deletedIds);
                saveRequest.setOriginalData(m_initialData);
                getService().saveAliases(saveRequest, this);
            }

            @Override
            public void onResponse(CmsAliasEditValidationReply result) {

                stop(false);
                if (result == null) {
                    m_view.close();
                } else if (result.hasErrors()) {
                    m_view.update(result.getChangedRows());
                }
            }
        };
        action.execute();
    }
200690
def save(self, idempotency_key=None):
        """"""
        updated_params = self.serialize(None)
        headers = populate_headers(idempotency_key)

        if not updated_params:
            util.logger.debug("Trying to save already saved object %r", self)
            return defer.succeed(self)

        d = self.request('post', self.instance_url(), updated_params, headers)
        return d.addCallback(self.refresh_from).addCallback(lambda _: self)
307989
def save(self):
        
        # dict comprehension that also works with 2.6
        # http://stackoverflow.com/questions/21069668/alternative-to-dict-comprehension-prior-to-python-2-7
        kwargs = dict(
            (field, getattr(self, field))
            for field in self.updateable_fields
            if hasattr(self, field)
        )

        self.cloud_manager.modify_server(self.uuid, **kwargs)
        self._reset(kwargs)
645352
public function save()
    {
        parent::save();

        $soxId = $this->getEditObjectId();
        $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");

        if (!isset($aParams['oxvendor__oxactive'])) {
            $aParams['oxvendor__oxactive'] = 0;
        }

        $oVendor = oxNew(\OxidEsales\Eshop\Application\Model\Vendor::class);
        if ($soxId != "-1") {
            $oVendor->loadInLang($this->_iEditLang, $soxId);
        } else {
            $aParams['oxvendor__oxid'] = null;
        }

        //Disable editing for derived articles
        if ($oVendor->isDerived()) {
            return;
        }

        $oVendor->setLanguage(0);
        $oVendor->assign($aParams);
        $oVendor->setLanguage($this->_iEditLang);
        $oVendor = \OxidEsales\Eshop\Core\Registry::getUtilsFile()->processFiles($oVendor);
        $oVendor->save();

        // set oxid if inserted
        $this->setEditObjectId($oVendor->getId());
    }
466032
def save(self):
        

        if not self.id:
            save_method = Panoptes.client().post
            force_reload = False
        else:
            if not self.modified_attributes:
                return
            if not self._loaded:
                self.reload()
            save_method = Panoptes.client().put
            force_reload = True

        response, response_etag = save_method(
            self.url(self.id),
            json={self._api_slug: self._savable_dict(
                modified_attributes=self.modified_attributes
            )},
            etag=self.etag
        )

        raw_resource_response = response[self._api_slug][0]
        self.set_raw(raw_resource_response, response_etag)

        if force_reload:
            self._loaded = False

        return response
118494
function Save()
    {
        $this->contentRights->Save();
        if (!$this->rights)
        {
            $this->rights = new BackendPageRights();
        }
        $this->rights->SetCreateIn($this->Value('CreateIn'));
        $this->rights->SetEdit($this->Value('Edit'));
        $this->rights->SetMove($this->Value('Move'));
        $this->rights->SetRemove($this->Value('Remove'));
        $this->rights->SetContentRights($this->contentRights->Rights());
        $this->rights->Save();
    }
542549
private void save() {

        if ((m_focalPoint != null) && isEditable()) {
            int x = (int)m_focalPoint.getX();
            int y = (int)m_focalPoint.getY();
            String val = "" + x + "," + y;
            CmsUUID sid = m_imageInfoProvider.get().getStructureId();
            List<CmsPropertyModification> propChanges = new ArrayList<>();
            propChanges.add(new CmsPropertyModification(sid, CmsGwtConstants.PROPERTY_IMAGE_FOCALPOINT, val, false));
            final CmsPropertyChangeSet changeSet = new CmsPropertyChangeSet(sid, propChanges);
            CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

                @Override
                public void execute() {

                    CmsCoreProvider.getVfsService().saveProperties(changeSet, this);

                }

                @SuppressWarnings("synthetic-access")
                @Override
                protected void onResponse(Void result) {

                    m_savedFocalPoint = m_focalPoint;

                    if (m_pointWidget != null) {
                        m_pointWidget.setIsDefault(false);
                    }
                    m_imageInfoProvider.get().setFocalPoint(m_focalPoint);
                    if (m_nextAction != null) {
                        m_nextAction.run();
                    }

                }
            };
            action.execute();

        }
    }