it.eng.spagobi.plugins.ireport
Class Plugin

java.lang.Object
  extended byit.businesslogic.ireport.plugin.IReportPlugin
      extended byit.eng.spagobi.plugins.ireport.Plugin

public class Plugin
extends it.businesslogic.ireport.plugin.IReportPlugin


Field Summary
static java.awt.Dimension buttonsDimensions
           
static int margin
           
 
Constructor Summary
Plugin()
          This constructor gets System.getProperty("user.home") to set the default configuration folder.
 
Method Summary
 void call()
          This method is called every time the plugin is selected from the iReport Plugin menu First, it sets the LookAndFeel.
 void checkUser()
          This method checks if there is already a user logged by reading the UserProfile information If no users are available it opens the Login Frame Otherwise it show the hidden Tree Frame
 void configure()
          This method is called when the plugin configuration button on plugin list is selected.
static Plugin getMainInstance()
          Return the main instance of the Plugin.
static void main(java.lang.String[] args)
           
 boolean updateConfiguration(java.lang.String serverLocationTemp, java.lang.String tempFolderTemp)
          This method updates the local fields serverLocation and tempFolder getting the new values as input parameters.
 
Methods inherited from class it.businesslogic.ireport.plugin.IReportPlugin
getMainFrame, getName, setMainFrame
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buttonsDimensions

public static final java.awt.Dimension buttonsDimensions

margin

public static final int margin
See Also:
Constant Field Values
Constructor Detail

Plugin

public Plugin()
This constructor gets System.getProperty("user.home") to set the default configuration folder. The initial tempFolder is set from the config folder. In the following it will be read from the config file. This folder is used to store all the files which will be downloaded from server

Method Detail

main

public static void main(java.lang.String[] args)

call

public void call()
This method is called every time the plugin is selected from the iReport Plugin menu First, it sets the LookAndFeel. Then reads the configuration file to get information about server location and tempo folder. If no config files are available, it opens a ConfigurationFrame passing it the default values for thesconfigFile.exists()e parameters. Then it checks if there is a user aready logged


configure

public void configure()
This method is called when the plugin configuration button on plugin list is selected. It sets the LookAndFeel. Then it reads the configuration file to get information about server location and temporary folder and open the ConfigurationFrame.


updateConfiguration

public boolean updateConfiguration(java.lang.String serverLocationTemp,
                                   java.lang.String tempFolderTemp)
This method updates the local fields serverLocation and tempFolder getting the new values as input parameters. Then creates a new config file storing these information The input parameters are first evaluated with the checkConfigInformation(String, String) method

Parameters:
serverLocationTemp -
tempFolderTemp -
Returns:
true if the input parameters could be correct values and if the config file write operation is processed correctly

checkUser

public void checkUser()
This method checks if there is already a user logged by reading the UserProfile information If no users are available it opens the Login Frame Otherwise it show the hidden Tree Frame


getMainInstance

public static Plugin getMainInstance()
Return the main instance of the Plugin. This method assume that there is only one Plugin instanced per JVM