com.jp.protection.pub
Class LicenseLocation

java.lang.Object
  extended by com.jp.protection.pub.LicenseLocation
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class LicenseLocation
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Class that defines location of a license

Since:
v5.0
See Also:
Serialized Form

Field Summary
protected  java.lang.String licenseFileName
           
protected  java.lang.String licenseFolder
           
protected  boolean searchSubFolders
           
static long serialVersionUID
           
protected  boolean userHomeRelative
           
 
Constructor Summary
LicenseLocation()
          Creates a new instance of LicenseLocation
LicenseLocation(java.io.File aLicenseFile)
          Creates a new instance of LicenseLocation
LicenseLocation(java.lang.String aLicenseFolder, java.lang.String aLicenseFileName, boolean aSearchSubFolders, boolean aUserHomeRelative)
          Creates a new instance of LicenseLocation
 
Method Summary
 java.lang.Object clone()
           
 java.lang.String getLicenseFileName()
          Returns license file name
 java.util.List<java.io.File> getLicenseFiles()
          Returns a list of license files for this location
 java.lang.String getLicenseFolder()
          Returns license folder
 java.lang.String getLicenseFolderStr()
          Returns textual representation of license folder
 boolean isSearchSubFolders()
          Returns whether sub-folders should be scanned for a license
 boolean isUserHomeRelative()
          Returns whether this location is User Home relative
protected  java.util.List<java.io.File> list(java.io.File aFolder)
           
 void setLicenseFileName(java.lang.String licenseFileName)
          Specifies license file name
 void setLicenseFolder(java.lang.String licenseFolder)
          Specifies license folder
 void setSearchSubFolders(boolean searchSubFolders)
          Specifies whether sub-folders should be scanned for a license
 void setUserHomeRelative(boolean userHomeRelative)
          Specifies whether license location should be User Home relative
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

licenseFolder

protected java.lang.String licenseFolder

licenseFileName

protected java.lang.String licenseFileName

searchSubFolders

protected boolean searchSubFolders

userHomeRelative

protected boolean userHomeRelative
Constructor Detail

LicenseLocation

public LicenseLocation()
Creates a new instance of LicenseLocation


LicenseLocation

public LicenseLocation(java.lang.String aLicenseFolder,
                       java.lang.String aLicenseFileName,
                       boolean aSearchSubFolders,
                       boolean aUserHomeRelative)
Creates a new instance of LicenseLocation

Parameters:
aLicenseFolder - license folder
aLicenseFileName - license file name
aSearchSubFolders - specifies whether sub-folders should be scanned for a license
aUserHomeRelative - specifies whether license location is User Home relative

LicenseLocation

public LicenseLocation(java.io.File aLicenseFile)
Creates a new instance of LicenseLocation

Parameters:
aLicenseFile - a file denotes exact location for a license
Method Detail

getLicenseFiles

public java.util.List<java.io.File> getLicenseFiles()
Returns a list of license files for this location

Returns:
list of license files

list

protected java.util.List<java.io.File> list(java.io.File aFolder)

isUserHomeRelative

public boolean isUserHomeRelative()
Returns whether this location is User Home relative

Returns:
true if this location is User Home relative; false otherwise

isSearchSubFolders

public boolean isSearchSubFolders()
Returns whether sub-folders should be scanned for a license

Returns:
true if sub-folders should be scanned for a license; false otherwise

getLicenseFolder

public java.lang.String getLicenseFolder()
Returns license folder

Returns:
license folder

getLicenseFolderStr

public java.lang.String getLicenseFolderStr()
Returns textual representation of license folder

Returns:
textual representation of license folder

setLicenseFileName

public void setLicenseFileName(java.lang.String licenseFileName)
Specifies license file name

Parameters:
licenseFileName - license file name

setUserHomeRelative

public void setUserHomeRelative(boolean userHomeRelative)
Specifies whether license location should be User Home relative

Parameters:
userHomeRelative - true if license location should be User Home relative;false otherwise

setSearchSubFolders

public void setSearchSubFolders(boolean searchSubFolders)
Specifies whether sub-folders should be scanned for a license

Parameters:
searchSubFolders - true if sub-folders should be scanned for a license;false

setLicenseFolder

public void setLicenseFolder(java.lang.String licenseFolder)
Specifies license folder

Parameters:
licenseFolder - license folder

getLicenseFileName

public java.lang.String getLicenseFileName()
Returns license file name

Returns:
license file name

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object