Tabnine Logo
PropertyDescriptor.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
com.hurence.logisland.component.PropertyDescriptor

Best Java code snippets using com.hurence.logisland.component.PropertyDescriptor.getName (Showing top 20 results out of 315)

origin: com.hurence.logisland/logisland-api

@Override
public int compareTo(final PropertyDescriptor o) {
  if (o == null) {
    return -1;
  }
  return getName().compareTo(o.getName());
}
origin: com.hurence.logisland/logisland-api

@Override
public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {
  logger.info("property {} value changed from {} to {}", descriptor.getName(), oldValue, newValue);
}
origin: com.hurence.logisland/logisland-api

/**
 * Hook method allowing subclasses to eagerly react to a configuration
 * change for the given property descriptor. As an alternative to using this
 * method a processor may simply getField the latest value whenever it needs it
 * and if necessary lazily evaluate it.
 *
 * @param descriptor of the modified property
 * @param oldValue   non-null property value (previous)
 * @param newValue   the new property value or if null indicates the property
 *                   was removed
 */
@Override
public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {
  logger.info("property {} value changed from {} to {}", descriptor.getName(), oldValue, newValue);
}
origin: com.hurence.logisland/logisland-web-analytics-plugin

  @Override
  public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {

    logger.debug("property {} value changed from {} to {}", descriptor.getName(), oldValue, newValue);
    
    /**
     * Handle the debug property
     */
    if (descriptor.getName().equals(KEY_DEBUG))
    {
     if (newValue != null)
     {
       if (newValue.equalsIgnoreCase("true"))
       {
         debug = true;
       }
     } else
     {
       debug = false;
     }
    }
  }   
}
origin: com.hurence.logisland/logisland-consolidate-session-plugin

  @Override
  public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {

    logger.debug("property {} value changed from {} to {}", descriptor.getName(), oldValue, newValue);
    
    /**
     * Handle the debug property
     */
    if (descriptor.getName().equals(KEY_DEBUG))
    {
     if (newValue != null)
     {
       if (newValue.equalsIgnoreCase("true"))
       {
         debug = true;
       }
     } else
     {
       debug = false;
     }
    }
  }   
}
origin: com.hurence.logisland/logisland-cyber-security-plugin

  @Override
  public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {

    logger.debug("property {} value changed from {} to {}", descriptor.getName(), oldValue, newValue);

    /**
     * Handle the debug property
     */
    if (descriptor.getName().equals(KEY_DEBUG))
    {
      if (newValue != null)
      {
        if (newValue.equalsIgnoreCase("true"))
        {
          debug = true;
        }
      } else
      {
        debug = false;
      }
    }
  }
}
origin: com.hurence.logisland/logisland-cyber-security-plugin

@Override
public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {
  logger.debug("property {} value changed from {} to {}", descriptor.getName(), oldValue, newValue);
  
  /**
   * Handle the debug property
   */
  if (descriptor.getName().equals(KEY_DEBUG))
  {
   if (newValue != null)
   {
     if (newValue.equalsIgnoreCase("true"))
     {
       debug = true;
     }
   } else
   {
     debug = false;
   }
  }
}
origin: com.hurence.logisland/logisland-cyber-security-plugin

  @Override
  public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {

    logger.debug("property {} value changed from {} to {}", descriptor.getName(), oldValue, newValue);
    
    /**
     * Handle the debug property
     */
    if (descriptor.getName().equals(KEY_DEBUG))
    {
     if (newValue != null)
     {
       if (newValue.equalsIgnoreCase("true"))
       {
         debug = true;
       }
     } else
     {
       debug = false;
     }
    }
  }   
}
origin: com.hurence.logisland/logisland-api

@Override
public PropertyValue getPropertyValue(final PropertyDescriptor descriptor) {
  return getPropertyValue(descriptor.getName());
}
origin: com.hurence.logisland/logisland-api

public StandardValidationContext(final Map<PropertyDescriptor, String> properties) {
  this.properties = new HashMap<>(properties);
  expressionLanguageSupported = new HashMap<>(properties.size());
  for (final PropertyDescriptor descriptor : properties.keySet()) {
    expressionLanguageSupported.put(descriptor.getName(), descriptor.isExpressionLanguageSupported());
  }
}
origin: com.hurence.logisland/logisland-api

@Override
public PropertyValue getPropertyValue(final PropertyDescriptor descriptor) {
  return getPropertyValue(descriptor.getName());
}
origin: com.hurence.logisland/logisland-api

@Override
public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {
  logger.debug("property {} value changed from {} to {}", new Object[]{descriptor.getName(), oldValue, newValue});
}
origin: com.hurence.logisland/logisland-api

@Override
public PropertyValue getPropertyValue(final PropertyDescriptor descriptor) {
  return getPropertyValue(descriptor.getName());
}
origin: com.hurence.logisland/logisland-api

@Override
public PropertyValue getPropertyValue(final PropertyDescriptor descriptor) {
  return getPropertyValue(descriptor.getName());
}
origin: com.hurence.logisland/logisland-common-processors-plugin

  private Map<String, String> getFieldsNameMapping(ProcessContext context) {
    /**
     * list alternative regex
     */
    Map<String, String> fieldsNameMappings = new HashMap<>();
    // loop over dynamic properties to add alternative regex
    for (final Map.Entry<PropertyDescriptor, String> entry : context.getProperties().entrySet()) {
      if (!entry.getKey().isDynamic()) {
        continue;
      }

      final String fieldName = entry.getKey().getName();
      final String mapping = entry.getValue();

      fieldsNameMappings.put(fieldName, mapping);
    }
    return fieldsNameMappings;
  }
}
origin: com.hurence.logisland/logisland-common-processors-plugin

private Map<String, String[]> getFieldsNameMapping(ProcessContext context) {
  /**
   * list alternative regex
   */
  Map<String, String[]> fieldsNameMappings = new HashMap<>();
  // loop over dynamic properties to add alternative regex
  for (final Map.Entry<PropertyDescriptor, String> entry : context.getProperties().entrySet()) {
    if (!entry.getKey().isDynamic()) {
      continue;
    }
    final String fieldName = entry.getKey().getName();
    final String[] mapping = entry.getValue().split(",");
    fieldsNameMappings.put(fieldName, mapping);
  }
  return fieldsNameMappings;
}
origin: com.hurence.logisland/logisland-common-processors-plugin

@Override
protected void setupDynamicProperties(ProcessContext context) {
  for (final Map.Entry<PropertyDescriptor, String> entry : context.getProperties().entrySet()) {
    if (!entry.getKey().isDynamic()) {
      continue;
    }
    String key = entry.getKey().getName();
    String value = entry.getValue()
        .replaceAll("cache\\((\\S*\\))", "cache.get(\"test\", new com.hurence.logisland.record.StandardRecord().setId($1)")
        .replaceAll("\\.value", ".getField(com.hurence.logisland.record.FieldDictionary.RECORD_VALUE).asDouble()");
    StringBuilder sb = new StringBuilder();
    sb.append("var match=false;\n")
        .append("try {\n")
        .append("if( ")
        .append(value)
        .append(" ) { match=true; }\n")
        .append("} catch(error) {}");
    dynamicTagValuesMap.put(entry.getKey().getName(), sb.toString());
    //   System.out.println(sb.toString());
    //  logger.debug(sb.toString());
  }
  defaultCollection = context.getPropertyValue(DATASTORE_CACHE_COLLECTION).asString();
  recordTTL = context.getPropertyValue(RECORD_TTL).asInteger();
}
origin: com.hurence.logisland/logisland-scripting-plugin

@Override
public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {
  logger.info("property {} value changed from {} to {}", descriptor.getName(), oldValue, newValue);
  
  /**
   * In java, onPropertyModified for config properties is called before the init method is called so before our
   * init method is called our python interpreter is not initialized and we cannot call it before
   */
  if (initDone)
  {
    if (useScriptFile)
    {
      /**
       * pyProcessor.onPropertyModified(context, oldValue, newValue)
       */
      pythonInterpreter.set("descriptor", descriptor);
      pythonInterpreter.set("oldValue", oldValue);
      pythonInterpreter.set("newValue", newValue);
      pythonInterpreter.exec("pyProcessor.onPropertyModified(context, oldValue, newValue)");
    } else
    {
      // TODO
      logger.warn("Dynamic update of configuration properties is not supported when not using python"
          + " script file");
    }
  }
}

origin: com.hurence.logisland/logisland-common-processors-plugin

@Override
protected Collection<ValidationResult> customValidate(ValidationContext context) {
  final List<ValidationResult> validationResults = new ArrayList<>(super.customValidate(context));
  if (context.getPropertyValue(STRATEGY).isSet()) {
    if (context.getPropertyValue(STRATEGY).getRawValue().equals(JAVA_FORMAT_STRING_WITH_FIELDS_STRATEGY.getValue())) {
      if (!context.getPropertyValue(JAVA_FORMAT_STRING).isSet()) {
        validationResults.add(
            new ValidationResult.Builder()
                .input(JAVA_FORMAT_STRING.getName())
                .explanation(String.format("%s must be set when strategy is %s",
                    JAVA_FORMAT_STRING.getName(),
                    context.getPropertyValue(STRATEGY).getRawValue()))
                .valid(false)
                .build());
      }
    }
  }
  return validationResults;
}
origin: com.hurence.logisland/logisland-api

private PropertyDescriptor getPropertyDescriptor(final PropertyDescriptor specDescriptor) {
  PropertyDescriptor descriptor = null;
  //check if property supported
  final List<PropertyDescriptor> supportedDescriptors = getSupportedPropertyDescriptors();
  if (supportedDescriptors != null) {
    for (final PropertyDescriptor desc : supportedDescriptors) { //find actual descriptor
      if (specDescriptor.equals(desc)) {
        return desc;
      }
    }
  }
  descriptor = getSupportedDynamicPropertyDescriptor(specDescriptor.getName());
  if (descriptor != null && !descriptor.isDynamic()) {
    descriptor = new PropertyDescriptor.Builder().fromPropertyDescriptor(descriptor).dynamic(true).build();
  }
  if (descriptor == null) {
    descriptor = new PropertyDescriptor.Builder().fromPropertyDescriptor(specDescriptor).addValidator(Validator.INVALID).dynamic(true).build();
  }
  return descriptor;
}
com.hurence.logisland.componentPropertyDescriptorgetName

Popular methods of PropertyDescriptor

  • isDynamic
  • getDisplayName
  • equals
  • getDefaultValue
  • isExpressionLanguageSupported
  • isRequired
  • <init>
  • getAllowableValues
  • getControllerServiceDefinition
  • getDescription
  • isSensitive
  • validate
    Validates the given input against this property descriptor's validator. If this descriptor has a set
  • isSensitive,
  • validate

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
  • startActivity (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Permission (java.security)
    Legacy security code; do not use.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now