Tabnine Logo
ConfigurationKeyContextManager.context
Code IndexAdd Tabnine to your IDE (free)

How to use
context
method
in
de.smartics.properties.spi.config.domain.key.ConfigurationKeyContextManager

Best Java code snippets using de.smartics.properties.spi.config.domain.key.ConfigurationKeyContextManager.context (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

/**
 * 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

/**
 * 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

@Override
public final T createDefault()
{
 final ConfigurationKey<?> key =
   ConfigurationKeyContextManager.INSTANCE.context()
     .configurationKeyFactory().createDefaultKey();
 return create(key);
}
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

/**
 * 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

return ConfigurationKeyContextManager.INSTANCE.context()
  .configurationKeyFactory().createDefaultKey();
origin: de.smartics.properties/smartics-properties-config

return ConfigurationKeyContextManager.INSTANCE.context()
  .configurationKeyFactory().createDefaultKey();
de.smartics.properties.spi.config.domain.keyConfigurationKeyContextManagercontext

Javadoc

The configured context instance to access configuration key helpers.

Popular methods of ConfigurationKeyContextManager

  • createContext

Popular in Java

  • Parsing JSON documents to java classes using gson
  • runOnUiThread (Activity)
  • setScale (BigDecimal)
  • setContentView (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • String (java.lang)
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top plugins for Android Studio
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