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

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

Introduction

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

Prototype

RRType PTR

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

Click Source Link

Usage

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

License:Apache License

/**
 * get resource record type/*from  w ww.j  av a  2  s  .  c  o  m*/
 * @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;
}