Skip to content

Commit

Permalink
WW-4531- Improve javadoc to be compatible with more strict JDK8 javad…
Browse files Browse the repository at this point in the history
…oc standard
  • Loading branch information
jogep committed Jul 24, 2015
1 parent 98d7756 commit 775c82a
Show file tree
Hide file tree
Showing 297 changed files with 9,840 additions and 7,938 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ public ActionProxy getProxy() {
/**
* Get the XWork chain history.
* The stack is a list of <code>namespace/action!method</code> keys.
*
* @return the chain history as string list
*/
public static LinkedList<String> getChainHistory() {
LinkedList<String> chainHistory = (LinkedList<String>) ActionContext.getContext().get(CHAIN_HISTORY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* this is you don't need to worry about a user specific action context, you just get it:
* </p>
*
* <ul><code>ActionContext context = ActionContext.getContext();</code></ul>
* <code>ActionContext context = ActionContext.getContext();</code>
*
* <p>
* Finally, because of the thread local usage you don't need to worry about making your actions thread safe.
Expand Down
107 changes: 54 additions & 53 deletions core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* javadoc for each methods.
*
* @author tmjee
* @version $Date$ $Id$
*/
public class CompositeTextProvider implements TextProvider {

Expand All @@ -24,7 +23,7 @@ public class CompositeTextProvider implements TextProvider {
/**
* Instantiates a {@link CompositeTextProvider} with some predefined <code>textProviders</code>.
*
* @param textProviders
* @param textProviders list of text providers
*/
public CompositeTextProvider(List<TextProvider> textProviders) {
this.textProviders.addAll(textProviders);
Expand All @@ -33,18 +32,20 @@ public CompositeTextProvider(List<TextProvider> textProviders) {
/**
* Instantiates a {@link CompositeTextProvider} with some predefined <code>textProviders</code>.
*
* @param textProviders
* @param textProviders array of text providers
*/
public CompositeTextProvider(TextProvider[] textProviders) {
this(Arrays.asList(textProviders));
}

/**
* @param key The key to lookup in ressource bundles.
* @return <tt>true</tt>, if the requested key is found in one of the ressource bundles.
* @see {@link com.opensymphony.xwork2.TextProvider#hasKey(String)}
* It will consult each individual {@link TextProvider}s and return true if either one of the
* {@link TextProvider} has such a <code>key></code> else false.
* It will consult each individual {@link TextProvider}s and return true if either one of the {@link TextProvider}" has such a <code>key</code> else false.
*
* @param key The key to lookup in resource bundles.
* @return <tt>true</tt>, if the requested key is found in one of the resource bundles.
*
* @see com.opensymphony.xwork2.TextProvider#hasKey(String)
*
*/
public boolean hasKey(String key) {
// if there's a key in either text providers we are ok, else try the next text provider
Expand All @@ -62,7 +63,7 @@ public boolean hasKey(String key) {
*
* @param key The key to lookup in resource bundles.
* @return The i18n text for the requested key.
* @see {@link com.opensymphony.xwork2.TextProvider#getText(String)}
* @see com.opensymphony.xwork2.TextProvider#getText(String)
*/
public String getText(String key) {
return getText(key, key, Collections.emptyList());
Expand All @@ -72,10 +73,10 @@ public String getText(String key) {
* It will consult each {@link TextProvider}s and return the first valid message for this
* <code>key</code> before returning <code>defaultValue</code> if every else fails.
*
* @param key
* @param defaultValue
* @return
* @see {@link com.opensymphony.xwork2.TextProvider#getText(String, String)}
* @param key the message key
* @param defaultValue the default value
* @return the first valid message for the key or default value
* @see com.opensymphony.xwork2.TextProvider#getText(String, String)
*/
public String getText(String key, String defaultValue) {
return getText(key, defaultValue, Collections.emptyList());
Expand All @@ -86,11 +87,11 @@ public String getText(String key, String defaultValue) {
* <code>key</code>, before returning <code>defaultValue</code>
* if every else fails.
*
* @param key
* @param defaultValue
* @param obj
* @return
* @see {@link com.opensymphony.xwork2.TextProvider#getText(String, String, String)}
* @param key the message key
* @param defaultValue the default value
* @param obj object
* @return the first valid message for the key or default value
* @see com.opensymphony.xwork2.TextProvider#getText(String, String, String)
*/
public String getText(String key, String defaultValue, final String obj) {
return getText(key, defaultValue, new ArrayList<Object>() {
Expand All @@ -104,10 +105,10 @@ public String getText(String key, String defaultValue, final String obj) {
* It will consult each {@link TextProvider}s and return the first valid message for this
* <code>key</code>.
*
* @param key
* @param args
* @return
* @see {@link com.opensymphony.xwork2.TextProvider#getText(String, java.util.List)}
* @param key the message key
* @param args additional arguments
* @return the first valid message for the key
* @see com.opensymphony.xwork2.TextProvider#getText(String, java.util.List)
*/
public String getText(String key, List<?> args) {
return getText(key, key, args);
Expand All @@ -117,10 +118,10 @@ public String getText(String key, List<?> args) {
* It will consult each {@link TextProvider}s and return the first valid message for this
* <code>key</code>.
*
* @param key
* @param args
* @return
* @see {@link com.opensymphony.xwork2.TextProvider#getText(String, String[])}
* @param key the message key
* @param args additional arguments
* @return the first valid message for the key or default value
* @see com.opensymphony.xwork2.TextProvider#getText(String, String[])
*/
public String getText(String key, String[] args) {
return getText(key, key, args);
Expand All @@ -131,11 +132,11 @@ public String getText(String key, String[] args) {
* It will consult each {@link TextProvider}s and return the first valid message for this
* <code>key</code>, before returning <code>defaultValue</code>
*
* @param key
* @param defaultValue
* @param args
* @return
* @see {@link com.opensymphony.xwork2.TextProvider#getText#getText(String, String, java.util.List)}
* @param key the message key
* @param defaultValue the default value
* @param args additional arguments
* @return the first valid message for the key or default value
* @see com.opensymphony.xwork2.TextProvider#getText(String, String, java.util.List)
*/
public String getText(String key, String defaultValue, List<?> args) {
// if there's one text provider that gives us a msg not the same as defaultValue
Expand All @@ -155,11 +156,11 @@ public String getText(String key, String defaultValue, List<?> args) {
* It will consult each {@link TextProvider}s and return the first valid message for this
* <code>key</code>, before returning <code>defaultValue</code>.
*
* @param key
* @param defaultValue
* @param args
* @return
* @see {@link com.opensymphony.xwork2.TextProvider#getText(String, String, String[])}
* @param key the message key
* @param defaultValue the default value
* @param args additional arguments
* @return the first valid message for the key or default value
* @see com.opensymphony.xwork2.TextProvider#getText(String, String, String[])
*/
public String getText(String key, String defaultValue, String[] args) {
// if there's one text provider that gives us a msg not the same as defaultValue
Expand All @@ -179,12 +180,12 @@ public String getText(String key, String defaultValue, String[] args) {
* It will consult each {@link TextProvider}s and return the first valid message for this
* <code>key</code>, before returning <code>defaultValue</code>
*
* @param key
* @param defaultValue
* @param args
* @param stack
* @return
* @see {@link com.opensymphony.xwork2.TextProvider#getText(String, String, java.util.List, com.opensymphony.xwork2.util.ValueStack)}
* @param key the message key
* @param defaultValue the default value
* @param args additional arguments
* @param stack the value stack
* @return the first valid message for the key or default value
* @see com.opensymphony.xwork2.TextProvider#getText(String, String, java.util.List, com.opensymphony.xwork2.util.ValueStack)
*/
public String getText(String key, String defaultValue, List<?> args, ValueStack stack) {
// if there's one text provider that gives us a msg not the same as defaultValue
Expand All @@ -203,12 +204,12 @@ public String getText(String key, String defaultValue, List<?> args, ValueStack
* It will consult each {@link TextProvider}s and return the first valid message for this
* <code>key</code>, before returning <code>defaultValue</code>
*
* @param key
* @param defaultValue
* @param args
* @param stack
* @return
* @see {@link com.opensymphony.xwork2.TextProvider#getText(String, String, String[], com.opensymphony.xwork2.util.ValueStack)}
* @param key the message key
* @param defaultValue the default value
* @param args additional arguments
* @param stack the value stack
* @return the first valid message for the key or default value
* @see com.opensymphony.xwork2.TextProvider#getText(String, String, String[], com.opensymphony.xwork2.util.ValueStack)
*/
public String getText(String key, String defaultValue, String[] args, ValueStack stack) {
// if there's one text provider that gives us a msg not the same as defaultValue
Expand All @@ -227,9 +228,9 @@ public String getText(String key, String defaultValue, String[] args, ValueStack
/**
* It will consult each {@link TextProvider}s and return the first non-null {@link ResourceBundle}.
*
* @param bundleName
* @return
* @see {@link TextProvider#getTexts(String)}
* @param bundleName the bundle name
* @return the resource bundle found for bundle name
* @see TextProvider#getTexts(String)
*/
public ResourceBundle getTexts(String bundleName) {
// if there's one text provider that gives us a non-null resource bundle for this bundleName, we are ok, else try the next
Expand All @@ -246,8 +247,8 @@ public ResourceBundle getTexts(String bundleName) {
/**
* It will consult each {@link com.opensymphony.xwork2.TextProvider}s and return the first non-null {@link ResourceBundle}.
*
* @return
* @see {@link TextProvider#getTexts()}
* @return the resource bundle
* @see TextProvider#getTexts()
*/
public ResourceBundle getTexts() {
// if there's one text provider that gives us a non-null resource bundle, we are ok, else try the next
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public ActionProxy getProxy() {
* the result params.
*
* @return a Result instance
* @throws Exception
* @throws Exception in case of any error
*/
public Result getResult() throws Exception {
Result returnResult = result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
* @author Rainer Hermanns
* @author Revised by <a href="mailto:[email protected]">Henry Hu</a>
* @author tmjee
* @version $Date$ $Id$
* @since 2005-8-6
*/
public class DefaultActionProxy implements ActionProxy, Serializable {
Expand Down Expand Up @@ -74,6 +73,13 @@ public class DefaultActionProxy implements ActionProxy, Serializable {
* </p>
*
* (like a RMIActionProxy).
*
* @param inv the action invocation
* @param namespace the namespace
* @param actionName the action name
* @param methodName the method name
* @param executeResult execute result
* @param cleanupContext cleanup context
*/
protected DefaultActionProxy(ActionInvocation inv, String namespace, String actionName, String methodName, boolean executeResult, boolean cleanupContext) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* DefaultTextProvider gets texts from only the default resource bundles associated with the
* LocalizedTextUtil.
*
* @author Jason Carreira <[email protected]>
* @author Jason Carreira [email protected]
* @author Rainer Hermanns
* @see LocalizedTextUtil#addDefaultResourceBundle(String)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public void setContainer(Container container) {
/**
* Builds a list of UnknownHandlers in the order specified by the configured "unknown-handler-stack".
* If "unknown-handler-stack" was not configured, all UnknownHandlers will be returned, in no specific order
*
* @throws Exception in case of any error
*/
protected void build() throws Exception {
Configuration configuration = container.getInstance(Configuration.class);
Expand Down Expand Up @@ -79,6 +81,11 @@ protected void build() throws Exception {

/**
* Iterate over UnknownHandlers and return the result of the first one that can handle it
*
* @param actionContext the action context
* @param actionName the action name
* @param actionConfig the action config
* @param resultCode the result code
*/
public Result handleUnknownResult(ActionContext actionContext, String actionName, ActionConfig actionConfig, String resultCode) {
for (UnknownHandler unknownHandler : unknownHandlers) {
Expand All @@ -95,7 +102,9 @@ public Result handleUnknownResult(ActionContext actionContext, String actionName
* Iterate over UnknownHandlers and return the result of the first one that can handle it.
* Must throw an exception if method cannot be handled.
*
* @throws NoSuchMethodException
* @param action the action
* @param methodName the method name
* @throws NoSuchMethodException if method con not be handled
*/
public Object handleUnknownMethod(Object action, String methodName) throws NoSuchMethodException {
for (UnknownHandler unknownHandler : unknownHandlers) {
Expand All @@ -114,6 +123,9 @@ public Object handleUnknownMethod(Object action, String methodName) throws NoSuc

/**
* Iterate over UnknownHandlers and return the result of the first one that can handle it
*
* @param namespace the namespace
* @param actionName the action name
*/
public ActionConfig handleUnknownAction(String namespace, String actionName) {
for (UnknownHandler unknownHandler : unknownHandlers) {
Expand Down
Loading

0 comments on commit 775c82a

Please sign in to comment.