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

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

public final class FileSearchType
extends Object
implements Serializable

File search type.

See Also:
Serialized Form

Field Summary
static int BY_FILE
          Specifies search by file name
static int BY_FILE_TYPE
          Specifies search by file type
 
Method Summary
 boolean equals(Object obj)
          Determines if this object is equal to the specified object.
static FileSearchType getByFileType(FileType fileType)
          Create a FileSearchType to search for files of a specific type.
static FileSearchType getFiles(FileNamePattern pattern)
          Create a FileSearchType to search for files using file name pattern and file type.
 FileType getFileType()
          Returns the FileType defined for this search type.
 FileNamePattern getPattern()
          Returns the FileNamePattern defined for this search type.
 int getType()
          Returns the constant describing the file search type.
 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_FILE

public static final int BY_FILE
Specifies search by file name

See Also:
Constant Field Values

BY_FILE_TYPE

public static final int BY_FILE_TYPE
Specifies search by file type

See Also:
Constant Field Values
Method Detail

getType

public int getType()
Returns the constant describing the file search type.

Returns:
the file search type constant.

getFileType

public FileType getFileType()
Returns the FileType defined for this search type.

Returns:
the FileType defined for this search type.

getPattern

public FileNamePattern getPattern()
Returns the FileNamePattern defined for this search type.

Returns:
the FileNamePatttern defined for this search type.

getByFileType

public static FileSearchType getByFileType(FileType fileType)
Create a FileSearchType to search for files of a specific type.

Parameters:
fileType - all files of this type will be examined. This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.
Returns:
the FileNamePatttern defined for this search type.

getFiles

public static FileSearchType getFiles(FileNamePattern pattern)
Create a FileSearchType to search for files using file name pattern and file type.

Parameters:
pattern - The file name pattern which the search will begin This value is required and cannot be set to null. If it is specified as null the runtime exception APIArgumentException will be thrown.
Returns:
the FileNamePatttern defined for this search type.

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 hashode of this object.

equals

public boolean equals(Object obj)
Determines if this 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.