|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.rundeck.core.plugins.configuration.PropertyResolverFactory
public class PropertyResolverFactory
Factory for different property resolvers for use by plugins
Field Summary | |
---|---|
static java.lang.String |
FRAMEWORK_PREFIX
|
static java.lang.String |
PLUGIN_PREFIX
|
static java.lang.String |
PROJECT_PREFIX
|
static java.lang.String |
SEP
|
Constructor Summary | |
---|---|
PropertyResolverFactory()
|
Method Summary | |
---|---|
static PropertyResolver |
createFrameworkProjectRuntimeResolver(Framework framework,
java.lang.String projectName,
java.util.Map<java.lang.String,java.lang.Object> instanceProperties,
java.lang.String pluginType,
java.lang.String providerName)
Create a PropertyResolver for a plugin for resolving Framework, Project and instance scoped properties. |
static PropertyResolver |
createInstanceResolver(java.util.Map<java.lang.String,java.lang.Object> instanceProperties)
Create a PropertyResolver for a plugin for resolving only instance scoped properties. |
static PropertyResolver |
createPrefixedResolver(PropertyResolver resolver,
java.lang.String providerName,
java.lang.String pluginType)
Create a resolver from a set of retrievers, possibly null |
static PropertyResolver |
createResolver(PropertyRetriever instanceRetriever,
PropertyRetriever projectRetriever,
PropertyRetriever frameworkRetriever)
Create a resolver from a set of retrievers, possibly null |
static PropertyResolver |
createStepPluginRuntimeResolver(StepExecutionContext context,
java.util.Map<java.lang.String,java.lang.Object> instanceProperties,
java.lang.String pluginType,
java.lang.String providerName)
Create a PropertyResolver for a plugin for resolving Framework, Project and instance scoped properties. |
static java.lang.String |
frameworkPropertyPrefix(java.lang.String basePrefix)
|
static PropertyRetriever |
instanceRetriever(java.util.Map<java.lang.String,?> configuration)
Create a basic retriever from a Map of values |
static java.util.Map<java.lang.String,java.lang.Object> |
mapPropertyValues(java.util.List<Property> list,
PropertyResolver resolver)
Return All property values for the input property set mapped by name to value. |
static java.lang.String |
pluginPropertyPrefix(java.lang.String stepType,
java.lang.String pluginName)
|
static java.lang.String |
projectPropertyPrefix(java.lang.String basePrefix)
|
static PropertyResolver |
withDefaultScope(PropertyScope scope,
PropertyResolver resolver)
Return a new PropertyResolver using the given scope by default if the requested property scope is unspecified |
static PropertyResolver |
withDefaultValues(PropertyResolver resolver,
PropertyRetriever defaults)
Return a new PropertyResolver which will return values taken from the defaults if the given resolver returns null |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SEP
public static final java.lang.String PROJECT_PREFIX
public static final java.lang.String FRAMEWORK_PREFIX
public static final java.lang.String PLUGIN_PREFIX
Constructor Detail |
---|
public PropertyResolverFactory()
Method Detail |
---|
public static java.lang.String pluginPropertyPrefix(java.lang.String stepType, java.lang.String pluginName)
public static java.lang.String projectPropertyPrefix(java.lang.String basePrefix)
public static java.lang.String frameworkPropertyPrefix(java.lang.String basePrefix)
public static java.util.Map<java.lang.String,java.lang.Object> mapPropertyValues(java.util.List<Property> list, PropertyResolver resolver)
public static PropertyResolver createStepPluginRuntimeResolver(StepExecutionContext context, java.util.Map<java.lang.String,java.lang.Object> instanceProperties, java.lang.String pluginType, java.lang.String providerName)
public static PropertyResolver createFrameworkProjectRuntimeResolver(Framework framework, java.lang.String projectName, java.util.Map<java.lang.String,java.lang.Object> instanceProperties, java.lang.String pluginType, java.lang.String providerName)
framework
- the frameworkprojectName
- name of the project, or null to disable project property resolutioninstanceProperties
- instance properties, or nullpublic static PropertyResolver createResolver(PropertyRetriever instanceRetriever, PropertyRetriever projectRetriever, PropertyRetriever frameworkRetriever)
instanceRetriever
- projectRetriever
- frameworkRetriever
-
public static PropertyResolver createPrefixedResolver(PropertyResolver resolver, java.lang.String providerName, java.lang.String pluginType)
public static PropertyResolver createInstanceResolver(java.util.Map<java.lang.String,java.lang.Object> instanceProperties)
public static PropertyRetriever instanceRetriever(java.util.Map<java.lang.String,?> configuration)
configuration
-
public static PropertyResolver withDefaultScope(PropertyScope scope, PropertyResolver resolver)
public static PropertyResolver withDefaultValues(PropertyResolver resolver, PropertyRetriever defaults)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |