Codota Logo
PropertyDefinitionEnumeration
Code IndexAdd Codota to your IDE (free)

How to use
PropertyDefinitionEnumeration
in
org.rhq.core.domain.configuration.definition

Best Java code snippets using org.rhq.core.domain.configuration.definition.PropertyDefinitionEnumeration (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: org.rhq/rhq-core-domain

private static PropertyDefinitionSimple createBasedirValueContext(boolean readOnly) {
  String name = PROP_BASEDIR_VALUECONTEXT;
  String description = "Identifies where the named value can be found.";
  boolean required = true;
  PropertySimpleType type = PropertySimpleType.STRING;
  PropertyDefinitionSimple pd = new PropertyDefinitionSimple(name, description, required, type);
  pd.setDisplayName("Value Context");
  pd.setReadOnly(readOnly);
  pd.setSummary(true);
  pd.setOrder(0);
  PropertyDefinitionEnumeration pcEnum = new PropertyDefinitionEnumeration(
    BaseDirValueContext.pluginConfiguration.name(), BaseDirValueContext.pluginConfiguration.name());
  pcEnum.setOrderIndex(0);
  PropertyDefinitionEnumeration rcEnum = new PropertyDefinitionEnumeration(
    BaseDirValueContext.resourceConfiguration.name(), BaseDirValueContext.resourceConfiguration.name());
  rcEnum.setOrderIndex(1);
  PropertyDefinitionEnumeration mtEnum = new PropertyDefinitionEnumeration(BaseDirValueContext.measurementTrait
    .name(), BaseDirValueContext.measurementTrait.name());
  mtEnum.setOrderIndex(2);
  PropertyDefinitionEnumeration fsEnum = new PropertyDefinitionEnumeration(BaseDirValueContext.fileSystem.name(),
    BaseDirValueContext.fileSystem.name());
  fsEnum.setOrderIndex(3);
  ArrayList<PropertyDefinitionEnumeration> pdEnums = new ArrayList<PropertyDefinitionEnumeration>(4);
  pdEnums.add(pcEnum);
  pdEnums.add(rcEnum);
  pdEnums.add(mtEnum);
  pdEnums.add(fsEnum);
  pd.setEnumeratedValues(pdEnums, false);
  return pd;
}
origin: org.rhq/rhq-core-domain

public void addEnumeratedValues(PropertyDefinitionEnumeration... enumerations) {
  if (this.enumeratedValues == null) {
    this.enumeratedValues = new ArrayList<PropertyDefinitionEnumeration>(1);
  }
  for (PropertyDefinitionEnumeration enumeration : enumerations) {
    enumeration.setPropertyDefinitionSimple(this);
    getEnumeratedValues().add(enumeration);
  }
  ensureOrdering();
}
origin: org.rhq/rhq-enterprise-server

if (nPde.equals(pde)) {
  pde.setValue(nPde.getValue());
  pde.setName(nPde.getName());
origin: org.rhq/rhq-enterprise-server

private void processPropertyOptionsSource(Resource resource, Resource baseResource, PropertyDefinitionSimple pds,
  PropertyOptionsSource.TargetType tt, String expression, Pattern filterPattern, Resource foundResource) {
  if (tt == PropertyOptionsSource.TargetType.RESOURCE) {
    String name = foundResource.getName();
    // filter if the user provided a filter
    if (filterPattern != null) {
      Matcher m = filterPattern.matcher(name);
      if (m.matches()) {
        PropertyDefinitionEnumeration pde = new PropertyDefinitionEnumeration(name, "" + name);
        pds.getEnumeratedValues().add(pde);
      }
    } else { // Filter is null -> none provided -> do not filter
      PropertyDefinitionEnumeration pde = new PropertyDefinitionEnumeration(name, "" + name);
      pds.getEnumeratedValues().add(pde);
    }
  } else if (tt == PropertyOptionsSource.TargetType.CONFIGURATION) {
    //  for configuration we need to drill down into the resource configuration
    if (!handleConfigurationTarget(resource, baseResource, pds, expression, foundResource))
      return;
  }
}
origin: org.rhq/rhq-core-gui

private static UIInput createInputForEnumProperty(PropertyDefinitionSimple propertyDefinitionSimple) {
  UISelectOne selectOne;
  if (propertyDefinitionSimple.getEnumeratedValues().size() >= LISTBOX_THRESHOLD_ENUM_SIZE) {
    // Use a drop down menu for larger enums...
    HtmlSelectOneMenu menu = FacesComponentUtility.createComponent(HtmlSelectOneMenu.class, null);
    // TODO: Use CSS to set the width of the menu.
    selectOne = menu;
  } else {
    // ...and a radio for smaller ones.
    HtmlSelectOneRadio radio = FacesComponentUtility.createComponent(HtmlSelectOneRadio.class, null);
    radio.setLayout("pageDirection");
    // TODO: We may want to use CSS to get less space between the radio buttons
    //      (see http://jira.jboss.com/jira/browse/JBMANCON-21).
    selectOne = radio;
  }
  List<PropertyDefinitionEnumeration> options = propertyDefinitionSimple.getEnumeratedValues();
  for (PropertyDefinitionEnumeration option : options) {
    UISelectItem selectItem = FacesComponentUtility.createComponent(UISelectItem.class, null);
    selectItem.setItemLabel(option.getName());
    selectItem.setItemValue(option.getValue());
    selectOne.getChildren().add(selectItem);
  }
  return selectOne;
}
origin: org.rhq/rhq-core-domain

private void ensureOrdering() {
  if (null == this.enumeratedValues) {
    return;
  }
  for (int i = 0, size = getEnumeratedValues().size(); (i < size); ++i) {
    getEnumeratedValues().get(i).setOrderIndex(i);
  }
}
origin: org.rhq/rhq-enterprise-server

String name = ps.getStringValue();
if (name != null) {
  PropertyDefinitionEnumeration pde = new PropertyDefinitionEnumeration(name, name);
  pds.getEnumeratedValues().add(pde);
String name = propertySimple.getStringValue();
if (name != null) {
  PropertyDefinitionEnumeration pde = new PropertyDefinitionEnumeration(name, name);
  pds.getEnumeratedValues().add(pde);
origin: org.rhq/rhq-core-domain

pd.setConfigurationDefinition(configDef);
PropertyDefinitionEnumeration normalEnum = new PropertyDefinitionEnumeration(DriftHandlingMode.normal.name(),
  DriftHandlingMode.normal.name());
normalEnum.setOrderIndex(0);
PropertyDefinitionEnumeration plannedEnum = new PropertyDefinitionEnumeration(DriftHandlingMode.plannedChanges
  .name(), DriftHandlingMode.plannedChanges.name());
plannedEnum.setOrderIndex(1);
origin: org.rhq/rhq-core-client-api

private static List<PropertyDefinitionEnumeration> parsePropertyOptions(PropertyDefinitionSimple parentProperty,
  PropertyOptions options) {
  List<PropertyDefinitionEnumeration> results = new ArrayList<PropertyDefinitionEnumeration>();
  for (Option option : options.getOption()) {
    String name = option.getName();
    if (name == null) {
      name = option.getValue();
    }
    PropertyDefinitionEnumeration enumeration = new PropertyDefinitionEnumeration(name, option.getValue());
    parentProperty.addEnumeratedValues(enumeration);
  }
  parentProperty.setAllowCustomEnumeratedValue(options.isAllowCustomValue());
  return results;
}
org.rhq.core.domain.configuration.definitionPropertyDefinitionEnumeration

Most used methods

  • <init>
  • getName
  • getValue
  • equals
  • setName
  • setOrderIndex
  • setPropertyDefinitionSimple
  • setValue

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • JOptionPane (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now