org.easetech.easytest.loader
Enum LoaderType

java.lang.Object
  extended by java.lang.Enum<LoaderType>
      extended by org.easetech.easytest.loader.LoaderType
All Implemented Interfaces:
Serializable, Comparable<LoaderType>

public enum LoaderType
extends Enum<LoaderType>

An Enum identifying the type of loader to be used for loading the data. A loader type can identify a loader to be framework based loader(CSV , Excel or XML) or it can identify the loader to be user defined loader(CUSTOM). Note that a user can provide a loader whose loaderType is already supported by the framework and still choose to mark it CUSTOM. In such a scenario, the framework will use the Loader provided by the user to load the test data.


Enum Constant Summary
CSV
          Identifies that the type of file is a framework based CSV file.
CUSTOM
          Identifies that the type of file is a user defined custom type.
EXCEL
          Identifies that the type of file is a framework based EXCEL file.
NONE
          Identifies that the user has not specified any specific loader type.
XML
          Identifies that the type of file is a framework based XML file.
 
Method Summary
static LoaderType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LoaderType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CSV

public static final LoaderType CSV
Identifies that the type of file is a framework based CSV file. This file should support the structure as identified in CSVDataLoader


XML

public static final LoaderType XML
Identifies that the type of file is a framework based XML file. This is currently just a place holder and will be supported in future.


EXCEL

public static final LoaderType EXCEL
Identifies that the type of file is a framework based EXCEL file. This is currently just a place holder and will be supported in future.


CUSTOM

public static final LoaderType CUSTOM
Identifies that the type of file is a user defined custom type. This option is used in conjunction with DataLoader annotation.


NONE

public static final LoaderType NONE
Identifies that the user has not specified any specific loader type. The framework should identify the type of file from its extension. If the file type is any one of the available standard types(XML, Excel, XLS) appropriate loaders will be called. Else the framework will assume the file to be loaded by the custom loader. In such a case, a custom loader implementation should be provided as part of the DataLoader's loader attribute declaration.

Method Detail

values

public static LoaderType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (LoaderType c : LoaderType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LoaderType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2013. All Rights Reserved.