Tabnine Logo
ConfigurationKeyContext
Code IndexAdd Tabnine to your IDE (free)

How to use
ConfigurationKeyContext
in
de.smartics.properties.spi.config.domain.key

Best Java code snippets using de.smartics.properties.spi.config.domain.key.ConfigurationKeyContext (Showing top 12 results out of 315)

origin: de.smartics.properties/smartics-properties-config

private static ConfigurationKey<?> createKey(final ApplicationId applicationId)
{
 return ConfigurationKeyContextManager.INSTANCE.context()
   .configurationKeyFactory().createKey(applicationId);
}
origin: de.smartics.properties/smartics-properties-config

/**
 * Returns the definition information for the given class loader.
 *
 * @param context the class loader and the root folder to read the
 *          <code>{@value de.smartics.properties.api.core.domain.PropertiesContext#DEFINITION_FILE_NAME}</code>
 *          .
 * @return the definition helper if there is a
 *         <code>{@value de.smartics.properties.api.core.domain.PropertiesContext#DEFINITION_FILE_NAME}</code>
 *         or at least
 *         {@value de.smartics.properties.api.core.domain.PropertiesContext#META_INF_HOME}
 *         , <code>null</code> otherwise.
 */
@CheckForNull
DefinitionKeyHelper getDefinition(final ClassPathContext context)
{
 DefinitionKeyHelper definition = definitionCache.get(context);
 if (definition == null)
 {
  final DefinitionConfigParser<?> parser =
    ConfigurationKeyContextManager.INSTANCE.context()
      .definitionConfigParser();
  final PropertiesDefinitionContext definitionContext =
    parser.parse(context);
  definition =
    ConfigurationKeyContextManager.INSTANCE.context()
      .definitionKeyHelper(definitionContext);
  definitionCache.put(context, definition);
 }
 return definition;
}
origin: de.smartics.properties/smartics-properties-config

/**
 * Expected to be called with write lock acquired.
 */
private ConfigurationPropertiesManagement constructConfigurationWithDefaults(
  final ConfigurationKey<?> key)
{
 final KeyListBuilder builder =
   ConfigurationKeyContextManager.INSTANCE.context().keyListBuilder();
 final List<ConfigurationKey<?>> keySet = builder.createKeyList(key);
 final List<ConfigurationPropertiesManagement> defaults =
   new ArrayList<ConfigurationPropertiesManagement>(keySet.size());
 for (final ConfigurationKey<?> current : keySet)
 {
  final ConfigurationPropertiesManagement config =
    getCachedOrCreate(current);
  if (config != null)
  {
   defaults.add(config);
  }
 }
 if (defaults.isEmpty())
 {
  return null;
 }
 if (defaults.size() == 1)
 {
  return defaults.get(0);
 }
 return new ConfigurationPropertiesManagementWithDefaults(defaults);
}
origin: de.smartics.properties/smartics-properties-config

/**
 * Default constructor.
 *
 * @param registry the registry to resolve property descriptors.
 * @param decrypter the helper to decrypt secured property values.
 * @throws NullArgumentException if {@code registry} or {@code decrypter} is
 *           <code>null</code>.
 */
public BootConfigurationProperties(final PropertyDescriptorRegistry registry,
  final PropertyValueSecurity decrypter) throws NullArgumentException
{
 super(ConfigurationKeyContextManager.INSTANCE.context()
   .configurationKeyFactory().createUniqueKey("smartics-boot"), registry,
   decrypter);
}
origin: de.smartics.properties/smartics-properties-config

@Override
public final ConfigurationPropertiesManagement createDefaultManagement()
{
 final ConfigurationKey<?> key =
   ConfigurationKeyContextManager.INSTANCE.context()
     .configurationKeyFactory().createDefaultKey();
 return createManagement(key);
}
origin: de.smartics.properties/smartics-properties-config

@Override
public final T createDefault()
{
 final ConfigurationKey<?> key =
   ConfigurationKeyContextManager.INSTANCE.context()
     .configurationKeyFactory().createDefaultKey();
 return create(key);
}
origin: de.smartics.properties/smartics-properties-config

/**
 * Convenience constructor allowing to control the need of existing properties
 * files on the classpath, using its own registry and an artificial key.
 *
 * @param requiresDefaultOnClassPath the flag controls the behavior on not
 *          finding default properties on the classpath. If the value is
 *          <code>true</code> not finding the properties file on the class
 *          path signals an exception, if set to <code>false</code> the
 *          properties are not required to exist. In the latter case the
 *          properties may be set purely programatically.
 * @param decrypter the helper to decrypt secured property values.
 * @throws NullArgumentException if {@code decrypter} is <code>null</code>.
 */
public ClasspathConfigurationProperties(
  final boolean requiresDefaultOnClassPath,
  final PropertyValueSecurity decrypter) throws NullArgumentException
{
 super(ConfigurationKeyContextManager.INSTANCE.context()
   .configurationKeyFactory().createDefaultKey(),
   new InMemoryPropertyDescriptorRegistry(), requiresDefaultOnClassPath,
   decrypter);
}
origin: de.smartics.properties/smartics-properties-transfer-filesystem

@Override
public void clear() throws TransferException
{
 try
 {
  FileUtils.cleanDirectory(targetFolder);
 }
 catch (final IOException e)
 {
  final ConfigurationKey<?> key =
    ConfigurationKeyContextManager.INSTANCE.context()
      .configurationKeyFactory().createDefaultKey();
  throw new TransferException(new TransferMessageBean(
    TransferFileCode.FAILED_TO_CLEAN, e, key, targetFolder));
 }
}
origin: de.smartics.properties/smartics-properties-resource-maven

private static void initialize()
{
 final ConfigurationPropertiesFactory factory =
   ConfigurationPropertiesFactoryFactory
     .createFactory(PropertiesConfigurationPropertiesFactory.class);
 final ConfigurationKey<?> key =
   ConfigurationKeyContextManager.INSTANCE.context()
     .configurationKeyFactory().createDefaultKey();
 final ConfigurationPropertiesManagement propertiesConfiguration =
   factory.createManagement(key);
 INSTANCE =
   propertiesConfiguration
     .getProperties(ResourceRepositoryProperties.class);
}
origin: de.smartics.properties/smartics-properties-config

private ConfigurationKey<?> parseKey(final String key)
{
 final ConfigurationKeyFactory<?> factory =
   ConfigurationKeyContextManager.INSTANCE.context()
     .configurationKeyFactory();
 try
 {
  final ConfigurationKey<?> configurationKey =
    factory.createKeyFromString(key);
  return configurationKey;
 }
 catch (final IllegalArgumentException e)
 {
  final DataSourceConfigurationMessageBean message =
    new DataSourceConfigurationMessageBean(
      DataSourceCode.INVALID_CONFIGURATION_KEY, e,
      manager.getDataSourceId(), null);
  throw new DataSourceException(message); // NOPMD
 }
}
origin: de.smartics.properties/smartics-properties-config

.configurationKeyFactory().createDefaultKey();
origin: de.smartics.properties/smartics-properties-config

.configurationKeyFactory().createDefaultKey();
de.smartics.properties.spi.config.domain.keyConfigurationKeyContext

Javadoc

Provides access to utilities to deal with configuration keys.

Most used methods

  • configurationKeyFactory
    Provides access to the configuration key factory.
  • definitionConfigParser
    Provides a parser to parse definition files.
  • definitionKeyHelper
    Provides a contextaware definition helper.
  • keyListBuilder
    Provides access to the key list builder that creates a list of configuration keys to fetch property

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getContentResolver (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now