public String getDisplayName() { String retStr = this.displayName; if (retStr == null) { retStr = StringUtils.deCamelCase(this.name); } return retStr; }
public String getBugid() { List<String> bugs = new ArrayList<String>(); Set<AdvisoryBuglist> abugs = advisory.getAdvisorybugs(); for (AdvisoryBuglist abug : abugs) { bugs.add(abug.getBugid()); } return StringUtils.getListAsString(bugs, " "); }
|| (Character.isUpperCase(currentChar) && Character.isLowerCase(previousChar))) { appendWord(result, currentWord.toString()); currentWord = new StringBuilder(); appendWord(result, currentWord.toString());
public void setBasedir(BaseDirectory basedir) { if (basedir == null) { throw new NullPointerException("basedir is null"); } if (basedir.getValueContext() == null) { throw new NullPointerException("valueContext is null"); } if (basedir.getValueName() == null) { throw new NullPointerException("valueName is null"); } String valueContext = basedir.getValueContext().name(); String valueName = basedir.getValueName(); PropertyMap basedirMap = new PropertyMap(DriftConfigurationDefinition.PROP_BASEDIR); basedirMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_BASEDIR_VALUECONTEXT, valueContext)); basedirMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_BASEDIR_VALUENAME, StringUtils .useForwardSlash(valueName))); configuration.put(basedirMap); }
public List<String> getExpressionAsList() { /* * should never be empty tokens, but if we return all tokens now (including empty ones) the business logic * should remove the empty tokens when the user saves this definition */ return StringUtils.getStringAsList(expression, "\n", false); }
public void addInclude(Filter filter) { PropertyList filtersList = configuration.getList(DriftConfigurationDefinition.PROP_INCLUDES); if (filtersList == null) { // this is going to be our first include filter - make sure we create an initial list and put it in the config filtersList = new PropertyList(DriftConfigurationDefinition.PROP_INCLUDES); configuration.put(filtersList); } PropertyMap filterMap = new PropertyMap(DriftConfigurationDefinition.PROP_INCLUDES_INCLUDE); filterMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_PATH, StringUtils.useForwardSlash(filter .getPath()))); filterMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_PATTERN, filter.getPattern())); filtersList.add(filterMap); }
@Override public String toString() { String typeName = this.descriptorType.getSimpleName().replace("DescriptorType", ""); return StringUtils.deCamelCase(typeName); }
throw new BadArgumentException("Validation of parameters failed", StringUtils.getListAsString(errorMessages,", "));
public void addExclude(Filter filter) { PropertyList filtersList = configuration.getList(DriftConfigurationDefinition.PROP_EXCLUDES); if (filtersList == null) { // this is going to be our first include filter - make sure we create an initial list and put it in the config filtersList = new PropertyList(DriftConfigurationDefinition.PROP_EXCLUDES); configuration.put(filtersList); } PropertyMap filterMap = new PropertyMap(DriftConfigurationDefinition.PROP_EXCLUDES_EXCLUDE); filterMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_PATH, StringUtils.useForwardSlash(filter .getPath()))); filterMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_PATTERN, filter.getPattern())); filtersList.add(filterMap); }
packageType.setCategory(PackageCategory.BUNDLE); packageType.setSupportsArchitecture(false); packageType.setDisplayName(StringUtils.deCamelCase(name)); packageType.setDiscoveryInterval(-1L); packageType.setCreationData(false);
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; }
public static EventDefinition parseEventsMetadata(EventDescriptor eventDescriptor, ResourceType resourceType) { EventDefinition eventDefinition = new EventDefinition(resourceType, eventDescriptor.getName()); if (eventDescriptor.getDisplayName() != null) { eventDefinition.setDisplayName(eventDescriptor.getDisplayName()); } else { eventDefinition.setDisplayName(StringUtils.deCamelCase(eventDescriptor.getName())); } eventDefinition.setDescription(eventDescriptor.getDescription()); return eventDefinition; } }
private static PropertyDefinitionMap parseMapProperty(MapProperty mapProperty, AbstractPropertyMap defaultConfigurationParentMap) throws InvalidPluginDescriptorException { String description = parseMultiValue(mapProperty.getDescription(), mapProperty.getLongDescription()); PropertyDefinitionMap propDefMap = new PropertyDefinitionMap(mapProperty.getName().intern(), description, mapProperty.isRequired()); String displayName = (mapProperty.getDisplayName() != null) ? mapProperty.getDisplayName() : StringUtils .deCamelCase(mapProperty.getName()); if (displayName!=null) { propDefMap.setDisplayName(displayName.intern()); } propDefMap.setReadOnly(mapProperty.isReadOnly()); propDefMap.setSummary(mapProperty.isSummary()); // Add an instance of the map to the default config, if appropriate. PropertyMap propMap; if (defaultConfigurationParentMap != null) { propMap = new PropertyMap(propDefMap.getName()); defaultConfigurationParentMap.put(propMap); } else { propMap = null; } // Process the map's nested properties. List<JAXBElement<? extends ConfigurationProperty>> nestedProperties = mapProperty.getConfigurationProperty(); int propertyOrderIndex = 0; for (JAXBElement<? extends ConfigurationProperty> jaxbProperty : nestedProperties) { ConfigurationProperty uncastedProperty = jaxbProperty.getValue(); PropertyDefinition propertyDefinition = parseProperty(uncastedProperty, propertyOrderIndex++, propMap); propDefMap.put(propertyDefinition); } return propDefMap; }
group.getName()); groupDef.setDisplayName((group.getDisplayName() != null) ? group.getDisplayName() : StringUtils .deCamelCase(group.getName())); groupDef.setDescription(group.getDescription()); groupDef.setDefaultHidden(group.isHiddenByDefault());
public static OperationDefinition parseOperationDescriptor(OperationDescriptor operationDescriptor) throws InvalidPluginDescriptorException { String name = operationDescriptor.getName(); OperationDefinition operationDefinition = new OperationDefinition(operationDescriptor.getName(), // TODO display name "", ///operationDescriptor.getVersion().getMatch(), // TODO build the version embedded object operationDescriptor.getDescription()); operationDefinition.setParametersConfigurationDefinition(ConfigurationMetadataParser.parse(operationDescriptor .getName(), operationDescriptor.getParameters())); operationDefinition.setResultsConfigurationDefinition(ConfigurationMetadataParser.parse(operationDescriptor .getName(), operationDescriptor.getResults())); operationDefinition.setTimeout(operationDescriptor.getTimeout()); String displayName = operationDescriptor.getDisplayName(); if ((displayName == null) || displayName.equals("")) { displayName = StringUtils.deCamelCase(name); } operationDefinition.setDisplayName(displayName); return operationDefinition; } }
definition.setDisplayName(metricDescriptor.getDisplayName()); } else { definition.setDisplayName(StringUtils.deCamelCase(definition.getName()));
displayName = StringUtils.deCamelCase(descriptor.getName());
private static PropertyDefinitionDynamic parseDynamicProperty(DynamicProperty dynamicProperty) throws InvalidPluginDescriptorException { String description = parseMultiValue(dynamicProperty.getDescription(), dynamicProperty.getLongDescription()); String displayName = (dynamicProperty.getDisplayName() != null) ? dynamicProperty.getDisplayName() : StringUtils.deCamelCase(dynamicProperty.getName()); PropertyDefinitionDynamic property = new PropertyDefinitionDynamic(dynamicProperty.getName(), description, dynamicProperty.isRequired(), PropertyDynamicType.DATABASE, dynamicProperty.getDatabaseBacking().getKey() .value()); property.setReadOnly(dynamicProperty.isReadOnly()); property.setSummary(dynamicProperty.isSummary()); property.setDisplayName(displayName); property.setActivationPolicy(translateActivationPolicy(dynamicProperty.getActivationPolicy())); return property; }
String description = parseMultiValue(simpleProperty.getDescription(), simpleProperty.getLongDescription()); String displayName = (simpleProperty.getDisplayName() != null) ? simpleProperty.getDisplayName() : StringUtils .deCamelCase(simpleProperty.getName());