Examples of SelectionManager


Examples of autotest.common.table.SelectionManager

        selectionManager = tableDecorator.addSelectionManager(false);
        tableDecorator.addTableActionsWithExportCsvListener(this);
        tablePanel.clear();
        tablePanel.add(tableDecorator);

        selectionManager = new SelectionManager(table, false);
    }
View Full Code Here

Examples of com.bekvon.bukkit.residence.selection.SelectionManager

                Plugin p = server.getPluginManager().getPlugin("WorldEdit");
                if (p != null) {
                    smanager = new WorldEditSelectionManager(server);
                    Logger.getLogger("Minecraft").log(Level.INFO, "[Residence] Found WorldEdit");
                } else {
                    smanager = new SelectionManager(server);
                    Logger.getLogger("Minecraft").log(Level.INFO, "[Residence] WorldEdit NOT found!");
                }

                blistener = new ResidenceBlockListener();
                plistener = new ResidencePlayerListener();
View Full Code Here

Examples of com.cedarsoft.utils.springrcp.selection.SelectionManager

  /**
   * Initializes the selection change listeners
   */
  protected void initSelectionChanges() {
    //Update the selection
    SelectionManager selectionManager = SelectionManager.getInstance();

    /*
    * Update the selection model, when the selection state for this window changed
    */
    selectionManager.getWindowSelectionManager( getContext().getWindow() ).addSelectionListener( getBeanType(), new SelectionManager.SelectionListener<T>() {
      public void notifySelectionChanged( @NotNull Selection<T> selection ) {
        if ( changing ) {
          return;
        }
        changing = true;
View Full Code Here

Examples of com.cedarsoft.utils.springrcp.selection.SelectionManager

   * update the selection manager
   *
   * @param selectedBean the newly selected bean for the manager
   */
  public void updateSelectionManager( @Nullable T selectedBean ) {
    SelectionManager selectionManager = SelectionManager.getInstance();
    selectionManager.getWindowSelectionManager( getContext().getWindow() ).setSelection( new DefaultSelection<T>( getBeanType(), selectedBean ) );
  }
View Full Code Here

Examples of edu.isi.karma.controller.command.selection.SelectionManager

    Worksheet(String id, HTable headers, Table dataTable, String encoding) {
        super(id);
        this.headers = headers;
        this.dataTable = dataTable;
        this.encoding = encoding;
        this.selMgr = new SelectionManager();
        this.superSelMgr = new SuperSelectionManager();       
    }
View Full Code Here

Examples of org.fao.geonet.kernel.SelectionManager

        .getParam(params, "relation", "true");

    UserSession session = context.getUserSession();

    Log.info(Geonet.MEF, "Create export task for selected metadata(s).");
    SelectionManager selectionManger = SelectionManager.getManager(session);
    Set<String> uuids = selectionManger
        .getSelection(SelectionManager.SELECTION_METADATA);
    Set<String> uuidsBeforeExp = Collections
        .synchronizedSet(new HashSet<String>(0));
        Log.info(Geonet.MEF, "Current record(s) in selection: " + uuids.size());
        uuidsBeforeExp.addAll(uuids);

        // If provided uuid, export the metadata record only
        if (uuid != null) {
            SelectionManager.getManager(session).close(SelectionManager.SELECTION_METADATA);

            SelectionManager.getManager(session).addSelection(
                    SelectionManager.SELECTION_METADATA, uuid);

            uuids = selectionManger
                    .getSelection(SelectionManager.SELECTION_METADATA);
        }


        // If provided uuid, export the metadata record only
        if (uuid != null) {
            SelectionManager.getManager(session).close(SelectionManager.SELECTION_METADATA);

            SelectionManager.getManager(session).addSelection(
                    SelectionManager.SELECTION_METADATA, uuid);

            uuids = selectionManger
                    .getSelection(SelectionManager.SELECTION_METADATA);
        }

    // MEF version 1 only support one metadata record by file.
    // Uuid parameter MUST be set and add to selection manager before
    // export.
    if (version == null) {
      file = MEFLib.doExport(context, uuid, format, skipUUID, resolveXlink, removeXlinkAttribute);
    } else {
      // MEF version 2 support multiple metadata record by file.

      if (relatedMetadataRecord.equals("true")) {
        // Adding children in MEF file
        Set<String> tmpUuid = new HashSet<String>();
        for (Iterator<String> iter = uuids.iterator(); iter.hasNext();) {
          String _uuid = (String) iter.next();

          // Creating request for services search
          Element childRequest = new Element("request");
          childRequest.addContent(new Element("parentUuid")
              .setText(_uuid));
          childRequest.addContent(new Element("to").setText("1000"));

          // Get children to export - It could be better to use GetRelated service TODO
          Set<String> childs = getUuidsToExport(_uuid, context,
              childRequest);
          if (childs.size() != 0) {
            tmpUuid.addAll(childs);
          }

          // Creating request for services search
          Element servicesRequest = new Element(Jeeves.Elem.REQUEST);
          servicesRequest.addContent(new Element(
              org.fao.geonet.constants.Params.OPERATES_ON)
              .setText(_uuid));
          servicesRequest.addContent(new Element(
              org.fao.geonet.constants.Params.TYPE)
              .setText("service"));

          // Get linked services for export
          Set<String> services = getUuidsToExport(_uuid, context,
              servicesRequest);
          if (services.size() != 0) {
            tmpUuid.addAll(services);
          }
        }

        if (selectionManger.addAllSelection(
            SelectionManager.SELECTION_METADATA, tmpUuid))
          Log.info(Geonet.MEF,
              "Child and services added into the selection");
      }

      uuids = selectionManger
          .getSelection(SelectionManager.SELECTION_METADATA);
      Log.info(Geonet.MEF, "Building MEF2 file with " + uuids.size()
          + " records.");

      file = MEFLib
          .doMEF2Export(context, uuids, format, false, stylePath, resolveXlink, removeXlinkAttribute);
    }

    // -- Reset selection manager
    selectionManger.close();
    selectionManger.addAllSelection(SelectionManager.SELECTION_METADATA,
        uuidsBeforeExp);

    String fname = String.valueOf(Calendar.getInstance().getTimeInMillis());

    return BinaryFile.encode(200, file, "export-" + format + "-" + fname
View Full Code Here

Examples of org.fao.geonet.kernel.SelectionManager

        if (oldSearcher instanceof LuceneSearcher) ((LuceneSearcher)oldSearcher).close();
      }
    }

    context.info("Get selected metadata");
    SelectionManager sm = SelectionManager.getManager(session) ;

    // Get the sortBy params in order to apply on new result list.
        if (StringUtils.isNotEmpty(params.getChildText(Geonet.SearchResult.SORT_BY)) ) {
            params.addContent(new Element(Geonet.SearchResult.SORT_BY).setText(params.getChildText(Geonet.SearchResult.SORT_BY)));
        }

        if (StringUtils.isNotEmpty(params.getChildText(Geonet.SearchResult.SORT_ORDER))) {
            params.addContent(new Element(Geonet.SearchResult.SORT_ORDER).setText(params.getChildText(Geonet.SearchResult.SORT_ORDER)));
        }
       
    if (sm != null) {
      String uuids= "";
      boolean first = true;
      synchronized(sm.getSelection("metadata")) {
        for (Iterator<String> iter = sm.getSelection("metadata").iterator(); iter.hasNext();) {
          String uuid = (String) iter.next();
          if (first) {
            uuids = (String) uuid;
            first = false;
          }
View Full Code Here

Examples of org.fao.geonet.kernel.SelectionManager

    // --- see if we need to process selected set or just uuid
    if (uuid.length() == 0) { // no uuid so process selected set
      if(context.isDebugEnabled()) context.debug("Get selected metadata");

      SelectionManager sm = SelectionManager.getManager(session);

      synchronized(sm.getSelection("metadata")) {
      for (Iterator<String> iter = sm.getSelection("metadata").iterator(); iter.hasNext();) {
        uuid = (String) iter.next();
        processRecord(context, uuid, category, xpath, getTit, xpathTit, doChanges, metadata, notFound, notOwner, subtemplates, response);

      }
      }
View Full Code Here

Examples of org.fao.geonet.kernel.SelectionManager

        Set<Integer> metadata = new HashSet<Integer>();
        Set<Integer> notFound = new HashSet<Integer>();
        Set<Integer> notOwner = new HashSet<Integer>();

        context.info("Get selected metadata");
        SelectionManager sm = SelectionManager.getManager(session);

        synchronized (sm.getSelection("metadata")) {
            for (Iterator<String> iter = sm.getSelection("metadata").iterator(); iter.hasNext(); ) {
                String uuid = (String) iter.next();
                String id = dm.getMetadataId(uuid);

                context.info("Attempting to set metadata owner on: " + id);
View Full Code Here

Examples of org.fao.geonet.kernel.SelectionManager

     if (oldSearcher != null)
       if (oldSearcher instanceof LuceneSearcher)
         ((LuceneSearcher)oldSearcher).close();
   
    // possibly close old selection
    SelectionManager oldSelection = (SelectionManager)session.getProperty(Geonet.Session.SELECTED_RESULT);
   
    if (oldSelection != null){
      oldSelection.close();
    }
   

    // perform the search and save search query into session
    MetaSearcher searcher;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.