Package org.fao.geonet.kernel.setting

Examples of org.fao.geonet.kernel.setting.SettingInfo


   * @param context
   *
   */
  public void selectAll(String type, ServiceContext context, UserSession session) {
    Set<String> selection = selections.get(type);
    SettingInfo si = context.getBean(SettingInfo.class);
    int maxhits = DEFAULT_MAXHITS;

    try {
      maxhits = Integer.parseInt(si.getSelectionMaxRecords());
    } catch (Exception e) {
      e.printStackTrace();
    }

    if (selection != null)
View Full Code Here


    result = new HarvestResult ();
   
    GeonetContext gc = (GeonetContext) context.getHandlerContext (Geonet.CONTEXT_NAME);
    dataMan = gc.getBean(DataManager.class);
    schemaMan = gc.getBean(SchemaManager.class);
    SettingInfo si = context.getBean(SettingInfo.class);
    String siteUrl = si.getSiteUrl() + context.getBaseUrl();
    metadataGetService = siteUrl + "/srv/en/xml.metadata.get";
    ssParams.put("siteUrl", siteUrl);
  }
View Full Code Here

  {
    String url = null;

    Map<String, String> params = null;

    SettingInfo si = context.getBean(SettingInfo.class);

    try
    {
      url    = si.getSiteUrl() + context.getBaseUrl() +"/"+ Jeeves.Prefix.SERVICE +"/en/"+ context.getService();
      params = OaiPmhFactory.extractParams(request);

      AbstractRequest  req = OaiPmhFactory.parse(context.getApplicationContext(), params);
      OaiPmhService    srv = hmServices.get(req.getVerb());
      AbstractResponse res = srv.execute(req, context);
View Full Code Here

   * @param context the ServiceContext used to get setting manager and appPath
   * @param schemaName the name of the schema
     * @return
   */
  private String getSchemaUrl(ServiceContext context, String schemaName) {
    SettingInfo si = context.getBean(SettingInfo.class);

    String relativePath = Geonet.Path.SCHEMAS + schemaName + "/schema.xsd";
    return si.getSiteUrl() + context.getBaseUrl() + "/" + relativePath;
  }
View Full Code Here

   
    GeonetContext gc = (GeonetContext) context.getHandlerContext (Geonet.CONTEXT_NAME);
    dataMan = gc.getBean(DataManager.class);
    schemaMan = gc.getBean(SchemaManager.class);

    SettingInfo si = context.getBean(SettingInfo.class);
    String siteUrl = si.getSiteUrl() + context.getBaseUrl();
    metadataGetService = siteUrl + "/srv/en/xml.metadata.get";

   
    //--- Create fragment harvester for atomic datasets if required
    if (params.createAtomicDatasetMd && params.atomicMetadataGeneration.equals(ThreddsParams.FRAGMENTS)) {
View Full Code Here

  public static void doActions(ServiceContext context) throws Exception {
    GeonetContext  gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);
    DataManager    dataMan = gc.getBean(DataManager.class);
    SettingManager settingMan = gc.getBean(SettingManager.class);
    SettingInfo si = context.getBean(SettingInfo.class);

    try {
      if (si.getLuceneIndexOptimizerSchedulerEnabled()) {
        dataMan.rescheduleOptimizer(si.getLuceneIndexOptimizerSchedulerAt(), si.getLuceneIndexOptimizerSchedulerInterval());
      } else {
        dataMan.disableOptimizer();
      }
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

    this.params = params;

    GeonetContext gc = (GeonetContext) context.getHandlerContext (Geonet.CONTEXT_NAME);
    dataMan = gc.getBean(DataManager.class);

    SettingInfo si = context.getBean(SettingInfo.class);
    String siteUrl = si.getSiteUrl() + context.getBaseUrl();
    metadataGetService = siteUrl + "/srv/en/xml.metadata.get";

    if (params.templateId != null && !params.templateId.equals("0")) {
      loadTemplate();
    }
View Full Code Here

            metadataRepository.createBatchUpdateQuery(servicesPath, newUuid, MetadataSpecs.isHarvested(false));

            sourceRepository.delete(source);
        }

        SettingInfo info = context.getBean(SettingInfo.class);
        ServerBeanPropertyUpdater.updateURL(info.getSiteUrl(true) + context.getBaseUrl(), context.getApplicationContext());

        // Reload services affected by updated settings
        if (reloadServices) {
            DoActions.doActions(context);
        }
View Full Code Here

  //---------------------------------------------------------------------------

  public AbstractResponse execute(AbstractRequest request, ServiceContext context) throws Exception
  {
    IdentifyResponse res = new IdentifyResponse();
    SettingInfo      si  = context.getBean(SettingInfo.class);

    String baseUrl = si.getSiteUrl() + context.getBaseUrl() +"/"+ Jeeves.Prefix.SERVICE +"/en/"+ context.getService();

    res.setRepositoryName(si.getSiteName());
    res.setBaseUrl(baseUrl);
    res.setEarliestDateStamp(getEarliestDS(context));
    res.setDeletedRecord(DeletedRecord.NO);
    res.setGranularity(Granularity.LONG);
    res.addAdminEmail(si.getFeedbackEmail());

    return res;
  }
View Full Code Here

    SettingManager sm = gc.getBean(SettingManager.class);

    String adminEmail = sm.getValue("system/feedback/email");
    String thisSite = sm.getSiteName();

    SettingInfo si = context.getBean(SettingInfo.class);
    String siteURL = si.getSiteUrl() + context.getBaseUrl();

    // construct change key - only valid today
    String scrambledPassword = user.getPassword();
    Calendar cal = Calendar.getInstance();
    SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
View Full Code Here

TOP

Related Classes of org.fao.geonet.kernel.setting.SettingInfo

Copyright © 2018 www.massapicom. 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.