@ConfigProperty( type = Boolean.class, defaultValue = "false", @ConfigProperty( type=String.class, defaultValue = "wm/camunda-bpm-workmanager",
private static void processConfigProperty(Set configProperties, String propertyName, ConfigProperty property, String defaultValue, Class declaredEntityType) { String description = ""; if(property.description() != null && property.description().length > 0){ description = property.description()[0]; } Class type = getType(property, declaredEntityType); ConnectorConfigProperty ccp = getConfigProperty(defaultValue, description, property.ignore(), property.supportsDynamicUpdates(), property.confidential(), type, propertyName); if(!isConfigDefined(configProperties, ccp)){ configProperties.add(ccp); } }
private static Class getType( ConfigProperty property, Class type){ Class configPropertyType = property.type(); if (configPropertyType.equals(Object.class)) { configPropertyType = type; } return configPropertyType; }
throw new IllegalStateException(result); String defaultValue = property.defaultValue(); Class type = getType(property, m.getParameterTypes()[0]); processConfigProperty(configProperties, m.getName().substring(3), property, defaultValue, type); throw new IllegalStateException(status); String defaultValue = property.defaultValue();
/** * @param address * the address to set */ @ConfigProperty public void setAddress(String address) { this.address = address; }
configProperties.add(target); if (cpa.type() != Object.class && cpa.type() != type) { throw new DeploymentException("wrong type specified: " + cpa.type().getName() + " expecting " + type.getName()); target.setConfigPropertyValue(cpa.defaultValue()); target.setConfigPropertyConfidential(cpa.confidential()); target.setConfigPropertyIgnore(cpa.ignore()); target.setConfigPropertySupportsDynamicUpdates(cpa.supportsDynamicUpdates());
private static String validateField(Field f, ConfigProperty property){ Class c = f.getDeclaringClass(); Class returnType = f.getType(); Class type = property.type(); if (type.equals(Object.class)) { type = returnType; } else { //check compatibility between annotation type and return-type if (!returnType.isAssignableFrom(type)) { return "annotation type [" + type + "] " + "and return-type [" + returnType + "] " + "are not assignment compatible for @ConfigProperty in " + "field [ " + f.getName() + " ] of class [ " + c + " ]"; } } return SUCCESS; }
@Size(min = 1) @ConfigProperty(defaultValue = "2", supportsDynamicUpdates = true, description = "Maximum number of concurrent connections from different processes that an EIS instance can supportMaximum number of concurrent connections from different processes that an EIS instance can support") public void setMaxNumberOfConcurrentRequests(Integer maxNumberOfConcurrentRequests) { this.maxNumberOfConcurrentRequests = maxNumberOfConcurrentRequests; }
if (annotation.defaultValue() != null && annotation.defaultValue().length() > 0) { configProperty.setConfigPropertyValue(annotation.defaultValue()); configProperty.setConfigPropertyConfidential(annotation.confidential()); configProperty.setConfigPropertyIgnore(annotation.ignore()); configProperty.setConfigPropertySupportsDynamicUpdates(annotation.supportsDynamicUpdates()); configProperty.setDescriptions(stringsToTexts(annotation.description())); if (annotation.defaultValue() != null) { configProperty.setConfigPropertyValue(annotation.defaultValue()); configProperty.setConfigPropertyConfidential(annotation.confidential()); configProperty.setConfigPropertyIgnore(annotation.ignore()); configProperty.setConfigPropertySupportsDynamicUpdates(annotation.supportsDynamicUpdates());
private String getConfigPropertyType(final javax.resource.spi.ConfigProperty annotation, final Class<?> type) { Class<?> t = annotation == null ? null : annotation.type(); if (t == null && type != null) { return type.getName(); } else if (t == null) { return null; } if (t.equals(Object.class)) { t = type; } if (t == null) { // t == null && type == null return null; } if (t.isPrimitive()) { t = getWrapper(t.getName()); } return t.getName(); }
@Min(1) @ConfigProperty(defaultValue = "./store/", supportsDynamicUpdates = true, description = "The root folder of the file store") public void setRootDirectory(String rootDirectory) { out.println("#FileBucket.setRootDirectory: " + rootDirectory); this.rootDirectory = rootDirectory; }
if (configPropertyAnnotation.defaultValue() != null && !configPropertyAnnotation.defaultValue().equals("")) configPropertyValue = new XsdString(configPropertyAnnotation.defaultValue(), null); new XsdString(getConfigPropertyType(annotation, configPropertyAnnotation.type(), classLoader), null); Boolean configPropertySupportsDynamicUpdates = configPropertyAnnotation.supportsDynamicUpdates(); Boolean configPropertyConfidential = configPropertyAnnotation.confidential(); if (configPropertyAnnotation.description() != null && configPropertyAnnotation.description().length != 0) descriptions = new ArrayList<LocalizedXsdString>(configPropertyAnnotation.description().length); for (String descriptionAnnoptation : configPropertyAnnotation.description()) Boolean configPropertyIgnore = configPropertyAnnotation.ignore();
private String getConfigPropertyType(final javax.resource.spi.ConfigProperty annotation, final Class<?> type) { Class<?> t = annotation == null ? null : annotation.type(); if (t == null && type != null) { return type.getName(); } else if (t == null) { return null; } if (t.equals(Object.class)) { t = type; } if (t == null) { // t == null && type == null return null; } if (t.isPrimitive()) { t = getWrapper(t.getName()); } return t.getName(); }
/** * @param clusterPort * the clusterPort to set */ @ConfigProperty public void setClusterPort(Integer clusterPort) { this.vertxPlatformConfig.setClusterPort(clusterPort); }
if (annotation.defaultValue() != null && annotation.defaultValue().length() > 0) { configProperty.setConfigPropertyValue(annotation.defaultValue()); configProperty.setConfigPropertyConfidential(annotation.confidential()); configProperty.setConfigPropertyIgnore(annotation.ignore()); configProperty.setConfigPropertySupportsDynamicUpdates(annotation.supportsDynamicUpdates()); configProperty.setDescriptions(stringsToTexts(annotation.description())); if (annotation.defaultValue() != null) { configProperty.setConfigPropertyValue(annotation.defaultValue()); configProperty.setConfigPropertyConfidential(annotation.confidential()); configProperty.setConfigPropertyIgnore(annotation.ignore()); configProperty.setConfigPropertySupportsDynamicUpdates(annotation.supportsDynamicUpdates());
Class type = property.type(); Class[] parameters = m.getParameterTypes(); Class propertyType;
/** * @param clusterHost * the clusterHost to set */ @ConfigProperty(defaultValue = "localhost") public void setClusterHost(String clusterHost) { this.vertxPlatformConfig.setClusterHost(clusterHost); }
public HandlerProcessingResult handleConfigPropertyAnnotation( ConfigProperty configProperty, AnnotationInfo element, ConnectorDescriptor desc){ String defaultValue = configProperty.defaultValue(); String[] description = configProperty.description(); boolean ignore = configProperty.ignore(); boolean supportsDynamicUpdates = configProperty.supportsDynamicUpdates(); boolean confidential = configProperty.confidential();
@ConfigProperty(supportsDynamicUpdates = true, description = "The url of the remote system") public void setUrl(String url) { this.connectionConfiguration.setUrl(url); }
@ConfigProperty(supportsDynamicUpdates = true, description = "The login username for the remote system") public void setUsername(String username) { this.connectionConfiguration.setUsername(username); }