Saving organization workflow
434550
public function iSaveWorkflow()
	{
		$locator = '#workflowSettings-buttons-submit';
		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
		$element->click();
	}
1104316
function doSaveDocument() {
    var presenter = new mindmaps.SaveDocumentPresenter(eventBus,
        mindmapModel, new mindmaps.SaveDocumentView(), autosaveController, filePicker);
    presenter.go();
  }
439887
def save_as(self):
        """"""
        editorstack = self.get_current_editorstack()
        if editorstack.save_as():
            fname = editorstack.get_current_filename()
            self.__add_recent_file(fname)
251516
def serialize_workflow(self):
        
        self.workflow.refresh_waiting_tasks()
        return CompactWorkflowSerializer().serialize_workflow(self.workflow,
                                                              include_spec=False)
845811
def save_mets(self):
        
        log.info("Saving mets '%s'" % self.mets_target)
        if self.automatic_backup:
            WorkspaceBackupManager(self).add()
        with open(self.mets_target, 'wb') as f:
            f.write(self.mets.to_xml(xmllint=True))
822404
def save_all(self):
        
        for index in range(self.get_stack_count()):
            if self.data[index].editor.document().isModified():
                self.save(index)
905677
def save doc, output, &data_iterator
    
      if output.respond_to?(:write)
        @out_stream = output
      else
        @out_stream = open(output, "w")
      end
    
      data_iterator.call(doc)
      
    end
562087
def saveParList(self, *args, **kw):
        """"""
        if 'filename' in kw:
            filename = kw['filename']
        if not filename:
            filename = self.getFilename()
        if not filename:
            raise ValueError("No filename specified to save parameters")

        if hasattr(filename,'write'):
            fh = filename
            absFileName = os.path.abspath(fh.name)
        else:
            absFileName = os.path.expanduser(filename)
            absDir = os.path.dirname(absFileName)
            if len(absDir) and not os.path.isdir(absDir): os.makedirs(absDir)
            fh = open(absFileName,'w')
        numpars = len(self.__paramList)
        if self._forUseWithEpar: numpars -= 1
        if not self.final_comment: self.final_comment = [''] # force \n at EOF
        # Empty the ConfigObj version of section.defaults since that is based
        # on an assumption incorrect for us, and override with our own list.
        # THIS IS A BIT OF MONKEY-PATCHING!  WATCH FUTURE VERSION CHANGES!
        # See Trac ticket #762.
        while len(self.defaults):
            self.defaults.pop(-1) # empty it, keeping ref
        for key in self._neverWrite:
            self.defaults.append(key)
        # Note also that we are only overwriting the top/main section's
        # "defaults" list, but EVERY [sub-]section has such an attribute...

        # Now write to file, delegating work to ConfigObj (note that ConfigObj
        # write() skips any items listed by name in the self.defaults list)
        self.write(fh)
        fh.close()
        retval = str(numpars) + " parameters written to " + absFileName
        self.filename = absFileName # reset our own ConfigObj filename attr
        self.debug('Keys not written: '+str(self.defaults))
        return retval
1035137
public function bindWorkspaceToOrganization()
    {
        $limit = 250;
        $offset = 0;
        $organizationManager = $this->container->get('claroline.manager.organization.organization_manager');
        $this->log('Add organizations to workspaces...');
        $this->om->startFlushSuite();
        $countWorkspaces = $this->om->count('ClarolineCoreBundle:Workspace\Workspace');

        while ($offset < $countWorkspaces) {
            //if there is too many workspaces, we retrieve them by small amounts
            $workspaces = $this->workspaceRepo->findBy([], null, $limit, $offset);
            $default = $organizationManager->getDefault();
            $this->om->merge($default);

            foreach ($workspaces as $workspace) {
                if (0 === count($workspace->getOrganizations())) {
                    $this->log('Add default organization for workspace '.$workspace->getCode());
                    $workspace->addOrganization($default);
                    $this->om->persist($workspace);
                } else {
                    $this->log('Organization already exists for workspace '.$workspace->getCode());
                }
            }

            $this->log("Flushing... [UOW = {$this->om->getUnitOfWork()->size()}]");
            $this->om->forceFlush();
            $this->om->clear();

            $offset += $limit;
        }

        $this->om->endFlushSuite();
    }
436053
def organization_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/organizations.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
997627
def workflow(ctx, client):
    """"""
    if ctx.invoked_subcommand is None:
        from renku.models.refs import LinkReference

        names = defaultdict(list)
        for ref in LinkReference.iter_items(client, common_path='workflows'):
            names[ref.reference.name].append(ref.name)

        for path in client.workflow_path.glob('*.cwl'):
            click.echo(
                '{path}: {names}'.format(
                    path=path.name,
                    names=', '.join(
                        click.style(_deref(name), fg='green')
                        for name in names[path.name]
                    ),
                )
            )
831709
def save_images(self):
        
        res_dict = self.treeview.get_selected()
        clobber = self.settings.get('clobber', False)
        self.treeview.clear_selection()  # Automatically disables Save button

        # If user gives empty string, no suffix.
        if self.suffix:
            sfx = '_' + self.suffix
        else:
            sfx = ''

        # Also include channel name in suffix. This is useful if user likes to
        # open the same image in multiple channels.
        if self.settings.get('include_chname', True):
            sfx += '_' + self.chname

        # Process each selected file. Each can have multiple edited extensions.
        for infile in res_dict:
            f_pfx = os.path.splitext(infile)[0]  # prefix
            f_ext = '.fits'  # Only FITS supported
            oname = f_pfx + sfx + f_ext
            outfile = os.path.join(self.outdir, oname)

            self.w.status.set_text(
                'Writing out {0} to {1} ...'.format(shorten_name(infile, 10),
                                                    shorten_name(oname, 10)))
            self.logger.debug(
                'Writing out {0} to {1} ...'.format(infile, oname))

            if os.path.exists(outfile) and not clobber:
                self.logger.error('{0} already exists'.format(outfile))
                continue

            bnch = res_dict[infile]

            if bnch.path is None or not os.path.isfile(bnch.path):
                self._write_mosaic(f_pfx, outfile)
            else:
                shutil.copyfile(bnch.path, outfile)
                self._write_mef(f_pfx, bnch.extlist, outfile)

            self.logger.info('{0} written'.format(outfile))

        self.w.status.set_text('Saving done, see log')
1347615
def refresh_save_all_action(self):
        """"""
        editorstack = self.get_current_editorstack()
        if editorstack:
            state = any(finfo.editor.document().isModified() or finfo.newly_created
                        for finfo in editorstack.data)
            self.save_all_action.setEnabled(state)
982509
public void actionSave() {

        HttpServletRequest request = getJsp().getRequest();
        // save initialized instance of this class in request attribute for included sub-elements
        request.setAttribute(SESSION_WORKPLACE_CLASS, this);

        // special case: set the preferred editor settings in the user settings object
        CmsUserSettings userSettings = new CmsUserSettings(getSettings().getUser());
        // first set the old preferred editors
        m_userSettings.setEditorSettings(userSettings.getEditorSettings());
        // also set the old start gallery settings
        m_userSettings.setStartGalleriesSetting(userSettings.getStartGalleriesSettings());
        // then set the old synchronization settings
        m_userSettings.setSynchronizeSettings(userSettings.getSynchronizeSettings());
        Enumeration<String> en = request.getParameterNames();
        while (en.hasMoreElements()) {
            // search all request parameters for the presence of the preferred editor parameters
            String paramName = en.nextElement();
            if (paramName.startsWith(PARAM_PREFERREDEDITOR_PREFIX)) {
                String paramValue = request.getParameter(paramName);
                if ((paramValue != null) && !INPUT_DEFAULT.equals(paramValue.trim())) {
                    // set selected editor for this resource type
                    m_userSettings.setPreferredEditor(
                        paramName.substring(PARAM_PREFERREDEDITOR_PREFIX.length()),
                        CmsEncoder.decode(paramValue));
                } else {
                    // reset preferred editor for this resource type
                    m_userSettings.setPreferredEditor(paramName.substring(PARAM_PREFERREDEDITOR_PREFIX.length()), null);
                }
            } else if (paramName.startsWith(PARAM_STARTGALLERY_PREFIX)) {
                String paramValue = request.getParameter(paramName);
                if (paramValue != null) {
                    // set the selected start gallery for the gallery type
                    m_userSettings.setStartGallery(
                        paramName.substring(PARAM_STARTGALLERY_PREFIX.length()),
                        CmsEncoder.decode(paramValue));
                }
            }
        }

        // set the current user in the settings object
        m_userSettings.setUser(getSettings().getUser());
        m_userSettings.setAdditionalPreferencesFrom(userSettings);

        try {
            // write the user settings to the db
            m_userSettings.save(getCms());
        } catch (CmsException e) {
            // should usually never happen
            if (LOG.isInfoEnabled()) {
                LOG.info(e.getLocalizedMessage());
            }
        }

        // update the preferences and project after saving
        updatePreferences(getCms(), getJsp().getRequest());

        try {
            String projectName = m_userSettings.getStartProject();
            CmsProject project = getCms().readProject(projectName);
            getCms().getRequestContext().setCurrentProject(project);
            getSettings().setProject(project.getUuid());
        } catch (Exception e) {
            // should usually never happen
            LOG.error(e.getLocalizedMessage());
        }

        // now determine if the dialog has to be closed or not
        try {
            if (DIALOG_SET.equals(getParamAction())) {
                // after "set" action, leave dialog open
                Map<String, String[]> params = new HashMap<String, String[]>();
                params.put(PARAM_TAB, new String[] {String.valueOf(getActiveTab())});
                params.put(PARAM_SETPRESSED, new String[] {Boolean.TRUE.toString()});
                sendForward(getJsp().getRequestContext().getUri(), params);
            } else {
                // forward to dialog with action set to reload the workplace
                Map<String, String[]> params = new HashMap<String, String[]>();
                params.put(PARAM_ACTION, new String[] {DIALOG_RELOAD});
                sendForward(getJsp().getRequestContext().getUri(), params);
            }
        } catch (IOException e) {
            // error during forward, do nothing
            if (LOG.isInfoEnabled()) {
                LOG.info(e.getLocalizedMessage());
            }
        } catch (ServletException e) {
            // error during forward, do nothing
            if (LOG.isInfoEnabled()) {
                LOG.info(e.getLocalizedMessage());
            }
        }
    }
98283
public void updateOrganization(int orgId, OrganizationCreate data) {
		getResourceFactory().getApiResource("/org/" + orgId)
				.entity(data, MediaType.APPLICATION_JSON_TYPE).put();
	}
840119
def onSave(self, grid):#, age_data_type='site'):
        
        # deselect column, including remove 'EDIT ALL' label
        if self.drop_down_menu:
            self.drop_down_menu.clean_up()

        # save all changes to er_magic data object
        self.grid_builder.save_grid_data()

        # don't actually write data in this step (time-consuming)
        # instead, write to files when user is done editing
        #self.er_magic_data.write_files()

        wx.MessageBox('Saved!', 'Info',
                      style=wx.OK | wx.ICON_INFORMATION)
1138337
def initialize_workflow(self, workflow):
        
        self.workflow = workflow()
        self.workflow.tasks = self.tasks

        self.workflow.input_file = self.input_file
        self.workflow.input_format = self.input_format
        self.workflow.target_file = self.target_file
        self.workflow.target_format = self.target_format
        self.workflow.run_id = self.run_id

        self.workflow.setup()