org.nuiton.license
Class LicenseFactory

java.lang.Object
  extended by org.nuiton.license.LicenseFactory

public class LicenseFactory
extends java.lang.Object

Class responsible of instanciate License.

The factory use a table of resolvers to lookup for licenses.

To obtain an instance of a LicenseFactory use the method newInstance(String[]).

Author:
chemit

Field Summary
protected  java.util.List<LicenseResolver> resolvers
           
 
Constructor Summary
protected LicenseFactory()
           
 
Method Summary
 void addResolver(LicenseResolver licenseResolver)
           
 java.util.Map<java.lang.String,java.lang.String> getLicenseNames()
           
static LicenseFactory newInstance(java.lang.String... extraResolvers)
           
 License revolv(java.lang.String licenseName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resolvers

protected java.util.List<LicenseResolver> resolvers
Constructor Detail

LicenseFactory

protected LicenseFactory()
                  throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

newInstance

public static LicenseFactory newInstance(java.lang.String... extraResolvers)
                                  throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

addResolver

public void addResolver(LicenseResolver licenseResolver)

getLicenseNames

public java.util.Map<java.lang.String,java.lang.String> getLicenseNames()
                                                                 throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

revolv

public License revolv(java.lang.String licenseName)
               throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException


Copyright © 2009 CodeLutin. All Rights Reserved.