congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
PluginProperty.getValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getValue
method
in
org.jtalks.jcommune.model.entity.PluginProperty

Best Java code snippets using org.jtalks.jcommune.model.entity.PluginProperty.getValue (Showing top 4 results out of 315)

origin: jtalks-org/jcommune

/**
 * {@inheritDoc}
 */
@Override
protected Map<PluginProperty, String> applyConfiguration(List<PluginProperty> properties)
    throws PluginConfigurationException {
  if (properties.size() == 1 && ORDER_PROPERTY.equalsIgnoreCase(properties.get(0).getName())) {
    order = properties.get(0).getValue() == null ? DEFAULT_ORDER_VALUE
        : Integer.parseInt(properties.get(0).getValue());
    properties.get(0).setHint(ORDER_HINT);
    return new HashMap<>();
  } else {
    throw new PluginConfigurationException(
        "Can't apply configuration: incorrect parameters count or order not found");
  }
}
origin: jtalks-org/jcommune

switch (property.getName()) {
  case WIDTH_PROPERTY:
    width = Integer.valueOf(property.getValue());
    break;
  case HEIGHT_PROPERTY:
    height = Integer.valueOf(property.getValue());
    break;
  case LENGTH_PROPERTY:
    length = Integer.valueOf(property.getValue());
    break;
  case POSSIBLE_SYMBOLS_PROPERTY:
    possibleSymbols = property.getValue();
    break;
LOGGER.error(property.getValue() + " is not valid value for property " + property.getName(), ex);
origin: jtalks-org/jcommune

@Override
protected Map<PluginProperty, String> applyConfiguration(List<PluginProperty> properties)
    throws PluginConfigurationException {
  String url = null;
  String login = null;
  String password = null;
  for (PluginProperty property : properties) {
    if (URL_PROPERTY.equalsIgnoreCase(property.getName())) {
      url = property.getValue() == null ? null : property.getValue().trim();
    } else if (LOGIN_PROPERTY.equalsIgnoreCase(property.getName())) {
      login = property.getValue() == null ? null : property.getValue().trim();
    } else if (PASSWORD_PROPERTY.equalsIgnoreCase(property.getName())) {
      password = property.getValue();
    }
  }
  if (url == null || url.isEmpty()) {
    // this should be returned as a map, but this mechanism should be implemented in the plugin API first
    throw new PluginConfigurationException("Can't apply configuration: Url should not be null.");
  } else if (!validateUrl(url)) {
    throw new PluginConfigurationException("Can't apply configuration: Incorrect format for Url value.");
  }
  service = new PoulpeAuthService(url, login, password);
  pluginProperties = properties;
  return new HashMap<>();
}
origin: jtalks-org/jcommune

  /**
   * {@inheritDoc}
   */
  @Override
  public void updateProperties(List<PluginProperty> properties) {

    for (PluginProperty property: properties) {
      PluginProperty persistedProperty = (PluginProperty) session().load(property.getClass(), property.getId());
      persistedProperty.setValue(property.getValue());
      session().saveOrUpdate(persistedProperty);
    }

    session().flush();
  }
}
org.jtalks.jcommune.model.entityPluginPropertygetValue

Popular methods of PluginProperty

  • <init>
  • getName
  • setPluginConfiguration
  • getHint
  • getId
  • setHint
  • setValue

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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