Package com.dotmarketing.plugin.model

Examples of com.dotmarketing.plugin.model.PluginProperty


  }

  @Override
  protected PluginProperty getProperty(String pluginId, String propertyKey) {
    String key = propertyGroup + pluginId + ":" + propertyKey;
    PluginProperty value = null;
      try{
        value = (PluginProperty)cache.get(key,propertyGroup);
      }catch (DotCacheException e) {
      Logger.debug(this, "Cache Entry not found", e);
    }
View Full Code Here


  /* (non-Javadoc)
   * @see com.dotmarketing.plugin.business.PluginFactory#loadProperty(java.lang.String, java.lang.String)
   */
  @Override
  protected PluginProperty loadProperty(String pluginId, String key) throws DotDataException {
    PluginProperty pluginProp = cache.getProperty(pluginId, key);
    if(pluginProp != null){
      return pluginProp;
    }
    HibernateUtil hu = new HibernateUtil(PluginProperty.class);
    hu.setQuery("from PluginProperty where plugin_id = ? and propkey = ?");
    hu.setParam(pluginId);
    hu.setParam(key);
    pluginProp = (PluginProperty)hu.load();
    if(pluginProp != null && UtilMethods.isSet(pluginProp.getPluginId())){
      cache.addProperty(pluginProp);
    }
    return pluginProp;
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.dotmarketing.plugin.business.PluginAPI#loadProperty(java.lang.String, java.lang.String)
   */
  public String loadProperty(String pluginId, String keythrows DotDataException {
    PluginProperty pp = pluginFac.loadProperty(pluginId, key);
    if(pp!= null){
      return pp.getCurrentValue();
    }else{
      return "";
    }
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.dotmarketing.plugin.business.PluginAPI#saveProperty(java.lang.String, java.lang.String, java.lang.String)
   */
  public void saveProperty(String pluginId, String key, String valuethrows DotDataException {
    PluginProperty pp = pluginFac.loadProperty(pluginId, key);
    if(pp != null && UtilMethods.isSet(pp.getPluginId())){
      pp.setOriginalValue(pp.getCurrentValue());
      pp.setCurrentValue(value);
    }else{
      pp = new PluginProperty();
      pp.setPropkey(key);
      pp.setPluginId(pluginId);
      pp.setOriginalValue(value);
      pp.setCurrentValue(value);
    }
    pluginFac.saveProperty(pp);
  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.plugin.model.PluginProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.