@Override
  public void doAuthAction(ActionRequest request, ActionResponse response) throws Exception {

    String collectionId = request.getParameter("collectionId");

    JobService jobService = ServiceManager.getInstance().getService(JobService.class);

    MasterCollectionFullIndexingStepApplyJob masterCollectionIndexingJob =
        new MasterCollectionFullIndexingStepApplyJob();
    masterCollectionIndexingJob.setArgs(collectionId);

    ResultFuture jobResult = jobService.offer(masterCollectionIndexingJob);

    Writer writer = response.getWriter();
    ResponseWriter resultWriter = getDefaultResponseWriter(writer);
    resultWriter.object().key("collectionId").value(collectionId);

    if (jobResult != null) {
      resultWriter.key("status").value("0");
    } else {
      resultWriter.key("status").value("1");
    }
    resultWriter.endObject();
    resultWriter.done();
  }
  @Override
  public void doAuthAction(ActionRequest request, ActionResponse response) throws Exception {

    PluginService pluginService = ServiceManager.getInstance().getService(PluginService.class);

    String pluginId = request.getParameter("pluginId");

    Plugin plugin = pluginService.getPlugin(pluginId);

    PluginSetting pluginSetting = plugin.getPluginSetting();

    if (pluginSetting instanceof AnalysisPluginSetting) {

      OutputStream ostream = null;

      try {

        ostream = response.getOutputStream();

        JAXBConfigs.writeRawConfig(ostream, pluginSetting, AnalysisPluginSetting.class);

      } finally {

        if (ostream != null)
          try {
            ostream.close();
          } catch (IOException e) {
          }
      }
    }
  }