|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pentaho.packageManagement.PackageConstraint
org.pentaho.packageManagement.VersionRangePackageConstraint
public class VersionRangePackageConstraint
A concrete implementation of PackgageConstraint that encapsulates ranged version number constraints. Handles constraints of the form (u.v.w < package < x.y.z) and (package < u.v.w OR package > x.y.z)
| Field Summary | |
|---|---|
protected boolean |
m_boundOr
is false for version1 <= package <= version2 |
protected String |
m_lowerBound
the lower bound |
protected VersionPackageConstraint.VersionComparison |
m_lowerConstraint
the comparison for the lower bound |
protected String |
m_upperBound
the upper bound |
protected VersionPackageConstraint.VersionComparison |
m_upperConstraint
the comparison for the upper bound |
| Fields inherited from class org.pentaho.packageManagement.PackageConstraint |
|---|
m_thePackage |
| Constructor Summary | |
|---|---|
VersionRangePackageConstraint(Package p)
Constructor |
|
| Method Summary | |
|---|---|
boolean |
checkConstraint(Package target)
Check the target package against the constraint embodied in this PackageConstraint. |
PackageConstraint |
checkConstraint(PackageConstraint target)
Check the target package constraint against the constraint embodied in this package constraint. |
protected static boolean |
checkConstraint(String toCheck,
VersionPackageConstraint.VersionComparison comp1,
String bound1,
VersionPackageConstraint.VersionComparison comp2,
String bound2,
boolean boundOr)
|
protected PackageConstraint |
checkTargetVersionPackageConstraint(VersionPackageConstraint target)
|
protected PackageConstraint |
checkTargetVersionRangePackageConstraint(VersionRangePackageConstraint target)
|
String |
getLowerBound()
Get the lower bound of this range |
VersionPackageConstraint.VersionComparison |
getLowerComparison()
Get the lower comparison |
String |
getUpperBound()
Get the upper bound of this range |
VersionPackageConstraint.VersionComparison |
getUpperComparison()
Get the upper comparison |
boolean |
isBoundOR()
Returns true if this is a bounded OR type of constraint |
void |
setRangeConstraint(String bound1,
VersionPackageConstraint.VersionComparison comp1,
String bound2,
VersionPackageConstraint.VersionComparison comp2)
Set the range bounds and constraints. |
| Methods inherited from class org.pentaho.packageManagement.PackageConstraint |
|---|
getPackage, setPackage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String m_lowerBound
protected VersionPackageConstraint.VersionComparison m_lowerConstraint
protected String m_upperBound
protected VersionPackageConstraint.VersionComparison m_upperConstraint
protected boolean m_boundOr
| Constructor Detail |
|---|
public VersionRangePackageConstraint(Package p)
p - the package to base this constraint on| Method Detail |
|---|
public void setRangeConstraint(String bound1,
VersionPackageConstraint.VersionComparison comp1,
String bound2,
VersionPackageConstraint.VersionComparison comp2)
throws Exception
bound1 - the first boundcomp1 - the first comparisonbound2 - the second boundcomp2 - the second comparison
Exception - if the range constraint is malformedpublic String getLowerBound()
public String getUpperBound()
public VersionPackageConstraint.VersionComparison getLowerComparison()
public VersionPackageConstraint.VersionComparison getUpperComparison()
public boolean isBoundOR()
protected static boolean checkConstraint(String toCheck,
VersionPackageConstraint.VersionComparison comp1,
String bound1,
VersionPackageConstraint.VersionComparison comp2,
String bound2,
boolean boundOr)
public boolean checkConstraint(Package target)
throws Exception
checkConstraint in class PackageConstrainttarget - a package to check with respect to the
encapsulated package and the constraint.
Exception - if the constraint can't be checked for some
reason.
protected PackageConstraint checkTargetVersionRangePackageConstraint(VersionRangePackageConstraint target)
throws Exception
Exception
protected PackageConstraint checkTargetVersionPackageConstraint(VersionPackageConstraint target)
throws Exception
Exception
public PackageConstraint checkConstraint(PackageConstraint target)
throws Exception
PackageConstraint
checkConstraint in class PackageConstrainttarget - the package constraint to compare against
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||