Examples of ConfigurationService


Examples of org.dspace.services.ConfigurationService

        return false;
    }
   
    public static boolean isContentNegotiationEnabled()
    {
        ConfigurationService configurationService =
                new DSpace().getConfigurationService();
        return configurationService.getPropertyAsType(CONTENT_NEGOTIATION_KEY,
                false);
    }
View Full Code Here

Examples of org.dspace.xoai.services.api.config.ConfigurationService

        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(new Class[]{
                BasicConfiguration.class
        });

        ConfigurationService configurationService = applicationContext.getBean(ConfigurationService.class);
        XOAICacheService cacheService = applicationContext.getBean(XOAICacheService.class);
        XOAIItemCacheService itemCacheService = applicationContext.getBean(XOAIItemCacheService.class);

        try {
            CommandLineParser parser = new PosixParser();
            Options options = new Options();
            options.addOption("c", "clear", false, "Clear index before indexing");
            options.addOption("o", "optimize", false,
                    "Optimize index at the end");
            options.addOption("v", "verbose", false, "Verbose output");
            options.addOption("h", "help", false, "Shows some help");
            options.addOption("n", "number", true, "FOR DEVELOPMENT MUST DELETE");
            CommandLine line = parser.parse(options, argv);

            String[] validSolrCommands = {COMMAND_IMPORT, COMMAND_CLEAN_CACHE};
            String[] validDatabaseCommands = {COMMAND_CLEAN_CACHE, COMMAND_COMPILE_ITEMS, COMMAND_ERASE_COMPILED_ITEMS};


            boolean solr = true; // Assuming solr by default
            solr = !("database").equals(configurationService.getProperty("oai", "storage"));


            boolean run = false;
            if (line.getArgs().length > 0) {
                if (solr) {
View Full Code Here

Examples of org.hibernate.engine.config.spi.ConfigurationService

  @Override
  public StatisticsImplementor initiateService(
      SessionFactoryImplementor sessionFactory,
      MetadataImplementor metadata,
      ServiceRegistryImplementor registry) {
    ConfigurationService configurationService =  registry.getService( ConfigurationService.class );
    final Object configValue = configurationService.getSetting( STATS_BUILDER, null );
    return initiateServiceInternal( sessionFactory, configValue, registry );
  }
View Full Code Here

Examples of org.hibernate.engine.config.spi.ConfigurationService

    private String defaultCatalogName;

    public OptionsImpl(StandardServiceRegistry serviceRegistry) {
      this.serviceRegistry = serviceRegistry;

      ConfigurationService configService = serviceRegistry.getService( ConfigurationService.class );

      // cache access type
      defaultCacheAccessType = configService.getSetting(
          AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY,
          new ConfigurationService.Converter<AccessType>() {
            @Override
            public AccessType convert(Object value) {
              return AccessType.fromExternalName( value.toString() );
            }
          }
      );

      useNewIdentifierGenerators = configService.getSetting(
          AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS,
          new ConfigurationService.Converter<Boolean>() {
            @Override
            public Boolean convert(Object value) {
              return Boolean.parseBoolean( value.toString() );
            }
          },
          false
      );

      defaultSchemaName = configService.getSetting(
          AvailableSettings.DEFAULT_SCHEMA,
          new ConfigurationService.Converter<String>() {
            @Override
            public String convert(Object value) {
              return value.toString();
            }
          },
          null
      );

      defaultCatalogName = configService.getSetting(
          AvailableSettings.DEFAULT_CATALOG,
          new ConfigurationService.Converter<String>() {
            @Override
            public String convert(Object value) {
              return value.toString();
            }
          },
          null
      );

            globallyQuotedIdentifiers = configService.getSetting(
                    AvailableSettings.GLOBALLY_QUOTED_IDENTIFIERS,
                    new ConfigurationService.Converter<Boolean>() {
                        @Override
                        public Boolean convert(Object value) {
                            return Boolean.parseBoolean( value.toString() );
View Full Code Here

Examples of org.hibernate.service.config.spi.ConfigurationService

        private boolean globallyQuotedIdentifiers;
    private String defaultSchemaName;
    private String defaultCatalogName;

    public OptionsImpl(ServiceRegistry serviceRegistry) {
      ConfigurationService configService = serviceRegistry.getService( ConfigurationService.class );

      // cache access type
      defaultCacheAccessType = configService.getSetting(
          AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY,
          new ConfigurationService.Converter<AccessType>() {
            @Override
            public AccessType convert(Object value) {
              return AccessType.fromExternalName( value.toString() );
            }
          }
      );

      useNewIdentifierGenerators = configService.getSetting(
          AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS,
          new ConfigurationService.Converter<Boolean>() {
            @Override
            public Boolean convert(Object value) {
              return Boolean.parseBoolean( value.toString() );
            }
          },
          false
      );

      defaultSchemaName = configService.getSetting(
          AvailableSettings.DEFAULT_SCHEMA,
          new ConfigurationService.Converter<String>() {
            @Override
            public String convert(Object value) {
              return value.toString();
            }
          },
          null
      );

      defaultCatalogName = configService.getSetting(
          AvailableSettings.DEFAULT_CATALOG,
          new ConfigurationService.Converter<String>() {
            @Override
            public String convert(Object value) {
              return value.toString();
            }
          },
          null
      );

            globallyQuotedIdentifiers = configService.getSetting(
                    AvailableSettings.GLOBALLY_QUOTED_IDENTIFIERS,
                    new ConfigurationService.Converter<Boolean>() {
                        @Override
                        public Boolean convert(Object value) {
                            return Boolean.parseBoolean( value.toString() );
View Full Code Here

Examples of org.hibernate.service.config.spi.ConfigurationService

  @Override
  public StatisticsImplementor initiateService(
      SessionFactoryImplementor sessionFactory,
      MetadataImplementor metadata,
      ServiceRegistryImplementor registry) {
    ConfigurationService configurationService =  registry.getService( ConfigurationService.class );
    final Object configValue = configurationService.getSetting( STATS_BUILDER, null );
    return initiateServiceInternal( sessionFactory, configValue, registry );
  }
View Full Code Here

Examples of org.jmanage.core.services.ConfigurationService

            paramValues.put(ApplicationConfig.JNDI_FACTORY, appForm.getJndiFactory());
        if(appForm.getJndiURL() != null)
            paramValues.put(ApplicationConfig.JNDI_URL, appForm.getJndiURL());
        appConfigData.setParamValues(paramValues);

        ConfigurationService service = ServiceFactory.getConfigurationService();
        appConfigData = service.addApplication(Utils.getServiceContext(context), appConfigData);
       
        // TODO: This should be handled in a listener to NewApplicationEvent
        //      and ApplicationChangedEvent -rk
        /* add qualifying dashboards */
        ApplicationConfig appConfig =
View Full Code Here

Examples of org.jmanage.core.services.ConfigurationService

                graphConfig.setScaleUp(null);
            }
            graphConfig.setAppConfig(appConfig);
        }

        ConfigurationService service = ServiceFactory.getConfigurationService();
        service.addGraph(Utils.getServiceContext(context), graphConfig);
        return mapping.findForward(Forwards.SUCCESS);
    }
View Full Code Here

Examples of org.jmanage.core.services.ConfigurationService

        appConfigData.setName(connForm.getName());
        appConfigData.setType(connForm.getType());
        appConfigData.setParamValues(paramValueMap);

        ConfigurationService service = ServiceFactory.getConfigurationService();
        appConfigData = service.addApplication(Utils.getServiceContext(context), appConfigData);
       
        // TODO: This should be handled in a listener to NewApplicationEvent
        //      and ApplicationChangedEvent -rk
        /* add qualifying dashboards */
        ApplicationConfig appConfig =
View Full Code Here

Examples of org.jmanage.core.services.ConfigurationService

*/
public class ListApplicationsHandler implements CommandHandler {

    public boolean execute(HandlerContext context) {

        ConfigurationService configService =
                ServiceFactory.getConfigurationService();
        List appConfigList = configService.getAllApplications(
                context.getServiceContext());
        for(Iterator it=appConfigList.iterator(); it.hasNext();){
            ApplicationConfigData appConfig = (ApplicationConfigData)it.next();
            if(appConfig.isCluster()){
                Out.println(appConfig.getName() + " [cluster]");
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.