Create a configuration object that adds mime type mappings.
@return a configuration object for adding mime type mappings
513941
private Configuration getMimeTypeConfiguration() {
		return new AbstractConfiguration() {

			@Override
			public void configure(WebAppContext context) throws Exception {
				MimeTypes mimeTypes = context.getMimeTypes();
				for (MimeMappings.Mapping mapping : getMimeMappings()) {
					mimeTypes.addMimeMapping(mapping.getExtension(),
							mapping.getMimeType());
				}
			}

		};
	}
512890
public static List<RepositoryConfiguration> createDefaultRepositoryConfiguration() {
		MavenSettings mavenSettings = new MavenSettingsReader().readSettings();
		List<RepositoryConfiguration> repositoryConfiguration = new ArrayList<>();
		repositoryConfiguration.add(MAVEN_CENTRAL);
		if (!Boolean.getBoolean("disableSpringSnapshotRepos")) {
			repositoryConfiguration.add(SPRING_MILESTONE);
			repositoryConfiguration.add(SPRING_SNAPSHOT);
		}
		addDefaultCacheAsRepository(mavenSettings.getLocalRepository(),
				repositoryConfiguration);
		addActiveProfileRepositories(mavenSettings.getActiveProfiles(),
				repositoryConfiguration);
		return repositoryConfiguration;
	}
245341
public ClientConfiguration createClientConfiguration() {
        return ClientConfiguration.builder(buildTimeSeriesUrl(), username, password)
                .connectTimeoutMillis(connectTimeoutMillis)
                .readTimeoutMillis(readTimeoutMillis)
                .pingTimeoutMillis(pingTimeoutMillis)
                .ignoreSSLErrors(ignoreSSLErrors)
                .skipStreamingControl(skipStreamingControl)
                .enableBatchCompression(enableGzipCompression)
                .userAgent(userAgent)
                .build();
    }
1311773
protected function createMimetypeFile()
    {
        $this->createFileWithContents($this->rootFolder, self::MIMETYPE_FILE_NAME, self::MIMETYPE);
        return $this;
    }
15867
public String add(String extension, String mimeType) {
		Mapping previous = this.map.put(extension, new Mapping(extension, mimeType));
		return (previous != null) ? previous.getMimeType() : null;
	}
79511
public ClusterConfigurationsInner withConfigurations(Map<String, Map<String, String>> configurations) {
        this.configurations = configurations;
        return this;
    }
1010454
function MIME() {

  var self = this;

  this.types = Object.create( null );
  this.extensions = Object.create( null );

  for ( var type in typesData ) {
    var exts = typesData[ type ];
    self.extensions[ type ] = exts;
    exts.forEach( function( ext ) {
        self.types[ ext ] = type;
    });
  }

  this.default = this.types[ 'bin' ];

}
829688
public static ObjectMapper buildObjectMapper() {
		ObjectMapper objectMapper = new ObjectMapper();
		objectMapper.setDateFormat(new StdDateFormat());
		objectMapper.setPropertyNamingStrategy(new PropertyNamingStrategy.SnakeCaseStrategy());
		objectMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
		objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
		objectMapper.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING, true);
		objectMapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);

		configureCredentialDetailTypeMapping(objectMapper);

		return objectMapper;
	}
921613
public Configuration create() {
        Configuration configuration;
        try {
            InputStream stream = null;
            try {
                // Search the user configuration
                stream = Utils.openResourceStream(DEFAULT_USER_CONFIGURATION_FILE);

                // If user configuration not found then use default
                if (stream == null) {
                    stream = Utils.openResourceStream(DEFAULT_CONFIGURATION_FILE);
                }

                if (stream != null) {
                    configuration = create(stream);
                } else {
                    throw new TextProcessorFactoryException("Can't find or open default configuration resource.");
                }
            } finally {
                if (stream != null) {
                    stream.close();
                }
            }

            Properties properties = new Properties();

            // Load properties from .property file
            InputStream propertiesStream = null;
            try {
                propertiesStream = Utils.openResourceStream(DEFAULT_PROPERTIES_FILE);
                if (propertiesStream != null) {
                    properties.load(propertiesStream);
                }
            } finally {
                if (propertiesStream != null) {
                    propertiesStream.close();
                }
            }

            // Load properties from xml file
            InputStream xmlPropertiesStream = null;
            try {
                xmlPropertiesStream = Utils.openResourceStream(DEFAULT_PROPERTIES_XML_FILE);
                if (xmlPropertiesStream != null) {
                    properties.loadFromXML(xmlPropertiesStream);
                }
            } finally {
                if (xmlPropertiesStream != null) {
                    xmlPropertiesStream.close();
                }
            }

            if (!properties.isEmpty()) {
                Map<String, CharSequence> params = new HashMap<String, CharSequence>();
                params.putAll(configuration.getParams());
                for (Map.Entry<Object, Object> entry : properties.entrySet()) {
                    Object key = entry.getKey();
                    if (key != null) {
                        params.put(key.toString(), entry.getValue().toString());
                    }
                }
                configuration.setParams(params);
            }
        } catch (IOException e) {
            throw new TextProcessorFactoryException(e);
        }

        return configuration;
    }
911800
@RequestMapping(value = "configurations/create", method = RequestMethod.POST)
    public JIRAConfiguration newConfiguration(@RequestBody JIRAConfiguration configuration) {
        return jiraConfigurationService.newConfiguration(configuration);
    }
892452
@RequestMapping(value = "configurations/create", method = RequestMethod.POST)
    public SVNConfiguration newConfiguration(@RequestBody SVNConfiguration configuration) {
        return svnConfigurationService.newConfiguration(configuration);
    }
545847
@ReadOperation
    public Map<String, Object> configuration() {
        val configuredLoggers = new HashSet<Object>();
        getLoggerConfigurations().forEach(config -> {
            val loggerMap = new HashMap<String, Object>();
            loggerMap.put("name", StringUtils.defaultIfBlank(config.getName(), LOGGER_NAME_ROOT));
            loggerMap.put("state", config.getState());
            if (config.getPropertyList() != null) {
                loggerMap.put("properties", config.getPropertyList());
            }
            loggerMap.put("additive", config.isAdditive());
            loggerMap.put("level", config.getLevel().name());
            val appenders = new HashSet<Object>();
            config.getAppenders().keySet().stream().map(key -> config.getAppenders().get(key)).forEach(appender -> {
                val builder = new ToStringBuilder(this, ToStringStyle.JSON_STYLE);
                builder.append("name", appender.getName());
                builder.append("state", appender.getState());
                builder.append("layoutFormat", appender.getLayout().getContentFormat());
                builder.append("layoutContentType", appender.getLayout().getContentType());
                if (appender instanceof FileAppender) {
                    builder.append(FILE_PARAM, ((FileAppender) appender).getFileName());
                    builder.append(FILE_PATTERN_PARAM, "(none)");
                }
                if (appender instanceof RandomAccessFileAppender) {
                    builder.append(FILE_PARAM, ((RandomAccessFileAppender) appender).getFileName());
                    builder.append(FILE_PATTERN_PARAM, "(none)");
                }
                if (appender instanceof RollingFileAppender) {
                    builder.append(FILE_PARAM, ((RollingFileAppender) appender).getFileName());
                    builder.append(FILE_PATTERN_PARAM, ((RollingFileAppender) appender).getFilePattern());
                }
                if (appender instanceof MemoryMappedFileAppender) {
                    builder.append(FILE_PARAM, ((MemoryMappedFileAppender) appender).getFileName());
                    builder.append(FILE_PATTERN_PARAM, "(none)");
                }
                if (appender instanceof RollingRandomAccessFileAppender) {
                    builder.append(FILE_PARAM, ((RollingRandomAccessFileAppender) appender).getFileName());
                    builder.append(FILE_PATTERN_PARAM, ((RollingRandomAccessFileAppender) appender).getFilePattern());
                }
                appenders.add(builder.build());
            });
            loggerMap.put("appenders", appenders);
            configuredLoggers.add(loggerMap);
        });
        val responseMap = new HashMap<String, Object>();
        responseMap.put("loggers", configuredLoggers);

        val loggers = getActiveLoggersInFactory();
        responseMap.put("activeLoggers", loggers.values());

        return responseMap;
    }
318064
def create(self):
        
        data = values.of({})

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return ConfigurationInstance(self._version, payload, )
1346435
private ObjectMapper createObjectMapper() {
        ObjectMapper mapper = new ObjectMapper();
        mapper.registerModule(new JodaModule());
        mapper.configure(SerializationFeature.INDENT_OUTPUT, true);
        return mapper;
    }
717672
public static Configuration defaultConfiguration() {
        Defaults defaults = getEffectiveDefaults();
        return Configuration.builder().jsonProvider(defaults.jsonProvider()).options(defaults.options()).build();
    }
374639
public Map<String, JSType> getPropertyTypeMap() {
    ImmutableMap.Builder<String, JSType> propTypeMap = ImmutableMap.builder();
    for (String name : this.getPropertyNames()) {
      propTypeMap.put(name, this.getPropertyType(name));
    }
    return propTypeMap.build();
  }
976612
public static <T> Meta<T> meta() {
    return new Meta<>(MetaConfig.defaultConfig(), null, TYPED_PROPERTY_ARRAYS.empty(), TYPED_STRING_ARRAYS.empty());
  }