org.codehaus.enunciate.modules.gwt.gwt-fault.fmt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of enunciate-gwt Show documentation
Show all versions of enunciate-gwt Show documentation
The Enunciate GWT module generates the artifacts to support the GWT application.
[#ftl]
[#--template for the client-side web fault.--]
[@file name=(fault.simpleName + ".java") package=packageFor(fault) charset="utf-8"]
/**
* ${(generatedCodeLicense!"")?replace("\n", "\n * ")}
*
* Generated by Enunciate.
*/
package ${packageFor(fault)};
/**
* ${fault.docComment?default("(no documentation provided)")?chop_linebreak?replace("\n", "\n * ")}
*/
public class ${fault.simpleName} extends java.lang.Exception {
public ${fault.simpleName}() {
}
public ${fault.simpleName}(String message) {
super(message);
}
[#if !fault.implicitSchemaElement]
[#assign beanfqn=classnameFor(fault.explicitFaultBeanType)/]
private ${beanfqn} faultInfo;
/**
* The fault info for this exception.
*/
public ${beanfqn} getFaultInfo() {
return this.faultInfo;
}
/**
* The fault info for this exception.
*/
public void setFaultInfo(${beanfqn} faultInfo) {
this.faultInfo = faultInfo;
}
[#else]
[#list fault.childElements as childElement]
[#assign element=childElement.property/]
private ${classnameFor(childElement)} ${element.simpleName};
/**
* ${(element.javaDoc.return!element.docValue!"(no documentation provided)")?chop_linebreak?replace("\n", "\n * ")}
*/
public ${classnameFor(childElement)} get${element.simpleName?cap_first}() {
return this.${element.simpleName};
}
/**
* ${(element.javaDoc.return!element.docValue!"(no documentation provided)")?chop_linebreak?replace("\n", "\n * ")}
*/
public void set${element.simpleName?cap_first}(${classnameFor(childElement)} ${element.simpleName}) {
this.${element.simpleName} = ${element.simpleName};
}
[/#list]
[/#if]
}
[/@file]