com.jp.protection.priv.products
Class ProductFeature

java.lang.Object
  extended by com.jp.protection.priv.products.ProductFeature
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class ProductFeature
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

This class represents single feature of the product

See Also:
Serialized Form

Field Summary
protected  boolean fEnabled
           
protected  boolean fEvaluationEnabled
           
protected  boolean fExpiredEnabled
           
protected  boolean fExpiredEvaluationEnabled
           
protected  java.lang.String fID
           
protected  boolean fInvalidEnabled
           
protected  ProductFeature fMasterProductFeature
           
protected  java.lang.String fName
           
static long serialVersionUID
           
 
Constructor Summary
ProductFeature()
          Creates a new instance of the ProductFeature
ProductFeature(ProductFeature aMasterProductFeature)
          Creates a new instance of the ProductFeature that will be a feature of product edition and attaches it to the "master" product feature.
 
Method Summary
 ProductFeature cloneProductFeature()
          Returns a copy of this product's feature
 ProductFeature cloneProductFeature(Product aProduct)
          Returns a copy of this product's feature.
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getID()
          Returns identifier
 ProductFeature getMasterProductFeature()
          Returns "master" product feature
 java.lang.String getName()
          Return feature's name; master's feature name for "slave" product feature
 java.lang.String getNameStr()
          Returns feature's name of "N/A" if its name is not yet specified
 boolean isEnabled()
          Returns whether this feature is enabled for the valid commercial license
 boolean isEvaluationEnabled()
          Returns whether this feature is enabled for the valid evaluation license
 boolean isExpiredEnabled()
          Returns whether this feature is enabled for the expired commercial license
 boolean isExpiredEvaluationEnabled()
          Returns whether this feature is enabled for the expired evaluation license
 boolean isInvalidEnabled()
          Returns whether this feature is enabled for an invalid license
 void putProductFeature(LicenseImpl aLicense)
          Puts this product's feature "enabled" attibutes into the specified license
 void setEnabled(boolean aEnabled)
          Specifies this feature should be enabled for the valid commercial license
 void setEvaluationEnabled(boolean aEvaluationEnabled)
          Specifies that this feature should be enabled for the valid evaluation license
 void setExpiredEnabled(boolean anExpiredEnabled)
          Specifies that this feature should enabled for the expired commercial license
 void setExpiredEvaluationEnabled(boolean anExpiredEvaluationEnabled)
          Specifies that this feature should be enabled for the expired evaluation license
 void setID(java.lang.String aID)
          Specifies identifier
 void setInvalidEnabled(boolean aInvalidEnabled)
          Specifies that this feature should be enabled for an invalid license
 void setName(java.lang.String aName)
          Specifies name of the feature
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

fName

protected java.lang.String fName

fID

protected java.lang.String fID

fEnabled

protected boolean fEnabled

fEvaluationEnabled

protected boolean fEvaluationEnabled

fExpiredEnabled

protected boolean fExpiredEnabled

fExpiredEvaluationEnabled

protected boolean fExpiredEvaluationEnabled

fInvalidEnabled

protected boolean fInvalidEnabled

fMasterProductFeature

protected ProductFeature fMasterProductFeature
Constructor Detail

ProductFeature

public ProductFeature()
Creates a new instance of the ProductFeature


ProductFeature

public ProductFeature(ProductFeature aMasterProductFeature)
Creates a new instance of the ProductFeature that will be a feature of product edition and attaches it to the "master" product feature. Such a "slave" product feature holds only "enabled" values while all other attributes come from "master" product feature.

Parameters:
aMasterProductFeature - "master" product feature
Method Detail

isInvalidEnabled

public boolean isInvalidEnabled()
Returns whether this feature is enabled for an invalid license

Returns:
true if this feature is enabled for an invalid license; false otherwise

setInvalidEnabled

public void setInvalidEnabled(boolean aInvalidEnabled)
Specifies that this feature should be enabled for an invalid license

Parameters:
aInvalidEnabled - enabled value

isExpiredEnabled

public boolean isExpiredEnabled()
Returns whether this feature is enabled for the expired commercial license

Returns:
true if this feature is enabled for the expired commercial license; false otherwise

setExpiredEnabled

public void setExpiredEnabled(boolean anExpiredEnabled)
Specifies that this feature should enabled for the expired commercial license

Parameters:
anExpiredEnabled - enabled value

isExpiredEvaluationEnabled

public boolean isExpiredEvaluationEnabled()
Returns whether this feature is enabled for the expired evaluation license

Returns:
true if this feature is enabled for the expired evaluation license; false otherwise

setExpiredEvaluationEnabled

public void setExpiredEvaluationEnabled(boolean anExpiredEvaluationEnabled)
Specifies that this feature should be enabled for the expired evaluation license

Parameters:
anExpiredEvaluationEnabled - enabled value

isEvaluationEnabled

public boolean isEvaluationEnabled()
Returns whether this feature is enabled for the valid evaluation license

Returns:
true if this feature is enabled for the valid evaluation license; false otherwise

setEvaluationEnabled

public void setEvaluationEnabled(boolean aEvaluationEnabled)
Specifies that this feature should be enabled for the valid evaluation license

Parameters:
aEvaluationEnabled - enabled value

getID

public java.lang.String getID()
Returns identifier

Returns:
identifier

setID

public void setID(java.lang.String aID)
Specifies identifier

Parameters:
aID - identifier

setName

public void setName(java.lang.String aName)
Specifies name of the feature

Parameters:
aName - name of the feature

getMasterProductFeature

public ProductFeature getMasterProductFeature()
Returns "master" product feature

Returns:
"master" product feature

isEnabled

public boolean isEnabled()
Returns whether this feature is enabled for the valid commercial license

Returns:
true if this feature is enabled for the valid commercial license; false otherwise

setEnabled

public void setEnabled(boolean aEnabled)
Specifies this feature should be enabled for the valid commercial license

Parameters:
aEnabled - enabled value

getNameStr

public java.lang.String getNameStr()
Returns feature's name of "N/A" if its name is not yet specified

Returns:
name string

getName

public java.lang.String getName()
Return feature's name; master's feature name for "slave" product feature

Returns:
feature's name

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

cloneProductFeature

public ProductFeature cloneProductFeature()
Returns a copy of this product's feature

Returns:
an instance of the ProductFeature

cloneProductFeature

public ProductFeature cloneProductFeature(Product aProduct)
Returns a copy of this product's feature. This method used during cloning of the product's editions

Parameters:
aProduct - a product
Returns:
an instance of the ProductFeature

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

putProductFeature

public void putProductFeature(LicenseImpl aLicense)
Puts this product's feature "enabled" attibutes into the specified license

Parameters:
aLicense - license to put feature to