本文整理了Java中org.jclouds.ultradns.ws.binders.ZoneAndResourceRecordToXML.toXML()
方法的一些代码示例,展示了ZoneAndResourceRecordToXML.toXML()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneAndResourceRecordToXML.toXML()
方法的具体详情如下:
包路径:org.jclouds.ultradns.ws.binders.ZoneAndResourceRecordToXML
类名称:ZoneAndResourceRecordToXML
方法名:toXML
暂无
代码示例来源:origin: jclouds/legacy-jclouds
@SuppressWarnings("unchecked")
@Override
public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
String zoneName = postParams.get("zoneName").toString();
ResourceRecord record = ResourceRecord.class.cast(postParams.get("resourceRecord"));
String xml = toXML(zoneName, record);
Optional<?> guid = Optional.fromNullable(postParams.get("guid"));
if (guid.isPresent()) {
xml = update(guid.get(), xml);
}
return (R) request.toBuilder().payload(xml).build();
}
代码示例来源:origin: apache/jclouds
@SuppressWarnings("unchecked")
@Override
public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
String zoneName = postParams.get("zoneName").toString();
ResourceRecord record = ResourceRecord.class.cast(postParams.get("resourceRecord"));
String xml = toXML(zoneName, record);
Optional<?> guid = Optional.fromNullable(postParams.get("guid"));
if (guid.isPresent()) {
xml = update(guid.get(), xml);
}
return (R) request.toBuilder().payload(xml).build();
}
代码示例来源:origin: com.amysta.jclouds.provider/ultradns-ws
@SuppressWarnings("unchecked")
@Override
public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
String zoneName = postParams.get("zoneName").toString();
ResourceRecord record = ResourceRecord.class.cast(postParams.get("resourceRecord"));
String xml = toXML(zoneName, record);
Optional<?> guid = Optional.fromNullable(postParams.get("guid"));
if (guid.isPresent()) {
xml = update(guid.get(), xml);
}
return (R) request.toBuilder().payload(xml).build();
}
代码示例来源:origin: org.apache.jclouds.provider/ultradns-ws
@SuppressWarnings("unchecked")
@Override
public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
String zoneName = postParams.get("zoneName").toString();
ResourceRecord record = ResourceRecord.class.cast(postParams.get("resourceRecord"));
String xml = toXML(zoneName, record);
Optional<?> guid = Optional.fromNullable(postParams.get("guid"));
if (guid.isPresent()) {
xml = update(guid.get(), xml);
}
return (R) request.toBuilder().payload(xml).build();
}
代码示例来源:origin: io.cloudsoft.jclouds.provider/ultradns-ws
@SuppressWarnings("unchecked")
@Override
public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
String zoneName = postParams.get("zoneName").toString();
ResourceRecord record = ResourceRecord.class.cast(postParams.get("resourceRecord"));
String xml = toXML(zoneName, record);
Optional<?> guid = Optional.fromNullable(postParams.get("guid"));
if (guid.isPresent()) {
xml = update(guid.get(), xml);
}
return (R) request.toBuilder().payload(xml).build();
}
代码示例来源:origin: jclouds/legacy-jclouds
public void testA() {
assertEquals(ZoneAndResourceRecordToXML.toXML("jclouds.org.", ResourceRecord.rrBuilder()
.name("www.jclouds.org.")
.type(1)
.ttl(3600)
.rdata("1.1.1.1").build()), A);
}
代码示例来源:origin: apache/jclouds
public void testA() {
assertEquals(ZoneAndResourceRecordToXML.toXML("jclouds.org.", ResourceRecord.rrBuilder()
.name("www.jclouds.org.")
.type(1)
.ttl(3600)
.rdata("1.1.1.1").build()), A);
}
代码示例来源:origin: jclouds/legacy-jclouds
public void testMX() {
assertEquals(ZoneAndResourceRecordToXML.toXML("jclouds.org.", ResourceRecord.rrBuilder()
.name("mail.jclouds.org.")
.type(15)
.ttl(1800)
.infoValue(10)
.infoValue("maileast.jclouds.org.").build()), MX);
}
代码示例来源:origin: apache/jclouds
public void testMX() {
assertEquals(ZoneAndResourceRecordToXML.toXML("jclouds.org.", ResourceRecord.rrBuilder()
.name("mail.jclouds.org.")
.type(15)
.ttl(1800)
.infoValue(10)
.infoValue("maileast.jclouds.org.").build()), MX);
}
内容来源于网络,如有侵权,请联系作者删除!