コード例 #1
0
  private static PropertyDefinitionSimple createBasedirValueName(boolean readOnly) {
    String name = PROP_BASEDIR_VALUENAME;
    String description = "The name of the value as found in the context.";
    boolean required = true;
    PropertySimpleType type = PropertySimpleType.STRING;

    PropertyDefinitionSimple pd = new PropertyDefinitionSimple(name, description, required, type);
    pd.setDisplayName("Value Name");
    pd.setReadOnly(readOnly);
    pd.setSummary(true);
    pd.setOrder(1);
    pd.setAllowCustomEnumeratedValue(false);

    RegexConstraint constraint = new RegexConstraint();
    constraint.setDetails(PROP_BASEDIR_PATH_REGEX_PATTERN);
    pd.addConstraints(constraint);

    return pd;
  }
コード例 #2
0
  private static PropertyDefinitionSimple createIncludePattern(boolean readOnly) {
    String name = PROP_PATTERN;
    String description =
        "Pathname pattern that must match for the items in the directory path to be included. '*' matches zero or more characters, '?' matches one character. For example, '*.txt' (no quotes) will match text files in the filter's path directory.  '**/*.txt' will match text files in any subdirectory below the filter's path directory.";
    boolean required = false;
    PropertySimpleType type = PropertySimpleType.STRING;

    PropertyDefinitionSimple pd = new PropertyDefinitionSimple(name, description, required, type);
    pd.setDisplayName("Pattern");
    pd.setReadOnly(readOnly);
    pd.setSummary(true);
    pd.setOrder(1);
    pd.setAllowCustomEnumeratedValue(false);

    RegexConstraint constraint = new RegexConstraint();
    constraint.setDetails(PROP_FILTER_PATTERN_REGEX_PATTERN);
    pd.addConstraints(constraint);

    return pd;
  }
コード例 #3
0
  private static PropertyDefinitionSimple createIncludePath(boolean readOnly) {
    String name = PROP_PATH;
    String description =
        "A file system directory path that is relative to (a sub-directory of) the base directory of the drift definition. The default is '.', the base directory itself.  Note that '/' and './' will be normalized to '.' for consistent handling.";
    boolean required = false;
    PropertySimpleType type = PropertySimpleType.STRING;

    PropertyDefinitionSimple pd = new PropertyDefinitionSimple(name, description, required, type);
    pd.setDisplayName("Path");
    pd.setReadOnly(readOnly);
    pd.setSummary(true);
    pd.setOrder(0);
    pd.setAllowCustomEnumeratedValue(false);
    pd.setDefaultValue(".");

    RegexConstraint constraint = new RegexConstraint();
    constraint.setDetails(PROP_FILTER_PATH_REGEX_PATTERN);
    pd.addConstraints(constraint);

    return pd;
  }
コード例 #4
0
  private static PropertyDefinitionSimple createName(
      ConfigurationDefinition configDef, boolean readOnly) {
    String name = PROP_NAME;
    String description = "The drift detection definition name";
    boolean required = true;
    PropertySimpleType type = PropertySimpleType.STRING;

    PropertyDefinitionSimple pd = new PropertyDefinitionSimple(name, description, required, type);
    pd.setDisplayName("Drift Definition Name");
    pd.setReadOnly(readOnly);
    pd.setSummary(true);
    pd.setOrder(0);
    pd.setAllowCustomEnumeratedValue(false);
    pd.setConfigurationDefinition(configDef);

    RegexConstraint constraint = new RegexConstraint();
    constraint.setDetails(PROP_NAME_REGEX_PATTERN);
    pd.addConstraints(constraint);

    return pd;
  }