com.cisco.provisioning.cpe.api.search
Class DeviceSearchType

java.lang.Object
  extended by com.cisco.provisioning.cpe.api.search.DeviceSearchType
All Implemented Interfaces:
Serializable

public class DeviceSearchType
extends Object
implements Serializable

Defines search criteria for searching devices.

See Also:
IPDevice.searchDevice(DeviceSearchType, SearchBookmark , int), Serialized Form

Field Summary
static int BY_CLASS_OF_SERVICE
          Specifies this is a search by class of service
static int BY_DEVICE_TYPE
          Specifies this is a search by DeviceType
static int BY_DHCP_CRITERIA
          Specifies this is a search by DHCP criteria
static int BY_NODE
          Specifies this is a search by node
static int BY_PROV_GROUP
          Specifies this is a search by provisioning group
static int GET_DEVICES
          Internal search engine will use this
 
Method Summary
 boolean equals(Object obj)
          Determines if this DeviceSearchType object is equal to the specified object.
 AssociationType getAssociationType()
          Return the AssociationType enum for this search type if the search type is DeviceSearchType.BY_DHCP_CRITERIA DeviceSearchType.BY_CLASS_OF_SERVICE Otherwise, it will return null.
static DeviceSearchType getByClassOfService(ClassOfServiceName cos, AssociationType type, ReturnParameters returnParameters)
          Creates a DeviceSearchType which matches devices that are related to a class of service via a specified type of association
static DeviceSearchType getByDeviceType(DeviceType deviceType, ReturnParameters returnParameters)
          Creates a DeviceSearchType which macthes devices with the specified deviceType.
static DeviceSearchType getByDhcpCriteria(DhcpCriteriaName dhcpCriteria, AssociationType type, ReturnParameters returnParameters)
          Creates a DeviceSearchType which matches devices that have the dhcp criteria name or a specific device type specified by the DhcpCriteriaName parameter.
static DeviceSearchType getByNode(NodeName nodeID, ReturnParameters returnParameters)
          Create a DeviceSearchType which matches devices based on their association with the node specified by nodeID.
static DeviceSearchType getByProvGroup(String provGroupName, ReturnParameters returnParameters)
          Creates a DeviceIDSearchType which matches devices based on their association with the Provisiong group specified by provGroupName parameter.
 ClassOfServiceName getClassOfService()
          Returns the ClassOfServiceName object for this search type if the type is DeviceSearchType.BY_CLASS_OF_SERVICE Otherwise, it will return null.
 DeviceIDPattern getDeviceIDPattern()
          Returns the DeviceIDPattern object for this search type if the type is DeviceSearchType.GET_DEVICES Otherwise, it will return null.
static DeviceSearchType getDevices(DeviceIDPattern deviceIDPattern, ReturnParameters returnParameters)
          Create a DeviceSearchType which searches devices with a Device ID pattern.
 DeviceType getDeviceType()
          Returns a DeviceType that satisfy this search if the type is DeviceSearchType.BY_DEVICE_TYPE Otherwise, it will return null.
 DhcpCriteriaName getDHCPCriteria()
          Returns the DhcpCriteriaName object for this search type if the type is DeviceSearchType.BY_DHCP_CRITERIA Otherwise, it will return null.
 NodeName getNodeName()
          Return the node name object.
 String getProvId()
          Return the provisioning group name.
 ReturnParameters getReturnParameters()
          Return the ReturnParameters object for this search type.
 int getType()
          Returns the type constant that describes the type of this search
 int hashCode()
          The hash code of this object.
 String toString()
          Returns a String description of this search type
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BY_DEVICE_TYPE

public static final int BY_DEVICE_TYPE
Specifies this is a search by DeviceType

See Also:
Constant Field Values

BY_CLASS_OF_SERVICE

public static final int BY_CLASS_OF_SERVICE
Specifies this is a search by class of service

See Also:
Constant Field Values

BY_DHCP_CRITERIA

public static final int BY_DHCP_CRITERIA
Specifies this is a search by DHCP criteria

See Also:
Constant Field Values

BY_NODE

public static final int BY_NODE
Specifies this is a search by node

See Also:
Constant Field Values

BY_PROV_GROUP

public static final int BY_PROV_GROUP
Specifies this is a search by provisioning group

See Also:
Constant Field Values

GET_DEVICES

public static final int GET_DEVICES
Internal search engine will use this

See Also:
Constant Field Values
Method Detail

getType

public int getType()
Returns the type constant that describes the type of this search

Returns:
the type constant that describes the type of this search

getNodeName

public NodeName getNodeName()
Return the node name object.

Returns:
the NodeName object NodeName

getProvId

public String getProvId()
Return the provisioning group name.

Returns:
the provisioning group name.

getDeviceType

public DeviceType getDeviceType()
Returns a DeviceType that satisfy this search if the type is DeviceSearchType.BY_DEVICE_TYPE Otherwise, it will return null.

Returns:
a DeviceType that satisfy this search if the type is DeviceSearchType.BY_DEVICE_TYPE. Otherwise, null is returned.

getDeviceIDPattern

public DeviceIDPattern getDeviceIDPattern()
Returns the DeviceIDPattern object for this search type if the type is DeviceSearchType.GET_DEVICES Otherwise, it will return null.

Returns:
the DeviceIDPattern object for this search type if the type is DeviceSearchType.GET_DEVICES. Otherwise, null is returned.

getClassOfService

public ClassOfServiceName getClassOfService()
Returns the ClassOfServiceName object for this search type if the type is DeviceSearchType.BY_CLASS_OF_SERVICE Otherwise, it will return null.

Returns:
the class ClassOfServiceName object for this search type if the type is DeviceSearchType.BY_CLASS_OF_SERVICE. Otherwise, null is returned.

getDHCPCriteria

public DhcpCriteriaName getDHCPCriteria()
Returns the DhcpCriteriaName object for this search type if the type is DeviceSearchType.BY_DHCP_CRITERIA Otherwise, it will return null.

Returns:
the DhcpCriteriaName object for this search type if the type is DeviceSearchType.BY_DHCP_CRITERIA. Otherwise, null is returned.

getAssociationType

public AssociationType getAssociationType()
Return the AssociationType enum for this search type if the search type is DeviceSearchType.BY_DHCP_CRITERIA DeviceSearchType.BY_CLASS_OF_SERVICE Otherwise, it will return null.

Returns:
The AssociationType for this searchtype.

getReturnParameters

public ReturnParameters getReturnParameters()
Return the ReturnParameters object for this search type.

Returns:
ReturnParameters.

getByDeviceType

public static DeviceSearchType getByDeviceType(DeviceType deviceType,
                                               ReturnParameters returnParameters)
Creates a DeviceSearchType which macthes devices with the specified deviceType.

Parameters:
deviceType - The specific DeviceType to qualify the search on. This value is required and and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.
returnParameters - Specifies the returnParameters to customize the result set coming back from this query ReturnParameters This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.

getDevices

public static DeviceSearchType getDevices(DeviceIDPattern deviceIDPattern,
                                          ReturnParameters returnParameters)
Create a DeviceSearchType which searches devices with a Device ID pattern.

Parameters:
deviceIDPattern - the pattern against which DeviceIDs are matched. This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.
returnParameters - Specifies the returnParameters to customize the result set coming back from this query ReturnParameters This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.

getByNode

public static DeviceSearchType getByNode(NodeName nodeID,
                                         ReturnParameters returnParameters)
Create a DeviceSearchType which matches devices based on their association with the node specified by nodeID.

Parameters:
nodeID - The NodeNameobject representing the node being queried. This value is required and can not set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.
returnParameters - Specifies the returnParameters to customize the result set coming back from this query ReturnParameters This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.

getByProvGroup

public static DeviceSearchType getByProvGroup(String provGroupName,
                                              ReturnParameters returnParameters)
Creates a DeviceIDSearchType which matches devices based on their association with the Provisiong group specified by provGroupName parameter.

Parameters:
provGroupName - The name of the Provisioning Group over which the search will be performed. This value is rrequired and cannot set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.
returnParameters - Specifies the returnParameters to customize the result set coming back from this query ReturnParameters This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.

toString

public String toString()
Returns a String description of this search type

Overrides:
toString in class Object
Returns:
a String description of this search type

hashCode

public int hashCode()
The hash code of this object. See Object.hashCode for more information

Overrides:
hashCode in class Object
Returns:
The hascode of this object

equals

public boolean equals(Object obj)
Determines if this DeviceSearchType object is equal to the specified object.

Overrides:
equals in class Object
Returns:
true if the specified object is equal to this object. false if the objects are not equal.

getByClassOfService

public static DeviceSearchType getByClassOfService(ClassOfServiceName cos,
                                                   AssociationType type,
                                                   ReturnParameters returnParameters)
Creates a DeviceSearchType which matches devices that are related to a class of service via a specified type of association

Parameters:
cos - Specifies the class of service name or a specific device type which the search will be performed. This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.
type - Specifies the type of association of device to class of service for which the search will be performed. This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.
returnParameters - Specifies the returnParameters to customize the result set coming back from this query ReturnParameters This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.

getByDhcpCriteria

public static DeviceSearchType getByDhcpCriteria(DhcpCriteriaName dhcpCriteria,
                                                 AssociationType type,
                                                 ReturnParameters returnParameters)
Creates a DeviceSearchType which matches devices that have the dhcp criteria name or a specific device type specified by the DhcpCriteriaName parameter.

Parameters:
dhcpCriteria - Specifies the dhcp criteria name or a specific device type which the search will be performed. This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.
type - Specifies the type of dhcp criteria associated with the device over which the search will be performed. This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.
returnParameters - Specifies the returnParameters to customize the result set coming back from this query ReturnParameters This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.