Anonymous avatar Anonymous committed 6e391e0

polished javadoc

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@950 e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (3)

src/java/com/opensymphony/xwork/ActionContext.java

     /**
      * Returns the ActionContext specific to the current thread.
      *
-     * @return the ActionContext for the current thread.
+     * @return the ActionContext for the current thread, is never <tt>null</tt>.
      */
     public static ActionContext getContext() {
         ActionContext context = (ActionContext) actionContext.get();
 
     /**
      * Sets a map of action session values.
+     *
+     * @param session  the session values.
      */
     public void setSession(Map session) {
         put(SESSION, session);

src/java/com/opensymphony/xwork/ActionSupport.java

 
     protected transient static final Log LOG = LogFactory.getLog(ActionSupport.class);
 
-
     private transient final TextProvider textProvider = new TextProviderSupport(getClass(), this);
     private final ValidationAwareSupport validationAware = new ValidationAwareSupport();
 
         validationAware.setFieldErrors(errorMap);
     }
 
-    /**
-     * @return a Map of field names -> List of errors or null if no errors have been added
-     */
     public Map getFieldErrors() {
         return validationAware.getFieldErrors();
     }
 
     public Locale getLocale() {
-        return (ActionContext.getContext() != null) ? ActionContext.getContext().getLocale() : null;
+        return ActionContext.getContext().getLocale();
     }
 
     public String getText(String aTextName) {
         return textProvider.getText(key, defaultValue, args);
     }
 
-    public ResourceBundle getTexts(String aBundleName) {
-        return textProvider.getTexts(aBundleName);
-    }
-
     public String getText(String key, String defaultValue, List args, OgnlValueStack stack) {
         return textProvider.getText(key, defaultValue, args, stack);
     }
         return textProvider.getText(key, defaultValue, args, stack);
     }
 
-
     public ResourceBundle getTexts() {
         return textProvider.getTexts();
     }
 
+    public ResourceBundle getTexts(String aBundleName) {
+        return textProvider.getTexts(aBundleName);
+    }
+
     public void addActionError(String anErrorMessage) {
         validationAware.addActionError(anErrorMessage);
     }
 
     /**
      * A default implementation that does nothing an returns "success".
+     * <p/>
+     * Subclasses should override this method to provide their business logic.
+     * <p/>
+     * See also {@link com.opensymphony.xwork.Action#execute()}.
      *
-     * @return {@link #SUCCESS}
+     * @return returns {@link #SUCCESS}
+     * @throws Exception  can be thrown by subclasses.
      */
     public String execute() throws Exception {
         return SUCCESS;
         return validationAware.hasActionErrors();
     }
 
-    /**
-     * Checks whether there are any Action-level messages.
-     *
-     * @return true if any Action-level messages have been registered
-     */
     public boolean hasActionMessages() {
         return validationAware.hasActionMessages();
     }
      */
     public void pause(String result) {
     }
+
 }

src/java/com/opensymphony/xwork/Validateable.java

  */
 public interface Validateable {
 
+    /**
+     * Performs validation.
+     */
     void validate();
+
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.