com.quartercode.quarterbukkit.util
Class QuarterBukkitUpdater

java.lang.Object
  extended by com.quartercode.quarterbukkit.api.Updater
      extended by com.quartercode.quarterbukkit.util.QuarterBukkitUpdater

public class QuarterBukkitUpdater
extends Updater

This class is for checking the QuarterBukkit-version and updating the plugin.


Field Summary
 
Fields inherited from class com.quartercode.quarterbukkit.api.Updater
plugin, slug, updatePlugin
 
Constructor Summary
QuarterBukkitUpdater(org.bukkit.plugin.Plugin plugin)
          Creates a new QuarterBukkit updater.
 
Method Summary
protected  boolean doInstall(java.io.File downloadedFile, org.bukkit.command.CommandSender causer)
          Does some post-installation-activities, like extracting zips or relaoding the plugin.
protected  java.lang.String parseVersion(java.lang.String title)
          Parses the version out of the BukkitDev-upload-title.
 
Methods inherited from class com.quartercode.quarterbukkit.api.Updater
equals, extract, getLatestVersion, getLatestVersion, getPlugin, getUpdatePlugin, hashCode, isNewVersionAvaiable, isNewVersionAvaiable, toString, tryInstall, tryInstall
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuarterBukkitUpdater

public QuarterBukkitUpdater(org.bukkit.plugin.Plugin plugin)
Creates a new QuarterBukkit updater.

Parameters:
plugin - The QuarterBukkit-Plugin.
Method Detail

parseVersion

protected java.lang.String parseVersion(java.lang.String title)
Description copied from class: Updater
Parses the version out of the BukkitDev-upload-title.

Specified by:
parseVersion in class Updater
Parameters:
title - The BukkitDev-upload-title.
Returns:
The parsed version.

doInstall

protected boolean doInstall(java.io.File downloadedFile,
                            org.bukkit.command.CommandSender causer)
                     throws java.io.IOException
Description copied from class: Updater
Does some post-installation-activities, like extracting zips or relaoding the plugin.

Specified by:
doInstall in class Updater
Parameters:
downloadedFile - The downloaded file from BukkitDev.
causer - The executor of the action.
Returns:
If the post-installation-activity was successful.
Throws:
java.io.IOException - If something goes wrong with the post-installation-activities.