@Service public final class ConfigModularityUtils extends Object
Constructor and Description |
---|
ConfigModularityUtils() |
public <U extends ConfigBeanProxy> URL getConfigurationFileUrl(Class<U> configBeanClass, String baseFileName, String runtimeType)
public List<ConfigBeanDefaultValue> getDefaultConfigurations(Class configBeanClass, String runtimeType)
configBeanClass
- the config bean type we want to check for its configuration snippetpublic boolean hasCustomConfig(Class configBeanClass)
public Method findSuitableCollectionGetter(Class owner, Class typeToSet)
owner
- The class we want to search to find a method that returns a Collection typed with toSetTypetypeToSet
- The type we want to find a matching collection fopublic Method findDeeperSuitableCollectionGetter(Class owner, Class typeToSet)
public ConfigBeanProxy getOwningObject(String location)
public ConfigBeanProxy getOwner(ConfigBeanProxy parent, String parentElement, String childElement) throws InvocationTargetException, IllegalAccessException
public <U extends ConfigBeanProxy> List<U> getExtensions(ConfigBeanProxy parent)
public <T extends ConfigBeanProxy> T setConfigBean(T finalConfigBean, ConfigBeanDefaultValue configBeanDefaultValue, ConfigBeanProxy parent)
public <T extends ConfigBeanProxy> boolean stackPositionHigher(T finalConfigBean, ConfigBeanProxy itemToRemove)
public <T extends ConfigBeanProxy> void applyCustomTokens(ConfigBeanDefaultValue configBeanDefaultValue, T finalConfigBean, ConfigBeanProxy parent) throws TransactionFailure, PropertyVetoException
public void addSystemPropertyForToken(List<ConfigCustomizationToken> tokens, SystemPropertyBag bag) throws TransactionFailure, PropertyVetoException
public <T extends ConfigBeanProxy> T getCurrentConfigBeanForDefaultValue(ConfigBeanDefaultValue defaultValue) throws InvocationTargetException, IllegalAccessException
public <T extends ConfigBeanProxy> T getConfigBeanFromCollection(Collection<T> col, T configBeanObject, Class typeOfObjects) throws InvocationTargetException, IllegalAccessException
public <T extends ConfigBeanProxy> T getNamedConfigBeanFromCollection(Collection<T> col, String nameToLookFor, Class typeOfObjects) throws InvocationTargetException, IllegalAccessException
public String getNameForConfigBean(Object configBean, Class configBeanType) throws InvocationTargetException, IllegalAccessException
public String convertConfigElementNameToClassName(String name)
name
- the configuration element name we want to convert to class namepublic Class getClassFromInjector(ConfigInjector injector)
public String getServiceTypeNameIfNamedComponent(String serviceName)
public ConfigBeanProxy getConfigBeanInstanceFor(Class configBeanType)
public String serializeConfigBean(ConfigBeanProxy configBean)
public Method getMatchingGetterMethod(Class classToQuery, Class methodReturnType)
classToQuery
- The class we want to find the getter inmethodReturnType
- the type we want to find the getter forpublic Method getMatchingSetterMethod(Class classToQuery, Class typeToSet)
classToQuery
- The ConfigLoader we want to inspect for presence of a setter method accepting class of type fqcn.typeToSet
- the type we want to find a setter forpublic boolean deleteConfigurationForConfigBean(ConfigBeanProxy configBean, Collection col, ConfigBeanDefaultValue defaultValue)
public Class getClassFromDescriptor(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor)
public String replacePropertiesWithCurrentValue(String xmlConfiguration, ConfigBeanDefaultValue value) throws InvocationTargetException, IllegalAccessException
public String getPropertyValue(ConfigCustomizationToken token, ConfigBeanProxy finalConfigBean)
public String getRuntimeTypePrefix(com.sun.enterprise.module.bootstrap.StartupContext startupContext)
public boolean isIgnorePersisting()
public void setIgnorePersisting(boolean ignorePersisting)
public boolean isCommandInvocation()
public void setCommandInvocation(boolean commandInvocation)
Copyright © 2020. All rights reserved.