Package com.zerog.ia.api.pub.registry
Class SoftwareObjectSearchCriteria
- java.lang.Object
-
- com.zerog.ia.api.pub.registry.SoftwareObjectSearchCriteria
-
public class SoftwareObjectSearchCriteria extends java.lang.Object
Use SoftwareObjectSearchCriteria along with the ProductRegistryService to refine the Global Component Registry search.
You can use Java REGEX Expressions in all of the search properties.
Refer to this document for more information about regular expressions in Java.- See Also:
ProductRegistryService
,SoftwareObject
-
-
Field Summary
Fields Modifier and Type Field Description static int
COMPARISON_TYPE_AND
The SoftwareObject will be returned if all the comparisons evaluate to true.static int
COMPARISON_TYPE_OR
The SoftwareObject will be returned if at least one of the comparisons evaluate to true.
-
Constructor Summary
Constructors Constructor Description SoftwareObjectSearchCriteria()
The SoftwareObject is created and the Comparison Type is set to COMPARISON_TYPE_AND.SoftwareObjectSearchCriteria(int comparisonType)
The SoftwareObject is created with the specified Comparison Type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getComparisonType()
Gets the ComparisonType used by the criteria to define whether a SoftwareObject should or should not be returned.java.lang.String
getLocation()
Gets the configured location where the SoftwareObject should be installed in.java.lang.String
getName()
Gets the configured name that the SoftwareObject should match.java.lang.String
getUniqueID()
Gets the configured Unique ID that the SoftwareObject should match.java.lang.String
getVersion()
Gets the configured version that the SoftwareObject should match.boolean
matches(java.lang.String name, java.lang.String uniqueID, java.lang.String location, java.lang.String version)
Evaluates whether the parameters match the pre-configured search criteria.
This method is called by the ProductRegistryService to evaluate whether a SoftwareObject should or should not be returned.void
setLocation(java.lang.String location)
Configures a specific location where the SoftwareObject should be installed in.void
setName(java.lang.String name)
Configures a specific name that the SoftwareObject should match.void
setUniqueID(java.lang.String uniqueID)
Configures a specific Unique ID that the SoftwareObject should match.void
setVersion(java.lang.String version)
Configures a specific Version that the SoftwareObject should match.
-
-
-
Field Detail
-
COMPARISON_TYPE_AND
public static final int COMPARISON_TYPE_AND
The SoftwareObject will be returned if all the comparisons evaluate to true.- See Also:
- Constant Field Values
-
COMPARISON_TYPE_OR
public static final int COMPARISON_TYPE_OR
The SoftwareObject will be returned if at least one of the comparisons evaluate to true.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SoftwareObjectSearchCriteria
public SoftwareObjectSearchCriteria()
The SoftwareObject is created and the Comparison Type is set to COMPARISON_TYPE_AND.- See Also:
COMPARISON_TYPE_AND
,COMPARISON_TYPE_OR
-
SoftwareObjectSearchCriteria
public SoftwareObjectSearchCriteria(int comparisonType)
The SoftwareObject is created with the specified Comparison Type.- See Also:
COMPARISON_TYPE_AND
,COMPARISON_TYPE_OR
-
-
Method Detail
-
setLocation
public void setLocation(java.lang.String location)
Configures a specific location where the SoftwareObject should be installed in.- Parameters:
location
- The complete String or REGEX that represents the location of the SoftwareObject.- See Also:
SoftwareObject
-
setName
public void setName(java.lang.String name)
Configures a specific name that the SoftwareObject should match.- Parameters:
name
- The complete String or REGEX that represents the name of the SoftwareObject.- See Also:
SoftwareObject
-
setUniqueID
public void setUniqueID(java.lang.String uniqueID)
Configures a specific Unique ID that the SoftwareObject should match.- Parameters:
uniqueID
- The complete String or REGEX that represents the Unique ID of the SoftwareObject.- See Also:
SoftwareObject
-
setVersion
public void setVersion(java.lang.String version)
Configures a specific Version that the SoftwareObject should match.- Parameters:
version
- The complete String or REGEX that represents the Version of the SoftwareObject.- See Also:
SoftwareObject
-
getLocation
public java.lang.String getLocation()
Gets the configured location where the SoftwareObject should be installed in.- Returns:
- The complete String or REGEX that represents the location in the criteria.
- See Also:
SoftwareObject
-
getName
public java.lang.String getName()
Gets the configured name that the SoftwareObject should match.- Returns:
- The complete String or REGEX that represents the name in the criteria.
- See Also:
SoftwareObject
-
getUniqueID
public java.lang.String getUniqueID()
Gets the configured Unique ID that the SoftwareObject should match.- Returns:
- The complete String or REGEX that represents the Unique ID in the criteria.
- See Also:
SoftwareObject
-
getVersion
public java.lang.String getVersion()
Gets the configured version that the SoftwareObject should match.- Returns:
- The complete String or REGEX that represents the version in the criteria.
- See Also:
SoftwareObject
-
getComparisonType
public int getComparisonType()
Gets the ComparisonType used by the criteria to define whether a SoftwareObject should or should not be returned.- Returns:
- The ComparisonType used.
- See Also:
COMPARISON_TYPE_AND
,COMPARISON_TYPE_OR
-
matches
public boolean matches(java.lang.String name, java.lang.String uniqueID, java.lang.String location, java.lang.String version)
Evaluates whether the parameters match the pre-configured search criteria.
This method is called by the ProductRegistryService to evaluate whether a SoftwareObject should or should not be returned.- Parameters:
name
- The name of the SoftwareObject that is being evaluated.uniqueID
- The uniqueID of the SoftwareObject that is being evaluated.location
- The location of the SoftwareObject that is being evaluated.version
- The version of the SoftwareObject that is being evaluated.- Returns:
- Whether all the comparisons evaluated positively or not.
- See Also:
COMPARISON_TYPE_AND
,COMPARISON_TYPE_OR
,ProductRegistryService
-
-