org.rhq.core.domain.criteria
Class GenericDriftChangeSetCriteria

java.lang.Object
  extended by org.rhq.core.domain.criteria.GenericDriftChangeSetCriteria
All Implemented Interfaces:
Serializable, BaseCriteria, DriftChangeSetCriteria

public class GenericDriftChangeSetCriteria
extends Object
implements Serializable, DriftChangeSetCriteria

The generic implementation of DriftChangeSetCriteria makes no assumptions about the actual drift server plugin that will service the relevant requests. It is a simple impl of the interface and is suitable for use by any component that can not assume a backend implmentation, like a GUI client. Server side implementations will use this to populate the plugin-specific implementation of the interface.

See Also:
Serialized Form

Constructor Summary
GenericDriftChangeSetCriteria()
           
 
Method Summary
 void addFilterCategory(DriftChangeSetCategory filterCategory)
          Allows for filtering on change set type.
 void addFilterCreatedAfter(Long filterCreatedAfter)
          Allows for searching change sets by timestamp range where the timestamp corresponds to the creation time of the change set.
 void addFilterCreatedBefore(Long filterCreatedBefore)
          Allows for searching change sets by timestamp range where the timestamp corresponds to the creation time of the change set.
 void addFilterDriftCategories(DriftCategory... filterDriftCategories)
          Allows for filtering on the type of drift contained in the change sets.
 void addFilterDriftDefinitionId(Integer filterDriftDefId)
           
 void addFilterDriftDirectory(String filterDriftDirectory)
          Allows for filtering on a specific directory.
 void addFilterDriftPath(String filterDriftPath)
          Allows for filtering on a specific path.
 void addFilterEndVersion(String filterEndVersion)
          Allows for searching for change sets by version range.
 void addFilterId(String filterId)
           
 void addFilterResourceId(Integer filterResourceId)
           
 void addFilterStartVersion(String filterStartVersion)
          Allows for searching for change sets by version range.
 void addFilterVersion(String filterVersion)
           
 void addSortVersion(PageOrdering sortVersion)
          Allows for sorting on change set version
 void fetchDrifts(boolean fetchDrifts)
           
 DriftChangeSetCategory getFilterCategory()
           
 Long getFilterCreatedAfter()
           
 Long getFilterCreatedBefore()
           
 List<DriftCategory> getFilterDriftCategories()
           
 Integer getFilterDriftDefinitionId()
           
 String getFilterDriftDirectory()
           
 String getFilterDriftPath()
           
 String getFilterEndVersion()
           
 String getFilterId()
           
 Integer getFilterResourceId()
           
 String getFilterStartVersion()
           
 String getFilterVersion()
           
 PageControl getPageControlOverrides()
           
 PageOrdering getSortVersion()
           
 boolean isFetchDrifts()
           
 boolean isStrict()
           
 void setPageControl(PageControl pageControl)
           
 void setStrict(boolean strict)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericDriftChangeSetCriteria

public GenericDriftChangeSetCriteria()
Method Detail

addFilterId

public void addFilterId(String filterId)
Specified by:
addFilterId in interface DriftChangeSetCriteria
Parameters:
filterId - The change set id

getFilterId

public String getFilterId()
Specified by:
getFilterId in interface DriftChangeSetCriteria
Returns:
The change set id filter or null if not set

addFilterVersion

public void addFilterVersion(String filterVersion)
Specified by:
addFilterVersion in interface DriftChangeSetCriteria
Parameters:
filterVersion - The change set version.

getFilterVersion

public String getFilterVersion()
Specified by:
getFilterVersion in interface DriftChangeSetCriteria
Returns:
The change set version filter or null if not set

addFilterStartVersion

public void addFilterStartVersion(String filterStartVersion)
Description copied from interface: DriftChangeSetCriteria
Allows for searching for change sets by version range.

Specified by:
addFilterStartVersion in interface DriftChangeSetCriteria
Parameters:
filterStartVersion - The starting version of the change set(s). This should be inclusive.

getFilterStartVersion

public String getFilterStartVersion()
Specified by:
getFilterStartVersion in interface DriftChangeSetCriteria
Returns:
The starting version or null if not set

addFilterEndVersion

public void addFilterEndVersion(String filterEndVersion)
Description copied from interface: DriftChangeSetCriteria
Allows for searching for change sets by version range.

Specified by:
addFilterEndVersion in interface DriftChangeSetCriteria
Parameters:
filterEndVersion - The ending version of the change set(s). This should be inclusive.

getFilterEndVersion

public String getFilterEndVersion()
Specified by:
getFilterEndVersion in interface DriftChangeSetCriteria
Returns:
The ending version or null if not set.

addFilterCreatedAfter

public void addFilterCreatedAfter(Long filterCreatedAfter)
Description copied from interface: DriftChangeSetCriteria
Allows for searching change sets by timestamp range where the timestamp corresponds to the creation time of the change set.

Specified by:
addFilterCreatedAfter in interface DriftChangeSetCriteria
Parameters:
filterCreatedAfter - The starting time of the range. This should be inclusive.

getFilterCreatedAfter

public Long getFilterCreatedAfter()
Specified by:
getFilterCreatedAfter in interface DriftChangeSetCriteria
Returns:
The starting creation timestamp or null if not set.

addFilterCreatedBefore

public void addFilterCreatedBefore(Long filterCreatedBefore)
Description copied from interface: DriftChangeSetCriteria
Allows for searching change sets by timestamp range where the timestamp corresponds to the creation time of the change set.

Specified by:
addFilterCreatedBefore in interface DriftChangeSetCriteria
Parameters:
filterCreatedBefore - The ending time of the range. This should be inclusive.

getFilterCreatedBefore

public Long getFilterCreatedBefore()
Specified by:
getFilterCreatedBefore in interface DriftChangeSetCriteria
Returns:
The ending creation timestamp or null if not set.

addFilterResourceId

public void addFilterResourceId(Integer filterResourceId)
Specified by:
addFilterResourceId in interface DriftChangeSetCriteria
Parameters:
filterResourceId - The id which uniquely identifies the resource to which the change set(s) belong. Note that persistence of resources is managed by the RHQ core server so it assumed that no other resource-specific information other than the id is maintained/tracked by drift server plugin implementations.

getFilterResourceId

public Integer getFilterResourceId()
Specified by:
getFilterResourceId in interface DriftChangeSetCriteria
Returns:
The resource id filter or null if not set.

addFilterDriftDefinitionId

public void addFilterDriftDefinitionId(Integer filterDriftDefId)
Specified by:
addFilterDriftDefinitionId in interface DriftChangeSetCriteria
Parameters:
filterDriftDefId - The id which uniquely identifies the drift definition to which the change set(s) belong. Note that persistence of resources is managed by the RHQ core server so it assumed that no other resource-specific information other than the id is maintained/tracked by drift server plugin implementations.

getFilterDriftDefinitionId

public Integer getFilterDriftDefinitionId()
Specified by:
getFilterDriftDefinitionId in interface DriftChangeSetCriteria
Returns:
The drift definition id filter or null if not set.

addFilterCategory

public void addFilterCategory(DriftChangeSetCategory filterCategory)
Description copied from interface: DriftChangeSetCriteria
Allows for filtering on change set type. If not set, it can be assumed that the category is DriftChangeSetCategory.DRIFT which means that the query results should only include delta change sets.

Specified by:
addFilterCategory in interface DriftChangeSetCriteria
Parameters:
filterCategory - The change set type filter

getFilterCategory

public DriftChangeSetCategory getFilterCategory()
Specified by:
getFilterCategory in interface DriftChangeSetCriteria
Returns:
The change set category (i.e., type) filter

addFilterDriftCategories

public void addFilterDriftCategories(DriftCategory... filterDriftCategories)
Description copied from interface: DriftChangeSetCriteria
Allows for filtering on the type of drift contained in the change sets. Each of the specified categories must found in a change set in order for it to be considered a match.

Specified by:
addFilterDriftCategories in interface DriftChangeSetCriteria
Parameters:
filterDriftCategories - Drift type or categories on which to filter.
See Also:
DriftCategory

getFilterDriftCategories

public List<DriftCategory> getFilterDriftCategories()
Specified by:
getFilterDriftCategories in interface DriftChangeSetCriteria
Returns:
A list of DriftCategory filters or an empty list if not set.

addFilterDriftPath

public void addFilterDriftPath(String filterDriftPath)
Description copied from interface: DriftChangeSetCriteria
Allows for filtering on a specific path. A change set should be considered a match only if it contains Drift with a path that contains the specified substring.

Specified by:
addFilterDriftPath in interface DriftChangeSetCriteria
Parameters:
filterDriftPath - A path substring on which to filter

getFilterDriftPath

public String getFilterDriftPath()
Specified by:
getFilterDriftPath in interface DriftChangeSetCriteria
Returns:
The drift path substring filter

addFilterDriftDirectory

public void addFilterDriftDirectory(String filterDriftDirectory)
Description copied from interface: DriftChangeSetCriteria
Allows for filtering on a specific directory. A change set should be considered a match only if it contains Drift with a directory that IS CASE SENSITIVE EQUAL TO the specified string. All substring matching should use the DriftChangeSetCriteria.addFilterDriftPath(String). Setting this filter non-null will force BaseCriteria.setStrict(boolean) to true.

Specified by:
addFilterDriftDirectory in interface DriftChangeSetCriteria
Parameters:
filterDriftDirectory - A directory substring on which to filter

getFilterDriftDirectory

public String getFilterDriftDirectory()
Specified by:
getFilterDriftDirectory in interface DriftChangeSetCriteria
Returns:
The drift directory substring filter

fetchDrifts

public void fetchDrifts(boolean fetchDrifts)
Specified by:
fetchDrifts in interface DriftChangeSetCriteria
Parameters:
fetchDrifts - set to true if the drifts that make up the change set should be loaded and returned with the change set.

isFetchDrifts

public boolean isFetchDrifts()
Specified by:
isFetchDrifts in interface DriftChangeSetCriteria
Returns:
true if drifts are to be retrieved

addSortVersion

public void addSortVersion(PageOrdering sortVersion)
Description copied from interface: DriftChangeSetCriteria
Allows for sorting on change set version

Specified by:
addSortVersion in interface DriftChangeSetCriteria
Parameters:
sortVersion - Specifies whether the sort is ascending or descending

getSortVersion

public PageOrdering getSortVersion()
Specified by:
getSortVersion in interface DriftChangeSetCriteria
Returns:
The type of sort by version or null if no sorting has been specified.

getPageControlOverrides

public PageControl getPageControlOverrides()
Specified by:
getPageControlOverrides in interface BaseCriteria

setPageControl

public void setPageControl(PageControl pageControl)
Specified by:
setPageControl in interface BaseCriteria

setStrict

public void setStrict(boolean strict)
Specified by:
setStrict in interface BaseCriteria

isStrict

public boolean isStrict()
Specified by:
isStrict in interface BaseCriteria


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.