com.jp.protection.pub.pro.ls
Interface LauncherConfigStorage

All Known Subinterfaces:
ModifiableLauncherConfigStorage
All Known Implementing Classes:
BasicLauncherConfigStorage, BasicModifiableLauncherConfigStorage, JarLauncherConfigStorage, JarModifiableLauncherConfigStorage

public interface LauncherConfigStorage

Interface describes storage for holding the launcher configurations

Since:
3.0

Method Summary
 void addLauncherConfig(ProtectionLauncherConfig aLauncherConfig)
          Adds a launcher configuration into the storage
 void addLauncherConfigStorageListener(LauncherConfigStorageListener l)
          Adds a listener to the listeners list
 ProtectionLauncher getLauncher(LicenseStorage.LicenseEntry anEntry, java.awt.Component anOwner, boolean isExactMatch)
          Creates and returns a new Launcher instance capable of working with the licenses defined by the given license entry
 ProtectionLauncherConfig getLauncherConfig(LicenseStorage.LicenseEntry aLicenseEntry, boolean isExactMatch)
          Returns the launcher configuration suitable to handle given license entry
 ProtectionLauncherConfig getLauncherConfig(java.lang.String aProduct, java.lang.String aProductEdition, int aMajorVersion, int aMinorVersion)
          Returns the launcher configuration suitable to handle license entry with given attributes
 java.util.Collection getLauncherConfigs()
          Returns collection of launcher configurations contained in the storage
 LicenseReader getLicenseReader(LicenseStorage.LicenseEntry anEntry, boolean isExactMatch)
          Creates and returns LicenseReader instance capable of reading licenses defined by given license entry
 void load(java.io.InputStream anInputStream, ProtectionLauncherConfigReader aReader)
          Loads storage from the specified stream
 void removeLauncherConfigStorageListener(LauncherConfigStorageListener l)
          Removes a listener from the listeners list
 

Method Detail

addLauncherConfig

void addLauncherConfig(ProtectionLauncherConfig aLauncherConfig)
Adds a launcher configuration into the storage

Parameters:
aLauncherConfig - a launcher configuration to add

getLauncherConfigs

java.util.Collection getLauncherConfigs()
Returns collection of launcher configurations contained in the storage

Returns:
collection of launcher configurations

getLauncherConfig

ProtectionLauncherConfig getLauncherConfig(LicenseStorage.LicenseEntry aLicenseEntry,
                                           boolean isExactMatch)
Returns the launcher configuration suitable to handle given license entry

Parameters:
aLicenseEntry - the license entry to get the launcher configuration for
isExactMatch - defines that if there is no launcher configuration has been found and parameter is false then the method should try to find first suitable launcher configuration ignoring some of license entry properties.
Returns:
launcher configuration

getLauncherConfig

ProtectionLauncherConfig getLauncherConfig(java.lang.String aProduct,
                                           java.lang.String aProductEdition,
                                           int aMajorVersion,
                                           int aMinorVersion)
Returns the launcher configuration suitable to handle license entry with given attributes

Parameters:
aProduct - product identifier
aProductEdition - product edition identifier
aMajorVersion - major version
aMinorVersion - minor version
Returns:
launcher configuration

getLicenseReader

LicenseReader getLicenseReader(LicenseStorage.LicenseEntry anEntry,
                               boolean isExactMatch)
Creates and returns LicenseReader instance capable of reading licenses defined by given license entry

Parameters:
anEntry - license entry to get License Reader for
isExactMatch - defines that if no License Reader is found and parameter is false the method should try to find first suitable License Reader ignoring some of license entry properties
Returns:
LicenseReader instance

getLauncher

ProtectionLauncher getLauncher(LicenseStorage.LicenseEntry anEntry,
                               java.awt.Component anOwner,
                               boolean isExactMatch)
Creates and returns a new Launcher instance capable of working with the licenses defined by the given license entry

Parameters:
anEntry - license entry to create Launcher for
anOwner - owner component for all dialogs can be shown with help of Launcher
isExactMatch - defines that if there is no Launcher has been found and parameter is false then the method should try to find first suitable Launcher ignoring some of license entry properties.
Returns:
new Launcher instance

load

void load(java.io.InputStream anInputStream,
          ProtectionLauncherConfigReader aReader)
          throws java.io.IOException,
                 java.lang.UnsupportedOperationException
Loads storage from the specified stream

Parameters:
anInputStream - stream to load storage from
aReader - reader that should be used to load storage
Throws:
java.io.IOException - for errors occured during loading
java.lang.UnsupportedOperationException

addLauncherConfigStorageListener

void addLauncherConfigStorageListener(LauncherConfigStorageListener l)
Adds a listener to the listeners list

Parameters:
l - listener to add

removeLauncherConfigStorageListener

void removeLauncherConfigStorageListener(LauncherConfigStorageListener l)
Removes a listener from the listeners list

Parameters:
l - listener to remove