@Override protected String interpolate(String text) { if(text == null) { return null; } return replacer.replaceProperties(text); } }
public void setPolicy(String value) { this.policy = (this.replacer != null) ? this.replacer.replaceProperties(value) : value; }
private static String getElementText(final XMLStreamReader reader, final PropertyReplacer propertyReplacer) throws XMLStreamException { return propertyReplacer.replaceProperties(reader.getElementText()); }
protected String readResolveValue(final XMLExtendedStreamReader reader, final int index) { return propertyReplacer.replaceProperties(reader.getAttributeValue(index).trim()); }
public static String asOptionalString(AnnotationInstance annotation, String property, String defaultValue, PropertyReplacer propertyReplacer) { AnnotationValue value = annotation.value(property); if (value == null) { return defaultValue; } else { String valueString = value.asString(); if (valueString.isEmpty()) { return defaultValue; } else { return propertyReplacer != null ? propertyReplacer.replaceProperties(valueString) : valueString; } } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { AnnotationValue value = annotationInstance.value(); if (value == null) { return null; } return propertyReplacer.replaceProperties(value.asString()); } }
@Override protected String[] fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { String[] values = annotationInstance.value().asStringArray(); for (int i = 0; i < values.length; i++) { values[i] = propertyReplacer.replaceProperties(values[i]); } return values; } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { return propertyReplacer.replaceProperties(annotationInstance.value().asString()); } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { String resourceAdapterValue = annotationInstance.value().asString(); return propertyReplacer.replaceProperties(resourceAdapterValue); } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { return propertyReplacer.replaceProperties(annotationInstance.value().asString()); } }
@Override protected String[] fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { String[] values = annotationInstance.value().asStringArray(); for (int i = 0; i < values.length; i++) { values[i] = propertyReplacer.replaceProperties(values[i]); } return values; } }
@Override protected String[] fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { String[] values = annotationInstance.value().asStringArray(); for (int i = 0; i < values.length; i++) { values[i] = propertyReplacer.replaceProperties(values[i]); } return values; } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { return propertyReplacer.replaceProperties(annotationInstance.value().asString()); } }
private String stringValueOrNull(final AnnotationInstance annotation, final String attribute) { final AnnotationValue value = annotation.value(attribute); return (value != null) ? propertyReplacer.replaceProperties(value.asString()) : null; }
private Properties getActivationConfigProperties(final AnnotationInstance messageBeanAnnotation, PropertyReplacer propertyReplacer) { final Properties props = new Properties(); final AnnotationValue activationConfig = messageBeanAnnotation.value("activationConfig"); if (activationConfig == null) return props; for (final AnnotationInstance propAnnotation : activationConfig.asNestedArray()) { String propertyName = propAnnotation.value("propertyName").asString(); String propertyValue = propAnnotation.value("propertyValue").asString(); props.put(propertyReplacer.replaceProperties(propertyName), propertyReplacer.replaceProperties(propertyValue)); } return props; }
@Override protected CacheInfo fromAnnotation(AnnotationInstance annotationInstance, PropertyReplacer propertyReplacer) { String value = annotationInstance.value().asString(); return new CacheInfo(propertyReplacer.replaceProperties(value)); } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { AnnotationValue value = annotationInstance.value(); if (value == null || value.asString().isEmpty()) { throw EeLogger.ROOT_LOGGER.annotationAttributeMissing("@Pool", "value"); } return propertyReplacer.replaceProperties(value.asString()); } }
public static String asRequiredString(AnnotationInstance annotationInstance, final String attributeName, PropertyReplacer propertyReplacer) { final AnnotationValue nameValue = annotationInstance.value(attributeName); if (nameValue == null) { throw ROOT_LOGGER.annotationAttributeMissing(annotationInstance.name().toString(), attributeName); } final String nameValueAsString = nameValue.asString(); if (nameValueAsString.isEmpty()) { throw ROOT_LOGGER.annotationAttributeMissing(annotationInstance.name().toString(), attributeName); } return propertyReplacer != null ? propertyReplacer.replaceProperties(nameValueAsString) : nameValueAsString; } }
@Override protected ResourceDefinitionInjectionSource processAnnotation(AnnotationInstance annotationInstance, PropertyReplacer propertyReplacer) throws DeploymentUnitProcessingException { DataSourceDefinitionInjectionSource injectionSource = new DataSourceDefinitionInjectionSource(asRequiredString(annotationInstance, NAME_PROP)); injectionSource.setClassName(propertyReplacer.replaceProperties(asRequiredString(annotationInstance, CLASS_NAME_PROP))); injectionSource.setDatabaseName(propertyReplacer.replaceProperties(asOptionalString(annotationInstance, DATABASE_NAME_PROP))); injectionSource.setDescription(propertyReplacer.replaceProperties(asOptionalString(annotationInstance, DESCRIPTION_PROP))); injectionSource.setInitialPoolSize(asOptionalInt(annotationInstance, INITIAL_POOL_SIZE_PROP)); injectionSource.setIsolationLevel(asOptionalInt(annotationInstance, ISOLATION_LEVEL_PROP)); injectionSource.setLoginTimeout(asOptionalInt(annotationInstance, LOGIN_TIMEOUT_PROP)); injectionSource.setMaxIdleTime(asOptionalInt(annotationInstance, MAX_IDLE_TIME_PROP)); injectionSource.setMaxStatements(asOptionalInt(annotationInstance, MAX_STATEMENTS_PROP)); injectionSource.setMaxPoolSize(asOptionalInt(annotationInstance, MAX_POOL_SIZE_PROP)); injectionSource.setMinPoolSize(asOptionalInt(annotationInstance, MIN_POOL_SIZE_PROP)); injectionSource.setInitialPoolSize(asOptionalInt(annotationInstance, INITIAL_POOL_SIZE_PROP)); injectionSource.setPassword(propertyReplacer.replaceProperties(asOptionalString(annotationInstance, PASSWORD_PROP))); injectionSource.setPortNumber(asOptionalInt(annotationInstance, PORT_NUMBER_PROP)); injectionSource.addProperties(asOptionalStringArray(annotationInstance, PROPERTIES_PROP)); injectionSource.setServerName(propertyReplacer.replaceProperties(asOptionalString(annotationInstance, SERVER_NAME_PROP))); injectionSource.setTransactional(asOptionalBoolean(annotationInstance, TRANSACTIONAL_PROP)); injectionSource.setUrl(propertyReplacer.replaceProperties(asOptionalString(annotationInstance, URL_PROP))); injectionSource.setUser(propertyReplacer.replaceProperties(asOptionalString(annotationInstance, USER_PROP))); return injectionSource; } }
public void set(final AutoTimer timer, final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { final AnnotationValue value = annotationInstance.value(name); if (booleanValue) { if (value == null) { setBoolean(timer, defaultBooleanValue); } else { setBoolean(timer, value.asBoolean()); } } else { if (value == null) { setString(timer, defaultStringValue); } else { setString(timer, propertyReplacer.replaceProperties(value.asString())); } } }