This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch restful in repository https://gitbox.apache.org/repos/asf/struts-site.git
commit 5679464ff08183d1de41450c08ca223c5e7d48de Author: Lukasz Lenart <lukaszlen...@apache.org> AuthorDate: Fri Dec 8 09:30:33 2017 +0100 Cleans up annotations --- source/core-developers/conversion-annotation.md | 33 ++++----------- .../core-developers/create-if-null-annotation.md | 29 +++---------- source/core-developers/element-annotation.md | 31 ++++---------- source/core-developers/key-annotation.md | 29 +++---------- source/core-developers/key-property-annotation.md | 30 ++++---------- .../core-developers/type-conversion-annotation.md | 48 +++++++--------------- 6 files changed, 48 insertions(+), 152 deletions(-) diff --git a/source/core-developers/conversion-annotation.md b/source/core-developers/conversion-annotation.md index 30206dc..142d67b 100644 --- a/source/core-developers/conversion-annotation.md +++ b/source/core-developers/conversion-annotation.md @@ -1,31 +1,21 @@ --- -layout: core-developers +layout: default title: Conversion Annotation +parent: + title: Annotations + url: annotations.html --- # Conversion Annotation - - -{% comment %}start snippet id=description|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.Conversion {% endcomment %} -<p> A marker annotation for type conversions at Type level. -</p> -{% comment %}end snippet id=description|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.Conversion {% endcomment %} +A marker annotation for type conversions at Type level. ## Usage - - -{% comment %}start snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.Conversion {% endcomment %} -<p> The Conversion annotation must be applied at Type level. -</p> -{% comment %}end snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.Conversion {% endcomment %} +The Conversion annotation must be applied at Type level. ## Parameters - - -{% comment %}start snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.Conversion {% endcomment %} <p> <table summary=""> <thead> <tr> @@ -45,14 +35,9 @@ title: Conversion Annotation </tbody> </table> </p> -{% comment %}end snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.Conversion {% endcomment %} ## Examples - - -{% comment %}start snippet id=example|javadoc=true|lang=java|url=com.opensymphony.xwork2.conversion.annotations.Conversion {% endcomment %} - ```java @Conversion( conversions = { @@ -73,10 +58,6 @@ title: Conversion Annotation } } - - ``` -{% comment %}end snippet id=example|javadoc=true|lang=java|url=com.opensymphony.xwork2.conversion.annotations.Conversion {% endcomment %} - -Check also [TypeConversion Annotation](type-conversion-annotation.html) for more examples! \ No newline at end of file +Check also [TypeConversion Annotation](type-conversion-annotation.html) for more examples! diff --git a/source/core-developers/create-if-null-annotation.md b/source/core-developers/create-if-null-annotation.md index d09371d..ceea03f 100644 --- a/source/core-developers/create-if-null-annotation.md +++ b/source/core-developers/create-if-null-annotation.md @@ -1,31 +1,21 @@ --- -layout: core-developers +layout: default title: CreateIfNull Annotation +parent: + title: Annotations + url: annotations.html --- # CreateIfNull Annotation - - -{% comment %}start snippet id=description|javadoc=true|url=com.opensymphony.xwork2.util.CreateIfNull {% endcomment %} -<p> <p>Sets the CreateIfNull for type conversion.</p> -</p> -{% comment %}end snippet id=description|javadoc=true|url=com.opensymphony.xwork2.util.CreateIfNull {% endcomment %} +Sets the CreateIfNull for type conversion. ## Usage - - -{% comment %}start snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.util.CreateIfNull {% endcomment %} -<p> <p>The CreateIfNull annotation must be applied at field or method level.</p> -</p> -{% comment %}end snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.util.CreateIfNull {% endcomment %} +The CreateIfNull annotation must be applied at field or method level. ## Parameters - - -{% comment %}start snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.util.CreateIfNull {% endcomment %} <p> <table summary=""> <thead> <tr> @@ -45,18 +35,11 @@ title: CreateIfNull Annotation </tbody> </table> </p> -{% comment %}end snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.util.CreateIfNull {% endcomment %} ## Examples - - -{% comment %}start snippet id=example|javadoc=true|lang=java|url=com.opensymphony.xwork2.util.CreateIfNull {% endcomment %} - ```java @CreateIfNull( value = true ) private List<User> users; ``` - -{% comment %}end snippet id=example|javadoc=true|lang=java|url=com.opensymphony.xwork2.util.CreateIfNull {% endcomment %} diff --git a/source/core-developers/element-annotation.md b/source/core-developers/element-annotation.md index c74d07b..de727db 100644 --- a/source/core-developers/element-annotation.md +++ b/source/core-developers/element-annotation.md @@ -1,31 +1,21 @@ --- -layout: core-developers +layout: default title: Element Annotation +parent: + title: Annotations + url: annotations.html --- # Element Annotation - - -{% comment %}start snippet id=description|javadoc=true|url=com.opensymphony.xwork2.util.Element {% endcomment %} -<p> <p>Sets the Element for type conversion.</p> -</p> -{% comment %}end snippet id=description|javadoc=true|url=com.opensymphony.xwork2.util.Element {% endcomment %} +Sets the Element for type conversion. ## Usage - - -{% comment %}start snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.util.Element {% endcomment %} -<p> <p>The Element annotation must be applied at field or method level.</p> -</p> -{% comment %}end snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.util.Element {% endcomment %} +The Element annotation must be applied at field or method level. ## Parameters - - -{% comment %}start snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.util.Element {% endcomment %} <p> <table summary=""> <thead> <tr> @@ -45,19 +35,14 @@ title: Element Annotation </tbody> </table> </p> -{% comment %}end snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.util.Element {% endcomment %} ## Examples - - -~~~~~~~ - +```java // The key property for User objects within the users collection is the <code>userName</code> attribute. @Element( value = com.acme.User.class ) private Map userMap; @Element( value = com.acme.User.class ) public List userList; - -~~~~~~~ +``` diff --git a/source/core-developers/key-annotation.md b/source/core-developers/key-annotation.md index 7933c38..557b9ca 100644 --- a/source/core-developers/key-annotation.md +++ b/source/core-developers/key-annotation.md @@ -1,31 +1,21 @@ --- -layout: core-developers +layout: default title: Key Annotation +parent: + title: Annotations + url: annotations.html --- # Key Annotation - - -{% comment %}start snippet id=description|javadoc=true|url=com.opensymphony.xwork2.util.Key {% endcomment %} -<p> <p>Sets the Key for type conversion.</p> -</p> -{% comment %}end snippet id=description|javadoc=true|url=com.opensymphony.xwork2.util.Key {% endcomment %} +Sets the Key for type conversion. ## Usage - - -{% comment %}start snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.util.Key {% endcomment %} -<p> <p>The Key annotation must be applied at field or method level.</p> -</p> -{% comment %}end snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.util.Key {% endcomment %} +The Key annotation must be applied at field or method level. ## Parameters - - -{% comment %}start snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.util.Key {% endcomment %} <p> <table summary=""> <thead> <tr> @@ -45,19 +35,12 @@ title: Key Annotation </tbody> </table> </p> -{% comment %}end snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.util.Key {% endcomment %} ## Examples - - -{% comment %}start snippet id=example|javadoc=true|lang=java|url=com.opensymphony.xwork2.util.Key {% endcomment %} - ```java // The key property for User objects within the users collection is the <code>userName</code> attribute. @Key( value = java.lang.Long.class ) private Map<Long, User> userMap; ``` - -{% comment %}end snippet id=example|javadoc=true|lang=java|url=com.opensymphony.xwork2.util.Key {% endcomment %} diff --git a/source/core-developers/key-property-annotation.md b/source/core-developers/key-property-annotation.md index cb2e032..a3208d7 100644 --- a/source/core-developers/key-property-annotation.md +++ b/source/core-developers/key-property-annotation.md @@ -1,32 +1,23 @@ --- -layout: core-developers +layout: default title: KeyProperty Annotation +parent: + title: Annotations + url: annotations.html --- # KeyProperty Annotation - - -{% comment %}start snippet id=description|javadoc=true|url=com.opensymphony.xwork2.util.KeyProperty {% endcomment %} -<p> <p>Sets the KeyProperty for type conversion.</p> -</p> -{% comment %}end snippet id=description|javadoc=true|url=com.opensymphony.xwork2.util.KeyProperty {% endcomment %} +Sets the KeyProperty for type conversion. ## Usage +The KeyProperty annotation must be applied at field or method level. - -{% comment %}start snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.util.KeyProperty {% endcomment %} -<p> <p>The KeyProperty annotation must be applied at field or method level.</p> - <p>This annotation should be used with Generic types, if the key property of the key element needs to be specified.</p> -</p> -{% comment %}end snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.util.KeyProperty {% endcomment %} +This annotation should be used with Generic types, if the key property of the key element needs to be specified. ## Parameters - - -{% comment %}start snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.util.KeyProperty {% endcomment %} <p> <table summary=""> <thead> <tr> @@ -46,19 +37,12 @@ title: KeyProperty Annotation </tbody> </table> </p> -{% comment %}end snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.util.KeyProperty {% endcomment %} ## Examples - - -{% comment %}start snippet id=example|javadoc=true|lang=java|url=com.opensymphony.xwork2.util.KeyProperty {% endcomment %} - ```java // The key property for User objects within the users collection is the <code>userName</code> attribute. @KeyProperty( value = "userName" ) protected List<User> users = null; ``` - -{% comment %}end snippet id=example|javadoc=true|lang=java|url=com.opensymphony.xwork2.util.KeyProperty {% endcomment %} diff --git a/source/core-developers/type-conversion-annotation.md b/source/core-developers/type-conversion-annotation.md index 295b57e..76c3987 100644 --- a/source/core-developers/type-conversion-annotation.md +++ b/source/core-developers/type-conversion-annotation.md @@ -1,44 +1,32 @@ --- -layout: core-developers +layout: default title: TypeConversion Annotation +parent: + title: Annotations + url: annotations.html --- # TypeConversion Annotation +This annotation is used for class and application wide conversion rules. +- Class wide conversion: -{% comment %}start snippet id=description|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.TypeConversion {% endcomment %} -<p> <p>This annotation is used for class and application wide conversion rules.</p> + The conversion rules will be assembled in a file called `XXXAction-conversion.properties` within the same package + as the related action class. + Set type to: `type = ConversionType.CLASS` - <p> - Class wide conversion:<br> - The conversion rules will be assembled in a file called <code>XXXAction-conversion.properties</code> - within the same package as the related action class. - Set type to: <code>type = ConversionType.CLASS</code> - </p> - - <p> - Application wide conversion:<br> - The conversion rules will be assembled within the <code>xwork-conversion.properties</code> file within the classpath root. - Set type to: <code>type = ConversionType.APPLICATION</code> - </p> -</p> -{% comment %}end snippet id=description|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.TypeConversion {% endcomment %} +- Application wide conversion: + + The conversion rules will be assembled within the `xwork-conversion.properties` file within the classpath root. + Set type to: `type = ConversionType.APPLICATION` ## Usage - - -{% comment %}start snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.TypeConversion {% endcomment %} -<p> <p>The TypeConversion annotation can be applied at property and method level.</p> -</p> -{% comment %}end snippet id=usage|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.TypeConversion {% endcomment %} +The TypeConversion annotation can be applied at property and method level. ## Parameters - - -{% comment %}start snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.TypeConversion {% endcomment %} <p> <table summary=""> <thead> <tr> @@ -89,14 +77,9 @@ title: TypeConversion Annotation </table> </p> -{% comment %}end snippet id=parameters|javadoc=true|url=com.opensymphony.xwork2.conversion.annotations.TypeConversion {% endcomment %} ## Examples - - -{% comment %}start snippet id=example|javadoc=true|lang=java|url=com.opensymphony.xwork2.conversion.annotations.TypeConversion {% endcomment %} - ```java @Conversion() public class ConversionAction implements Action { @@ -133,7 +116,4 @@ title: TypeConversion Annotation return SUCCESS; } } - ``` - -{% comment %}end snippet id=example|javadoc=true|lang=java|url=com.opensymphony.xwork2.conversion.annotations.TypeConversion {% endcomment %} -- To stop receiving notification emails like this one, please contact "commits@struts.apache.org" <commits@struts.apache.org>.