Example usage for com.amazonaws.services.route53.model RRType SOA

List of usage examples for com.amazonaws.services.route53.model RRType SOA

Introduction

In this page you can find the example usage for com.amazonaws.services.route53.model RRType SOA.

Prototype

RRType SOA

To view the source code for com.amazonaws.services.route53.model RRType SOA.

Click Source Link

Usage

From source file:org.ofbiz.tenant.amazonaws.util.AwsUtil.java

License:Apache License

/**
 * get resource record type//from w w  w  . ja  v  a  2s. c om
 * @param value
 * @return
 * @throws GeneralException
 */
public static RRType getRRType(String value) throws GeneralException {
    RRType rrType = null;
    if ("A".equals(value)) {
        rrType = RRType.A;
    } else if ("CNAME".equals(value)) {
        rrType = RRType.CNAME;
    } else if ("MX".equals(value)) {
        rrType = RRType.MX;
    } else if ("AAAA".equals(value)) {
        rrType = RRType.AAAA;
    } else if ("TXT".equals(value)) {
        rrType = RRType.TXT;
    } else if ("PTR".equals(value)) {
        rrType = RRType.PTR;
    } else if ("SRV".equals(value)) {
        rrType = RRType.SRV;
    } else if ("SPF".equals(value)) {
        rrType = RRType.SPF;
    } else if ("NS".equals(value)) {
        rrType = RRType.NS;
    } else if ("SOA".equals(value)) {
        rrType = RRType.SOA;
    } else {
        throw new GeneralException(
                "The type need to be one of: A, CNAME, MX, AAAA, TXT, PTR, SRV, SPF, NS, SOA");
    }
    return rrType;
}