Changeset 3960


Ignore:
Timestamp:
Nov 13, 2007, 8:25:01 PM (16 years ago)
Author:
Nicklas Nordborg
Message:

References #807

Added documentation for plug-in developers.

Location:
trunk/src
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/Application.java

    r3857 r3960  
    192192 
    193193  /**
     194    Get the maintenance version.
     195  */
     196  public static String getMaintenanceVersion()
     197  {
     198    return Version.getMaintenance();
     199  }
     200 
     201  /**
     202    Get the build number.
     203  */
     204  public static int getBuild()
     205  {
     206    return Version.getBuild();
     207  }
     208
     209  /**
    194210    Get the BASE version string. It is created by combining
    195211    the major, minor, maintenance, build and schema versions.
    196   */
    197   public static String getMaintenanceVersion()
    198   {
    199     return Version.getMaintenance();
    200   }
    201  
    202   /**
    203     Get the build number.
    204   */
    205   public static int getBuild()
    206   {
    207     return Version.getBuild();
    208   }
    209 
    210   /**
    211     Get the BASE version string
    212212  */
    213213  public static String getVersionString()
  • trunk/src/info/net/sf/basedb/info/package.html

    r3952 r3960  
    4646  have access to the BASE core code.
    4747</p>
     48<p>
     49  NOTE! IT IS VERY IMPORTANT THAT THE CLASSES IN THIS PACKAGE ARE INDEPENDENT
     50  OF ALL OTHER PACKAGES IN BASE. IT IS FORBIDDEN TO IMPORT FROM net.sf.basedb.core
     51  AND ALL OTHER net.sf.basedb.* PACKAGES.
     52</p>
    4853
    4954</body>
  • trunk/src/webservices/client/java/net/sf/basedb/ws/client/SessionClient.java

    r3959 r3960  
    2323*/
    2424package net.sf.basedb.ws.client;
     25
     26import net.sf.basedb.info.VersionInfo;
    2527
    2628import org.apache.axis2.AxisFault;
     
    130132  }
    131133 
    132   /**   
    133       @return schema version as an int
     134 
     135  /**
     136      @return A {@link VersionInfo} object
    134137      @throws AxisFault
    135    */
    136   public int getSchemaVersion()
     138  */
     139  public VersionInfo getVersion()
    137140    throws AxisFault
    138141  {
    139     return invokeBlocking("getSchemaVersion", Integer.class);
    140   }
    141  
    142   /**
    143       @return An string array with length of 4
    144       @throws AxisFault
    145    */
    146   public String[] getVersion()
    147     throws AxisFault
    148   {
    149     return invokeBlocking("getVersion", String[].class);
     142    return invokeBlocking("getVersion", VersionInfo.class);
    150143  }
    151144}
  • trunk/src/webservices/server/net/sf/basedb/ws/server/SessionService.java

    r3959 r3960  
    2626import net.sf.basedb.core.Application;
    2727import net.sf.basedb.core.SessionControl;
    28 import net.sf.basedb.core.Version;
     28import net.sf.basedb.info.VersionInfo;
    2929
    3030/**
     
    110110 
    111111  /**
    112     Gets the current schema version of the database
    113     on the Base server.
    114       @return SchemaVersion as an integer.
     112    Return information about which Base version is in use.
     113
     114      @return A {@link VersionInfo} object
    115115   */
    116   public int getSchemaVersion()
     116  public VersionInfo getVersion()
    117117  {
    118     return Application.getSchemaVersion();
    119   }
    120  
    121   /**
    122     Return information about which Base version is in use.
    123     The returned array has 4 strings,
    124     <ol>
    125       <li>Major version.</li>
    126       <li>Minor version.</li>
    127       <li>MaintenanceVersion.</li>
    128       <li>Build number</li>
    129     </ol>
    130       @return An array with version information.
    131    */
    132   public String[] getVersion()
    133   {
    134     String[] version = new String[4];
    135     version[0] = Application.getMajorVersion();
    136     version[1] = Application.getMinorVersion();
    137     version[2] = Application.getMaintenanceVersion();
    138     version[3] = Integer.toString(Application.getBuild());
    139     return version;
     118    VersionInfo info = new VersionInfo();
     119    info.setMajor(Application.getMajorVersion());
     120    info.setMinor(Application.getMinorVersion());
     121    info.setMaintenance(Application.getMaintenanceVersion());
     122    info.setBuild(Application.getBuild());
     123    info.setSchema(Application.getSchemaVersion());
     124    return info;
    140125  }
    141126}
Note: See TracChangeset for help on using the changeset viewer.