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

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

Best Java code snippets using org.jtalks.jcommune.model.entity.PluginProperty.getName (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

@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

for (PluginProperty property : properties) {
  try {
    switch (property.getName()) {
      case WIDTH_PROPERTY:
        width = Integer.valueOf(property.getValue());
    LOGGER.error(property.getValue() + " is not valid value for property " + property.getName(), ex);
origin: jtalks-org/jcommune

/**
 * Translate labels for specified plugin into language which selected by current user as forum language.
 *
 * @param properties list of properties to translate
 * @param plugin plugin with have specified properties
 *
 * @return map of properties translation depending from name
 */
private Map<String, String> translatePropertiesLabels(List<PluginProperty> properties, Plugin plugin) {
  Map<String, String> labels = new HashMap<>();
  Locale locale = userService.getCurrentUser().getLanguage().getLocale();
  for (PluginProperty property : properties) {
    String translation = plugin.translateLabel(property.getName(), locale);
    labels.put(property.getName(), translation);
    if (property.getHint() != null) {
      String hintTranslation = plugin.translateLabel(property.getHint(), locale);
      labels.put(property.getHint(), hintTranslation);
    }
  }
  return labels;
}
org.jtalks.jcommune.model.entityPluginPropertygetName

Popular methods of PluginProperty

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

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Top PhpStorm plugins
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