com.componio.jlicensure.webmodule.util
Class LicenseeDataAdder

java.lang.Object
  extended by com.componio.jlicensure.webmodule.util.LicenseeDataAdder

public class LicenseeDataAdder
extends java.lang.Object

Utitlity class for sending licensee data to the jlicensure server.

Author:
Thorsten Liese - thorsten.liese@componio.net

Constructor Summary
LicenseeDataAdder()
           
 
Method Summary
protected static Decoder createDecoder()
           
protected static Encoder createEncoder()
           
protected static SignedCommand createSignedCommand(Command cmd)
           
protected static java.lang.Class loadClass(java.lang.String name)
           
static void main(java.lang.String[] args)
          Use the given command line argument to load a properties file and use those properties to send a AddLicenseeDataCommand to the JLicensure server.
static LicenseeData newLicenseeData()
          Create a new empty LicenseeData object
static LicenseeData newLicenseeData(java.util.Properties properties)
          Create a new LicenseeData object using the given set of properties
protected static java.security.PrivateKey readPrivateKey()
           
static void sendLicenseeData(LicenseeData licData)
          Send new licensee data to the server using the given set of properties
static void setProperty(java.lang.String property, java.lang.String value)
          Set a property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LicenseeDataAdder

public LicenseeDataAdder()
Method Detail

newLicenseeData

public static LicenseeData newLicenseeData()
Create a new empty LicenseeData object

Returns:
empty LicenseeData

newLicenseeData

public static LicenseeData newLicenseeData(java.util.Properties properties)
Create a new LicenseeData object using the given set of properties

Parameters:
properties - properties
Returns:
LicenseeData

sendLicenseeData

public static void sendLicenseeData(LicenseeData licData)
Send new licensee data to the server using the given set of properties


setProperty

public static void setProperty(java.lang.String property,
                               java.lang.String value)
Set a property. See the file com/componio/jlicensure/webmodule/util/LicenseeDataAdder.properties for the set of configurable properties

Parameters:
property - property name
value - property value

loadClass

protected static java.lang.Class loadClass(java.lang.String name)
                                    throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

createEncoder

protected static Encoder createEncoder()
                                throws java.lang.Exception
Throws:
java.lang.Exception

createDecoder

protected static Decoder createDecoder()
                                throws java.lang.Exception
Throws:
java.lang.Exception

createSignedCommand

protected static SignedCommand createSignedCommand(Command cmd)
                                            throws java.lang.Exception
Throws:
java.lang.Exception

readPrivateKey

protected static java.security.PrivateKey readPrivateKey()
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Use the given command line argument to load a properties file and use those properties to send a AddLicenseeDataCommand to the JLicensure server.

Throws:
java.lang.Exception