Changeset 6656


Ignore:
Timestamp:
Dec 9, 2014, 1:12:18 PM (8 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1810: Remove JDOM 1.1

Location:
trunk
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/.classpath

    r6478 r6656  
    2626  <classpathentry kind="lib" path="lib/dist/postgresql-9.3-1101.jdbc41.jar"/>
    2727  <classpathentry kind="lib" path="lib/dist/jdom-2.0.5.jar"/>
    28   <classpathentry kind="lib" path="lib/dist/jdom-1.1.3.jar"/>
    2928  <classpathentry kind="lib" path="lib/dist/jcommon-1.0.21.jar"/>
    3029  <classpathentry kind="lib" path="lib/dist/jfreechart-1.0.17.jar"/>
  • trunk/doc/3rd-party-components.txt

    r6478 r6656  
    7979
    8080More info : http://www.jdom.org/
    81 Version   : 2.0.5 and 1.1.3 (deprecated)
     81Version   : 2.0.5
    8282License   : Apache-style open source license (jdom.license.txt)
    83 Jar files : jdom-2.0.5.jar, jdom-1.1.3.jar, jaxen-1.1.6.jar
     83Jar files : jdom-2.0.5.jar, jaxen-1.1.6.jar
    8484
    8585
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/tab/TabControl.java

    r6653 r6656  
    275275  }
    276276
    277   @SuppressWarnings("deprecation")
    278277  void addTab(TabAction tab)
    279278  {
  • trunk/src/core/net/sf/basedb/core/PluginConfiguration.java

    r6473 r6656  
    176176  }
    177177
    178   /**
    179     Load a configurations xml file from the given stream.
    180     @param in The input stream to read from
    181     @param fileName The name of the originating file (optional)
    182     @return A list with all &lt;configuration&gt; elements in the file
    183     @since 3.0
    184     @deprecated In 3.4, use {@link #loadXmlFile2(InputStream, String)} instead
    185   */
    186   @SuppressWarnings("unchecked")
    187   @Deprecated
    188   public static List<org.jdom.Element> loadXmlFile(InputStream in, String fileName)
    189     throws IOException, org.jdom.JDOMException
    190   {
    191     URL dtdURL = PluginConfiguration.class.getResource("/net/sf/basedb/core/dtd/plugin-configuration-file.dtd");
    192     org.jdom.Document doc = net.sf.basedb.util.XMLUtil.getValidatedXML(in, dtdURL, fileName);
    193     org.jdom.Element rootElement = doc.getRootElement();
    194     return (List<org.jdom.Element>)rootElement.getChildren();
    195   }
    196  
    197178  /**
    198179    Load a configurations xml file from the given stream.
     
    723704      @param parameters A list of the parameters that shall be set to the configuration
    724705      @throws ClassNotFoundException If there is an error while trying to find the type of the parameters.
    725       @since 3.0
    726       @deprecated In 3.4, use {@link #setParameterValues2} instead
    727   */
    728   @SuppressWarnings("unchecked")
    729   @Deprecated
    730   public void setParameterValues(List<org.jdom.Element> parameters)
    731     throws ClassNotFoundException
    732   {
    733     checkPermission(Permission.WRITE);
    734     // Set each configuration parameter for the plugin.
    735     for (org.jdom.Element parameter : parameters)
    736     {
    737       String name = parameter.getChildText("name");               
    738       String cl = parameter.getChildText("class");
    739       String label = parameter.getChildText("label");
    740       if (label == null || label.length() == 0) label = name;   
    741       String description = parameter.getChildText("description");
    742       Class clazz = null;
    743       List values = null;
    744      
    745       if (cl.length() > 0)
    746       {
    747         clazz = Class.forName(cl);
    748         values = getValueList(parameter, clazz);
    749         ParameterType pType = getParameterType(clazz, values);
    750         setParameterValues(name,label, description, pType, values);
    751       }
    752     }
    753   }
    754  
    755   /**
    756     Sets parameters for a PluginConfiguration from the elements in a xml
    757     configurations file.
    758    
    759       @param parameters A list of the parameters that shall be set to the configuration
    760       @throws ClassNotFoundException If there is an error while trying to find the type of the parameters.
    761706      @since 3.4
    762707  */
     
    791736      Gets the list of values for a parameter from the XML-file.
    792737      Returns a list with parameter values.
    793   */ 
    794   @SuppressWarnings("unchecked")
    795   @Deprecated
    796   private <T> List<T> getValueList(org.jdom.Element parameter, Class<T> classType)
    797   {
    798     List<org.jdom.Element> children = (List<org.jdom.Element>)parameter.getChildren("value");
    799     List<T> values = new ArrayList<T>();
    800     for (org.jdom.Element ch : children)
    801     {
    802       String text = ch.getText();
    803       if (classType.equals(Boolean.class)) values.add((T)Boolean.valueOf(text));
    804       else if (classType.equals(Date.class)) values.add((T)DateUtil.parseString(text));
    805       else if (classType.equals(Double.class)) values.add((T)Double.valueOf(text));
    806       else if (classType.equals(Float.class)) values.add((T)Float.valueOf(text));
    807       else if (classType.equals(Long.class)) values.add((T)Long.valueOf(text));
    808       else if (classType.equals(String.class)) values.add((T)text);
    809     }
    810     return values;
    811   }
    812  
    813   /**
    814       Gets the list of values for a parameter from the XML-file.
    815       Returns a list with parameter values.
    816738  */
    817739  @SuppressWarnings("unchecked")
Note: See TracChangeset for help on using the changeset viewer.