Commit 826a2c01fbe15f329d1c4bcdebca5a76ac664056
1 parent
66a1a808
Exists in
master
Adicionado o javadoc das classes da extensão JPA.
Showing
13 changed files
with
95 additions
and
2 deletions
Show diff stats
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/annotation/NextView.java
@@ -47,8 +47,12 @@ import java.lang.annotation.Inherited; | @@ -47,8 +47,12 @@ import java.lang.annotation.Inherited; | ||
47 | import java.lang.annotation.Retention; | 47 | import java.lang.annotation.Retention; |
48 | import java.lang.annotation.Target; | 48 | import java.lang.annotation.Target; |
49 | 49 | ||
50 | +/** | ||
51 | + * Used to indicate which page to redirect after the execution of some method. | ||
52 | + * | ||
53 | + * @author SERPRO | ||
54 | + */ | ||
50 | 55 | ||
51 | -// TODO Este qualifier é realmente necessário? Verificar também na anotação PreviousView. | ||
52 | @Inherited | 56 | @Inherited |
53 | @Documented | 57 | @Documented |
54 | @Target({ TYPE, FIELD, METHOD, PARAMETER }) | 58 | @Target({ TYPE, FIELD, METHOD, PARAMETER }) |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/annotation/PreviousView.java
@@ -47,6 +47,11 @@ import java.lang.annotation.Inherited; | @@ -47,6 +47,11 @@ import java.lang.annotation.Inherited; | ||
47 | import java.lang.annotation.Retention; | 47 | import java.lang.annotation.Retention; |
48 | import java.lang.annotation.Target; | 48 | import java.lang.annotation.Target; |
49 | 49 | ||
50 | +/** | ||
51 | + * Used to indicate which page to return after the execution of some method. | ||
52 | + * | ||
53 | + * @author SERPRO | ||
54 | + */ | ||
50 | @Inherited | 55 | @Inherited |
51 | @Documented | 56 | @Documented |
52 | @Target({ TYPE, FIELD, METHOD, PARAMETER }) | 57 | @Target({ TYPE, FIELD, METHOD, PARAMETER }) |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/AbstractEditPageBean.java
@@ -48,6 +48,17 @@ import br.gov.frameworkdemoiselle.util.Parameter; | @@ -48,6 +48,17 @@ import br.gov.frameworkdemoiselle.util.Parameter; | ||
48 | import br.gov.frameworkdemoiselle.util.Reflections; | 48 | import br.gov.frameworkdemoiselle.util.Reflections; |
49 | import br.gov.frameworkdemoiselle.util.ResourceBundle; | 49 | import br.gov.frameworkdemoiselle.util.ResourceBundle; |
50 | 50 | ||
51 | +/** | ||
52 | + * Template Managed Bean class that implements the methods defined by the interface EditPageBean. | ||
53 | + * | ||
54 | + * @param <T> | ||
55 | + * bean object type | ||
56 | + * @param <I> | ||
57 | + * bean id type | ||
58 | + * | ||
59 | + * @author SERPRO | ||
60 | + * @see EditPageBean | ||
61 | + */ | ||
51 | public abstract class AbstractEditPageBean<T, I> extends AbstractPageBean implements EditPageBean<T> { | 62 | public abstract class AbstractEditPageBean<T, I> extends AbstractPageBean implements EditPageBean<T> { |
52 | 63 | ||
53 | private static final long serialVersionUID = 1L; | 64 | private static final long serialVersionUID = 1L; |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/AbstractListPageBean.java
@@ -49,7 +49,17 @@ import javax.inject.Inject; | @@ -49,7 +49,17 @@ import javax.inject.Inject; | ||
49 | import br.gov.frameworkdemoiselle.pagination.Pagination; | 49 | import br.gov.frameworkdemoiselle.pagination.Pagination; |
50 | import br.gov.frameworkdemoiselle.pagination.PaginationContext; | 50 | import br.gov.frameworkdemoiselle.pagination.PaginationContext; |
51 | import br.gov.frameworkdemoiselle.util.Reflections; | 51 | import br.gov.frameworkdemoiselle.util.Reflections; |
52 | - | 52 | +/** |
53 | + * Template Managed Bean class that implements the methods defined by the interface ListPageBean. | ||
54 | + * | ||
55 | + * @param <T> | ||
56 | + * bean object type | ||
57 | + * @param <I> | ||
58 | + * bean id type | ||
59 | + * | ||
60 | + * @author SERPRO | ||
61 | + * @see ListPageBean | ||
62 | + */ | ||
53 | public abstract class AbstractListPageBean<T, I> extends AbstractPageBean implements ListPageBean<T, I> { | 63 | public abstract class AbstractListPageBean<T, I> extends AbstractPageBean implements ListPageBean<T, I> { |
54 | 64 | ||
55 | private static final long serialVersionUID = 1L; | 65 | private static final long serialVersionUID = 1L; |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/AbstractPageBean.java
@@ -42,6 +42,12 @@ import javax.inject.Inject; | @@ -42,6 +42,12 @@ import javax.inject.Inject; | ||
42 | import br.gov.frameworkdemoiselle.annotation.NextView; | 42 | import br.gov.frameworkdemoiselle.annotation.NextView; |
43 | import br.gov.frameworkdemoiselle.annotation.PreviousView; | 43 | import br.gov.frameworkdemoiselle.annotation.PreviousView; |
44 | 44 | ||
45 | +/** | ||
46 | + * Template Managed Bean class that implements the methods defined by the interface PageBean. | ||
47 | + * | ||
48 | + * @author SERPRO | ||
49 | + * @see PageBean | ||
50 | + */ | ||
45 | public abstract class AbstractPageBean implements PageBean { | 51 | public abstract class AbstractPageBean implements PageBean { |
46 | 52 | ||
47 | private static final long serialVersionUID = 1L; | 53 | private static final long serialVersionUID = 1L; |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/EditPageBean.java
@@ -36,6 +36,15 @@ | @@ -36,6 +36,15 @@ | ||
36 | */ | 36 | */ |
37 | package br.gov.frameworkdemoiselle.template; | 37 | package br.gov.frameworkdemoiselle.template; |
38 | 38 | ||
39 | +/** | ||
40 | + * Interface that defines a contract of facilities that a page with funcionalities of insert, edit and delete could implement. | ||
41 | + * | ||
42 | + * @param <T> | ||
43 | + * bean object type | ||
44 | + * | ||
45 | + * @author SERPRO | ||
46 | + * | ||
47 | + */ | ||
39 | public interface EditPageBean<T> extends PageBean { | 48 | public interface EditPageBean<T> extends PageBean { |
40 | 49 | ||
41 | String delete(); | 50 | String delete(); |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/ListPageBean.java
@@ -41,6 +41,17 @@ import java.util.Map; | @@ -41,6 +41,17 @@ import java.util.Map; | ||
41 | 41 | ||
42 | import javax.faces.model.DataModel; | 42 | import javax.faces.model.DataModel; |
43 | 43 | ||
44 | +/** | ||
45 | + * Interface that defines a contract of facilities that a page with the funcionality of list could implement. | ||
46 | + * | ||
47 | + * @param <T> | ||
48 | + * bean object type | ||
49 | + * @param <I> | ||
50 | + * bean id type | ||
51 | + * | ||
52 | + * @author SERPRO | ||
53 | + * | ||
54 | + */ | ||
44 | public interface ListPageBean<T, I> extends PageBean { | 55 | public interface ListPageBean<T, I> extends PageBean { |
45 | 56 | ||
46 | DataModel<T> getDataModel(); | 57 | DataModel<T> getDataModel(); |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/PageBean.java
@@ -38,6 +38,12 @@ package br.gov.frameworkdemoiselle.template; | @@ -38,6 +38,12 @@ package br.gov.frameworkdemoiselle.template; | ||
38 | 38 | ||
39 | import java.io.Serializable; | 39 | import java.io.Serializable; |
40 | 40 | ||
41 | +/** | ||
42 | + * Interface that defines a contract of facilities that all pages could implement. | ||
43 | + * | ||
44 | + * @author SERPRO | ||
45 | + * | ||
46 | + */ | ||
41 | public interface PageBean extends Serializable { | 47 | public interface PageBean extends Serializable { |
42 | 48 | ||
43 | String getCurrentView(); | 49 | String getCurrentView(); |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/Faces.java
@@ -55,6 +55,11 @@ import br.gov.frameworkdemoiselle.exception.ApplicationException; | @@ -55,6 +55,11 @@ import br.gov.frameworkdemoiselle.exception.ApplicationException; | ||
55 | import br.gov.frameworkdemoiselle.message.Message; | 55 | import br.gov.frameworkdemoiselle.message.Message; |
56 | import br.gov.frameworkdemoiselle.message.SeverityType; | 56 | import br.gov.frameworkdemoiselle.message.SeverityType; |
57 | 57 | ||
58 | +/** | ||
59 | + * Utility class to insert messages in the FacesContext. | ||
60 | + * | ||
61 | + * @author SERPRO | ||
62 | + * */ | ||
58 | public class Faces { | 63 | public class Faces { |
59 | 64 | ||
60 | private Faces() { | 65 | private Faces() { |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/Locales.java
@@ -43,6 +43,11 @@ import javax.faces.context.FacesContext; | @@ -43,6 +43,11 @@ import javax.faces.context.FacesContext; | ||
43 | import javax.inject.Inject; | 43 | import javax.inject.Inject; |
44 | import javax.inject.Named; | 44 | import javax.inject.Named; |
45 | 45 | ||
46 | +/** | ||
47 | + * Utility class to configure the Locale. | ||
48 | + * | ||
49 | + * @author SERPRO | ||
50 | + * */ | ||
46 | @Named | 51 | @Named |
47 | public class Locales implements Serializable { | 52 | public class Locales implements Serializable { |
48 | 53 |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/PageNotFoundException.java
@@ -38,6 +38,12 @@ package br.gov.frameworkdemoiselle.util; | @@ -38,6 +38,12 @@ package br.gov.frameworkdemoiselle.util; | ||
38 | 38 | ||
39 | import br.gov.frameworkdemoiselle.DemoiselleException; | 39 | import br.gov.frameworkdemoiselle.DemoiselleException; |
40 | 40 | ||
41 | +/** | ||
42 | + * | ||
43 | + * Utility class that serves as the exception to be thrown when a page is not found. | ||
44 | + * | ||
45 | + * @author SERPRO | ||
46 | + * */ | ||
41 | public class PageNotFoundException extends DemoiselleException { | 47 | public class PageNotFoundException extends DemoiselleException { |
42 | 48 | ||
43 | private static final long serialVersionUID = 1L; | 49 | private static final long serialVersionUID = 1L; |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/Parameter.java
@@ -40,6 +40,15 @@ import java.io.Serializable; | @@ -40,6 +40,15 @@ import java.io.Serializable; | ||
40 | 40 | ||
41 | import javax.faces.convert.Converter; | 41 | import javax.faces.convert.Converter; |
42 | 42 | ||
43 | +/** | ||
44 | + * | ||
45 | + * Interface that defines the methods to be implemented to get and set values on a parameter. | ||
46 | + * | ||
47 | + * @param <T> | ||
48 | + * bean object type | ||
49 | + * | ||
50 | + * @author SERPRO | ||
51 | + * */ | ||
43 | public interface Parameter<T extends Serializable> { | 52 | public interface Parameter<T extends Serializable> { |
44 | 53 | ||
45 | void setValue(T value); | 54 | void setValue(T value); |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/Redirector.java
@@ -47,6 +47,12 @@ import javax.faces.FacesException; | @@ -47,6 +47,12 @@ import javax.faces.FacesException; | ||
47 | import javax.faces.application.ViewHandler; | 47 | import javax.faces.application.ViewHandler; |
48 | import javax.faces.context.FacesContext; | 48 | import javax.faces.context.FacesContext; |
49 | 49 | ||
50 | +/** | ||
51 | + * | ||
52 | + * Utility class to redirect determined page to another one. | ||
53 | + * | ||
54 | + * @author SERPRO | ||
55 | + * */ | ||
50 | public class Redirector { | 56 | public class Redirector { |
51 | 57 | ||
52 | private Redirector() { | 58 | private Redirector() { |