private static PropertyDefinitionList createIncludes(ConfigurationDefinition configDef, boolean readOnly) { String name = PROP_INCLUDES; String description = "A set of patterns that specify files and/or directories to include."; boolean required = false; PropertyDefinitionMap map = createInclude(readOnly); PropertyDefinitionList pd = new PropertyDefinitionList(name, description, required, map); pd.setDisplayName("Includes"); pd.setReadOnly(readOnly); pd.setSummary(true); pd.setOrder(8); pd.setConfigurationDefinition(configDef); return pd; }
private static PropertyDefinitionList createExcludes(ConfigurationDefinition configDef, boolean readOnly) { String name = PROP_EXCLUDES; String description = "A set of patterns that specify files and/or directories to exclude."; boolean required = false; PropertyDefinitionMap map = createExclude(readOnly); PropertyDefinitionList pd = new PropertyDefinitionList(name, description, required, map); pd.setDisplayName("Excludes"); pd.setReadOnly(readOnly); pd.setSummary(true); pd.setOrder(9); pd.setConfigurationDefinition(configDef); return pd; }
private static PropertyDefinitionList parseListProperty(ListProperty listProperty) throws InvalidPluginDescriptorException { String description = parseMultiValue(listProperty.getDescription(), listProperty.getLongDescription()); JAXBElement<? extends ConfigurationProperty> memberProperty = listProperty.getConfigurationProperty(); PropertyDefinition memberDefinition = (memberProperty != null) ? parseProperty(memberProperty.getValue(), 0) : null; PropertyDefinitionList list = new PropertyDefinitionList(listProperty.getName().intern(), description, listProperty.isRequired(), memberDefinition); String displayName = (listProperty.getDisplayName() != null) ? listProperty.getDisplayName() : StringUtils .deCamelCase(listProperty.getName()); if (displayName!=null) { list.setDisplayName(displayName.intern()); } list.setReadOnly(listProperty.isReadOnly()); list.setSummary(listProperty.isSummary()); list.setMin(listProperty.getMin().intValue()); if (listProperty.getMax().equals("unbounded")) { list.setMax(Integer.MAX_VALUE); } else { list.setMax(Integer.parseInt(listProperty.getMax())); } return list; }
resourceTypePlugin, updateSchedules); PropertyDefinitionList metricUpdateOverrides = new PropertyDefinitionList(METRIC_UPDATE_OVERRIDES_PROPERTY, "Per metric settings", false, metricUpdateOverride);