Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/passive/PassiveUserManager.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/passive/PassiveUserManager.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/security/passive/PassiveUserManager.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/security/passive/PassiveUserManager.java Thu Oct 1 13:18:35 2015 @@ -50,6 +50,7 @@ public class PassiveUserManager implemen * * @param conf A Configuration object to init this Manager */ + @Override public void init(Configuration conf) { // GNDN @@ -64,6 +65,7 @@ public class PassiveUserManager implemen * @return true if the specified account exists * @throws DataBackendException if there was an error accessing the data backend. */ + @Override public boolean accountExists(User user) throws DataBackendException { @@ -79,6 +81,7 @@ public class PassiveUserManager implemen * @return true if the specified account exists * @throws DataBackendException if there was an error accessing the data backend. */ + @Override public boolean accountExists(String userName) throws DataBackendException { @@ -96,6 +99,7 @@ public class PassiveUserManager implemen * @exception DataBackendException if there is a problem accessing the * storage. */ + @Override public <U extends User> U retrieve(String username) throws UnknownEntityException, DataBackendException { @@ -116,6 +120,7 @@ public class PassiveUserManager implemen * @throws DataBackendException if there is a problem accessing the * storage. */ + @Override public List<? extends User> retrieveList(Object criteria) throws DataBackendException { @@ -138,6 +143,7 @@ public class PassiveUserManager implemen * @exception DataBackendException if there is a problem accessing the * storage. */ + @Override public <U extends User> U retrieve(String username, String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException @@ -155,6 +161,7 @@ public class PassiveUserManager implemen * @exception DataBackendException if there is a problem accessing the * storage. */ + @Override public void store(User user) throws UnknownEntityException, DataBackendException { @@ -173,6 +180,7 @@ public class PassiveUserManager implemen * @exception DataBackendException if there is a problem accessing the * storage. */ + @Override public void saveOnSessionUnbind(User user) throws UnknownEntityException, DataBackendException { @@ -193,6 +201,7 @@ public class PassiveUserManager implemen * @exception DataBackendException if there is a problem accessing the * storage. */ + @Override public void authenticate(User user, String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException @@ -209,6 +218,7 @@ public class PassiveUserManager implemen * @throws DataBackendException if there was an error accessing the data backend. * @throws EntityExistsException if the user account already exists. */ + @Override public void createAccount(User user, String initialPassword) throws EntityExistsException, DataBackendException { @@ -223,6 +233,7 @@ public class PassiveUserManager implemen * @throws DataBackendException if there was an error accessing the data backend. * @throws UnknownEntityException if the user account is not present. */ + @Override public void removeAccount(User user) throws UnknownEntityException, DataBackendException { @@ -242,6 +253,7 @@ public class PassiveUserManager implemen * @exception DataBackendException if there is a problem accessing the * storage. */ + @Override public void changePassword(User user, String oldPassword, String newPassword) throws PasswordMismatchException, UnknownEntityException, @@ -265,6 +277,7 @@ public class PassiveUserManager implemen * @exception DataBackendException if there is a problem accessing the * storage. */ + @Override public void forcePassword(User user, String password) throws UnknownEntityException, DataBackendException { @@ -279,6 +292,7 @@ public class PassiveUserManager implemen * @throws UnknownEntityException * if the anonymous User object couldn't be constructed. */ + @Override public <T extends User> T getAnonymousUser() throws UnknownEntityException { throw new UnknownEntityException("PassiveUserManager knows no users"); @@ -288,12 +302,12 @@ public class PassiveUserManager implemen * Checks whether a passed user object matches the anonymous user pattern * according to the configured user manager * - * @param An - * user object + * @param u a user object * - * @return True if this is an anonymous user + * @return true if this is an anonymous user * */ + @Override public boolean isAnonymousUser(User u) { return true; @@ -309,6 +323,7 @@ public class PassiveUserManager implemen * @throws DataBackendException * if the object could not be instantiated. */ + @Override public <T extends User> T getUserInstance() throws DataBackendException { throw new DataBackendException("PassiveUserManager knows no users"); @@ -327,6 +342,7 @@ public class PassiveUserManager implemen * @throws DataBackendException * if the object could not be instantiated. */ + @Override public <T extends User> T getUserInstance(String userName) throws DataBackendException { throw new DataBackendException("PassiveUserManager knows no users"); @@ -341,6 +357,7 @@ public class PassiveUserManager implemen * if the implementation of ACL interface could not be * determined, or does not exist. */ + @Override public <T extends AccessControlList> T getACL(User user) throws UnknownEntityException { throw new UnknownEntityException("PassiveUserManager knows no users");
Modified: turbine/core/trunk/src/java/org/apache/turbine/services/servlet/TurbineServlet.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/servlet/TurbineServlet.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/servlet/TurbineServlet.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/servlet/TurbineServlet.java Thu Oct 1 13:18:35 2015 @@ -81,7 +81,7 @@ public class TurbineServlet * given URI * * @see javax.servlet.ServletContext#getRealPath - * @param uri the URI to resolve + * @param path the URI to resolve * @return the full system path of this URI */ public static String getRealPath(String path) Modified: turbine/core/trunk/src/java/org/apache/turbine/services/session/SessionTool.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/session/SessionTool.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/session/SessionTool.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/session/SessionTool.java Thu Oct 1 13:18:35 2015 @@ -37,11 +37,13 @@ import org.apache.turbine.services.pull. public class SessionTool implements ApplicationTool { + @Override public void init(Object o) { // empty } + @Override public void refresh() { // empty @@ -111,7 +113,7 @@ public class SessionTool * Gets the User object of the the specified HttpSession. * * @param session - * @return + * @return the user from the session */ public User getUserFromSession(HttpSession session) { Modified: turbine/core/trunk/src/java/org/apache/turbine/services/session/TurbineSession.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/session/TurbineSession.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/session/TurbineSession.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/session/TurbineSession.java Thu Oct 1 13:18:35 2015 @@ -22,6 +22,7 @@ package org.apache.turbine.services.sess import java.util.Collection; + import javax.servlet.http.HttpSession; import org.apache.turbine.om.security.User; @@ -114,7 +115,7 @@ public abstract class TurbineSession * Gets the User object of the the specified HttpSession. * * @param session - * @return + * @return the user from the session */ public static User getUserFromSession(HttpSession session) { @@ -124,8 +125,8 @@ public abstract class TurbineSession /** * Gets the HttpSession by the session identifier * - * @param sessionId - * @return + * @param sessionId the id of the session + * @return the session for the given id */ public static HttpSession getSession(String sessionId) { Modified: turbine/core/trunk/src/java/org/apache/turbine/services/template/TemplateEngineService.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/template/TemplateEngineService.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/template/TemplateEngineService.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/template/TemplateEngineService.java Thu Oct 1 13:18:35 2015 @@ -1,6 +1,5 @@ package org.apache.turbine.services.template; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -20,7 +19,6 @@ package org.apache.turbine.services.temp * under the License. */ - import java.util.Hashtable; /** @@ -33,20 +31,31 @@ import java.util.Hashtable; * @version $Id$ */ public interface TemplateEngineService { - static final String TEMPLATE_EXTENSIONS = "template.extension"; - static final String DEFAULT_TEMPLATE_EXTENSION = "template.default.extension"; - static final String DEFAULT_PAGE = "default.page"; - static final String DEFAULT_SCREEN = "default.screen"; - static final String DEFAULT_LAYOUT = "default.layout"; - static final String DEFAULT_NAVIGATION = "default.navigation"; - static final String DEFAULT_ERROR_SCREEN = "default.error.screen"; - static final String DEFAULT_LAYOUT_TEMPLATE = "default.layout.template"; - static final String DEFAULT_SCREEN_TEMPLATE = "default.screen.template"; - static final String DEFAULT_NAVIGATION_TEMPLATE = "default.navigation.template"; + /** Configuration key */ + String TEMPLATE_EXTENSIONS = "template.extension"; + /** Configuration key */ + String DEFAULT_TEMPLATE_EXTENSION = "template.default.extension"; + /** Configuration key */ + String DEFAULT_PAGE = "default.page"; + /** Configuration key */ + String DEFAULT_SCREEN = "default.screen"; + /** Configuration key */ + String DEFAULT_LAYOUT = "default.layout"; + /** Configuration key */ + String DEFAULT_NAVIGATION = "default.navigation"; + /** Configuration key */ + String DEFAULT_ERROR_SCREEN = "default.error.screen"; + /** Configuration key */ + String DEFAULT_LAYOUT_TEMPLATE = "default.layout.template"; + /** Configuration key */ + String DEFAULT_SCREEN_TEMPLATE = "default.screen.template"; + /** Configuration key */ + String DEFAULT_NAVIGATION_TEMPLATE = "default.navigation.template"; /** * Return the configuration of the template engine in * the form of a Hashtable. + * @return the template engine service configuration map */ Hashtable<String, Object> getTemplateEngineServiceConfiguration(); @@ -63,6 +72,7 @@ public interface TemplateEngineService * Supplies the file extension to key this engine in {@link * org.apache.turbine.services.template.TemplateService}'s * registry with. + * @return the list of extensions this engine supports */ String[] getAssociatedFileExtensions(); @@ -75,7 +85,7 @@ public interface TemplateEngineService * template engine with respect to retrieving templates * from arbitrary sources. * - * @param template The name of the template to check the existance of. + * @param template The name of the template to check the existence of. * @return Whether the specified template exists. */ boolean templateExists(String template); Modified: turbine/core/trunk/src/java/org/apache/turbine/services/template/TemplateService.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/template/TemplateService.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/template/TemplateService.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/template/TemplateService.java Thu Oct 1 13:18:35 2015 @@ -22,7 +22,6 @@ package org.apache.turbine.services.temp import org.apache.turbine.services.Service; - import org.apache.turbine.util.RunData; /** @@ -237,7 +236,7 @@ public interface TemplateService * @return The found navigation module name. * @exception Exception, a generic exception. */ - String getNavigationName(String name) + String getNavigationName(String template) throws Exception; /** @@ -282,17 +281,20 @@ public interface TemplateService * @deprecated Each template engine service should know how to translate * a request onto a file. */ + @Deprecated String[] translateTemplatePaths(String[] templatePaths); /** * Delegates to the appropriate {@link * org.apache.turbine.services.template.TemplateEngineService} to - * check the existance of the specified template. + * check the existence of the specified template. * - * @param template The template to check for the existance of. + * @param template The template to check for the existence of. * @param templatePaths The paths to check for the template. + * @return true if the given template exists * @deprecated Use templateExists from the various Templating Engines */ + @Deprecated boolean templateExists(String template, String[] templatePaths); Modified: turbine/core/trunk/src/java/org/apache/turbine/services/template/TurbineTemplate.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/template/TurbineTemplate.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/template/TurbineTemplate.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/template/TurbineTemplate.java Thu Oct 1 13:18:35 2015 @@ -22,7 +22,6 @@ package org.apache.turbine.services.temp import org.apache.turbine.services.TurbineServices; - import org.apache.turbine.util.RunData; /** @@ -322,6 +321,7 @@ public abstract class TurbineTemplate * @deprecated Each template engine service should know how to translate * a request onto a file. */ + @Deprecated public static final String[] translateTemplatePaths(String[] templatePaths) { return getService().translateTemplatePaths(templatePaths); @@ -330,12 +330,14 @@ public abstract class TurbineTemplate /** * Delegates to the appropriate {@link * org.apache.turbine.services.template.TemplateEngineService} to - * check the existance of the specified template. + * check the existence of the specified template. * - * @param template The template to check for the existance of. + * @param template The template to check for the existence of. * @param templatePaths The paths to check for the template. + * @return true if the template exists * @deprecated Use templateExists from the various Templating Engines */ + @Deprecated public static final boolean templateExists(String template, String[] templatePaths) { return getService().templateExists(template, templatePaths); Modified: turbine/core/trunk/src/java/org/apache/turbine/services/template/TurbineTemplateService.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/template/TurbineTemplateService.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/template/TurbineTemplateService.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/template/TurbineTemplateService.java Thu Oct 1 13:18:35 2015 @@ -294,6 +294,7 @@ public class TurbineTemplateService * * @return true if Caching is active. */ + @Override public boolean isCaching() { return useCache; @@ -306,6 +307,7 @@ public class TurbineTemplateService * * @return The default extension. */ + @Override public String getDefaultExtension() { return StringUtils.isNotEmpty(defaultExtension) ? defaultExtension : ""; @@ -318,6 +320,7 @@ public class TurbineTemplateService * * @return extension The extension for the supplied template */ + @Override public String getExtension(String template) { if (StringUtils.isEmpty(template)) @@ -337,6 +340,7 @@ public class TurbineTemplateService * * @return The default template Name */ + @Override public String getDefaultTemplate() { StringBuffer sb = new StringBuffer(); @@ -355,6 +359,7 @@ public class TurbineTemplateService * * @return The default page module name. */ + @Override public String getDefaultPage() { return getDefaultPageName(getDefaultTemplate()); @@ -366,6 +371,7 @@ public class TurbineTemplateService * * @return The default screen module name. */ + @Override public String getDefaultScreen() { return getDefaultScreenName(getDefaultTemplate()); @@ -377,6 +383,7 @@ public class TurbineTemplateService * * @return The default layout module name. */ + @Override public String getDefaultLayout() { return getDefaultLayoutName(getDefaultTemplate()); @@ -388,6 +395,7 @@ public class TurbineTemplateService * * @return The default navigation module name. */ + @Override public String getDefaultNavigation() { return getDefaultNavigationName(getDefaultTemplate()); @@ -399,6 +407,7 @@ public class TurbineTemplateService * * @return The default layout template name. */ + @Override public String getDefaultLayoutTemplate() { return getDefaultLayoutTemplateName(getDefaultTemplate()); @@ -412,6 +421,7 @@ public class TurbineTemplateService * @param template The template name. * @return The default page module name. */ + @Override public String getDefaultPageName(String template) { return (mapperRegistry[PAGE_KEY]).getDefaultName(template); @@ -425,6 +435,7 @@ public class TurbineTemplateService * @param template The template name. * @return The default screen module name. */ + @Override public String getDefaultScreenName(String template) { return (mapperRegistry[SCREEN_KEY]).getDefaultName(template); @@ -438,6 +449,7 @@ public class TurbineTemplateService * @param template The template name. * @return The default layout module name. */ + @Override public String getDefaultLayoutName(String template) { return (mapperRegistry[LAYOUT_KEY]).getDefaultName(template); @@ -451,6 +463,7 @@ public class TurbineTemplateService * @param template The template name. * @return The default navigation module name. */ + @Override public String getDefaultNavigationName(String template) { return (mapperRegistry[NAVIGATION_KEY]).getDefaultName(template); @@ -464,6 +477,7 @@ public class TurbineTemplateService * @param template The template name. * @return The default layout template name. */ + @Override public String getDefaultLayoutTemplateName(String template) { return (mapperRegistry[LAYOUT_TEMPLATE_KEY]).getDefaultName(template); @@ -476,6 +490,7 @@ public class TurbineTemplateService * default page for. * @return The default page module name. */ + @Override public String getDefaultPageName(RunData data) { String template = data.getParameters().get(URIConstants.CGI_TEMPLATE_PARAM); @@ -490,6 +505,7 @@ public class TurbineTemplateService * default layout for. * @return The default layout module name. */ + @Override public String getDefaultLayoutName(RunData data) { String template = data.getParameters().get(URIConstants.CGI_TEMPLATE_PARAM); @@ -505,6 +521,7 @@ public class TurbineTemplateService * @return The found screen module name. * @exception Exception, a generic exception. */ + @Override public String getScreenName(String template) throws Exception { @@ -519,6 +536,7 @@ public class TurbineTemplateService * @return The found layout module name. * @exception Exception, a generic exception. */ + @Override public String getLayoutName(String template) throws Exception { @@ -533,6 +551,7 @@ public class TurbineTemplateService * @return The found navigation module name. * @exception Exception, a generic exception. */ + @Override public String getNavigationName(String template) throws Exception { @@ -548,6 +567,7 @@ public class TurbineTemplateService * @return The found screen template name. * @exception Exception, a generic exception. */ + @Override public String getScreenTemplateName(String template) throws Exception { @@ -562,6 +582,7 @@ public class TurbineTemplateService * @return The found screen template name. * @exception Exception, a generic exception. */ + @Override public String getLayoutTemplateName(String template) throws Exception { @@ -577,6 +598,7 @@ public class TurbineTemplateService * @return The found navigation template name. * @exception Exception, a generic exception. */ + @Override public String getNavigationTemplateName(String template) throws Exception { @@ -594,6 +616,7 @@ public class TurbineTemplateService * @deprecated Each template engine service should know how to translate * a request onto a file. */ + @Override @Deprecated public String[] translateTemplatePaths(String[] templatePaths) { @@ -613,6 +636,7 @@ public class TurbineTemplateService * @param templatePaths The paths to check for the template. * @deprecated Use templateExists from the various Templating Engines */ + @Override @Deprecated public boolean templateExists(String template, String[] templatePaths) @@ -633,6 +657,7 @@ public class TurbineTemplateService * * @param service The <code>TemplateEngineService</code> to register. */ + @Override public synchronized void registerTemplateEngineService(TemplateEngineService service) { String[] exts = service.getAssociatedFileExtensions(); @@ -650,6 +675,7 @@ public class TurbineTemplateService * @param template The template name. * @return The template engine service. */ + @Override public TemplateEngineService getTemplateEngineService(String template) { return templateEngineRegistry.get(getExtension(template)); Modified: turbine/core/trunk/src/java/org/apache/turbine/services/template/mapper/BaseMapper.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/template/mapper/BaseMapper.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/template/mapper/BaseMapper.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/template/mapper/BaseMapper.java Thu Oct 1 13:18:35 2015 @@ -96,7 +96,7 @@ public abstract class BaseMapper /** * Set the UseCache value. - * @param newUseCache The new UseCache value. + * @param useCache The new UseCache value. */ public void setUseCache(boolean useCache) { Modified: turbine/core/trunk/src/java/org/apache/turbine/services/template/mapper/Mapper.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/template/mapper/Mapper.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/template/mapper/Mapper.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/template/mapper/Mapper.java Thu Oct 1 13:18:35 2015 @@ -57,7 +57,7 @@ public interface Mapper /** * Set the UseCache value. - * @param newUseCache The new UseCache value. + * @param useCache The new UseCache value. */ void setUseCache(boolean useCache); Modified: turbine/core/trunk/src/java/org/apache/turbine/services/ui/TurbineUI.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/ui/TurbineUI.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/ui/TurbineUI.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/ui/TurbineUI.java Thu Oct 1 13:18:35 2015 @@ -20,17 +20,15 @@ package org.apache.turbine.services.ui; */ import org.apache.turbine.services.TurbineServices; +import org.apache.turbine.services.pull.tools.UITool; import org.apache.turbine.util.ServerData; -/** +/** * This is a convenience class provided to allow access to the UIService - * through static methods. The UIService should ALWAYS be accessed via - * either this class or UITool. + * through static methods. The {@link UIService} should ALWAYS be accessed via + * either this class or {@link UITool}. * * @author <a href="mailto:[email protected]">Scott Eade</a> - * @version $Id$ - * @see UIService - * @see UITool */ public class TurbineUI { @@ -39,174 +37,175 @@ public class TurbineUI */ public static void refresh() { - ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)).refresh(); + getService().refresh(); + } + + /** + * Get the service instance + * @return the {@link UIService} instance + */ + protected static UIService getService() + { + return (UIService) TurbineServices.getInstance() + .getService(UIService.SERVICE_NAME); } /** * Refresh a particular skin. - * + * * @param skinName the name of the skin to clear. */ public static void refresh(String skinName) { - ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)).refresh(skinName); + getService().refresh(skinName); } /** * Provide access to the list of available skin names. - * + * * @return the available skin names. */ public static String[] getSkinNames() { - return ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)).getSkinNames(); + return getService().getSkinNames(); } /** - * Get the name of the default skin name for the web application from the - * TurbineResources.properties file. If the property is not present the + * Get the name of the default skin name for the web application from the + * TurbineResources.properties file. If the property is not present the * name of the default skin will be returned. Note that the web application - * skin name may be something other than default, in which case its + * skin name may be something other than default, in which case its * properties will default to the skin with the name "default". - * + * * @return the name of the default skin for the web application. */ public static String getWebappSkinName() { - return ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)).getWebappSkinName(); + return getService().getWebappSkinName(); } /** - * Retrieve a skin property from the named skin. If the property is not - * defined in the named skin the value for the default skin will be - * provided. If the named skin does not exist then the skin configured for + * Retrieve a skin property from the named skin. If the property is not + * defined in the named skin the value for the default skin will be + * provided. If the named skin does not exist then the skin configured for * the webapp will be used. If the webapp skin does not exist the default - * skin will be used. If the default skin does not exist then + * skin will be used. If the default skin does not exist then * <code>null</code> will be returned. - * + * * @param skinName the name of the skin to retrieve the property from. * @param key the key to retrieve from the skin. - * @return the value of the property for the named skin (defaulting to the + * @return the value of the property for the named skin (defaulting to the * default skin), the webapp skin, the default skin or <code>null</code>, * depending on whether or not the property or skins exist. */ public static String get(String skinName, String key) { - return ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)).get(skinName, key); + return getService().get(skinName, key); } /** - * Retrieve a skin property from the default skin for the webapp. If the - * property is not defined in the webapp skin the value for the default skin - * will be provided. If the webapp skin does not exist the default skin - * will be used. If the default skin does not exist then <code>null</code> + * Retrieve a skin property from the default skin for the webapp. If the + * property is not defined in the webapp skin the value for the default skin + * will be provided. If the webapp skin does not exist the default skin + * will be used. If the default skin does not exist then <code>null</code> * will be returned. - * + * * @param key the key to retrieve. - * @return the value of the property for the webapp skin (defaulting to the - * default skin), the default skin or <code>null</code>, depending on + * @return the value of the property for the webapp skin (defaulting to the + * default skin), the default skin or <code>null</code>, depending on * whether or not the property or skins exist. */ public static String get(String key) { - return ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)).get(key); + return getService().get(key); } /** - * Retrieve the URL for an image that is part of a skin. The images are + * Retrieve the URL for an image that is part of a skin. The images are * stored in the WEBAPP/resources/ui/skins/[SKIN]/images directory. * - * <p>Use this if for some reason your server name, server scheme, or server - * port change on a per request basis. I'm not sure if this would happen in + * <p>Use this if for some reason your server name, server scheme, or server + * port change on a per request basis. I'm not sure if this would happen in * a load balanced situation. I think in most cases the image(String image) * method would probably be enough, but I'm not absolutely positive. - * + * * @param skinName the name of the skin to retrieve the image from. * @param imageId the id of the image whose URL will be generated. - * @param data the RunData to use as the source of the ServerData to use as + * @param serverData the ServerData to use as * the basis for the URL. + * @return the image URL */ - public static String image(String skinName, String imageId, + public static String image(String skinName, String imageId, ServerData serverData) { - return ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)) - .image(skinName, imageId, serverData); + return getService().image(skinName, imageId, serverData); } /** - * Retrieve the URL for an image that is part of a skin. The images are + * Retrieve the URL for an image that is part of a skin. The images are * stored in the WEBAPP/resources/ui/skins/[SKIN]/images directory. - * + * * @param skinName the name of the skin to retrieve the image from. * @param imageId the id of the image whose URL will be generated. + * @return the image URL */ public static String image(String skinName, String imageId) { - return ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)).image(skinName, imageId); + return getService().image(skinName, imageId); } /** - * Retrieve the URL for the style sheet that is part of a skin. The style is - * stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the + * Retrieve the URL for the style sheet that is part of a skin. The style is + * stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the * filename skin.css * - * <p>Use this if for some reason your server name, server scheme, or server - * port change on a per request basis. I'm not sure if this would happen in - * a load balanced situation. I think in most cases the style() method would + * <p>Use this if for some reason your server name, server scheme, or server + * port change on a per request basis. I'm not sure if this would happen in + * a load balanced situation. I think in most cases the style() method would * probably be enough, but I'm not absolutely positive. - * + * * @param skinName the name of the skin to retrieve the style sheet from. - * @param data the RunData to use as the source of the ServerData to use as + * @param serverData the ServerData to use as * the basis for the URL. + * @return the CSS URL */ public static String getStylecss(String skinName, ServerData serverData) { - return ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)) - .getStylecss(skinName, serverData); + return getService().getStylecss(skinName, serverData); } /** - * Retrieve the URL for the style sheet that is part of a skin. The style is - * stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the + * Retrieve the URL for the style sheet that is part of a skin. The style is + * stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the * filename skin.css - * + * * @param skinName the name of the skin to retrieve the style sheet from. + * @return the CSS URL */ public static String getStylecss(String skinName) { - return ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)).getStylecss(skinName); + return getService().getStylecss(skinName); } /** * Retrieve the URL for a given script that is part of the skin. The script * is stored in the WEBAPP/resources/ui/skins/[SKIN] directory. * - * <p>Use this if for some reason your server name, server scheme, or server - * port change on a per request basis. I'm not sure if this would happen in + * <p>Use this if for some reason your server name, server scheme, or server + * port change on a per request basis. I'm not sure if this would happen in * a load balanced situation. I think in most cases the image(String image) * method would probably be enough, but I'm not absolutely positive. - * + * * @param skinName the name of the skin to retrieve the image from. * @param filename the name of the script file whose URL will be generated. - * @param data the RunData to use as the source of the ServerData to use as + * @param serverData the ServerData to use as * the basis for the URL. + * @return the script URL */ - public static String getScript(String skinName, String filename, + public static String getScript(String skinName, String filename, ServerData serverData) { - return ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)) - .getScript(skinName, filename, serverData); + return getService().getScript(skinName, filename, serverData); } /** @@ -215,11 +214,10 @@ public class TurbineUI * * @param skinName the name of the skin to retrieve the image from. * @param filename the name of the script file whose URL will be generated. + * @return the script URL */ public static String getScript(String skinName, String filename) { - return ((UIService) TurbineServices.getInstance() - .getService(UIService.SERVICE_NAME)).getScript(skinName, filename); + return getService().getScript(skinName, filename); } - } Modified: turbine/core/trunk/src/java/org/apache/turbine/services/ui/UIService.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/ui/UIService.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/ui/UIService.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/ui/UIService.java Thu Oct 1 13:18:35 2015 @@ -24,17 +24,15 @@ import org.apache.turbine.util.ServerDat /** * The UI service provides for shared access to User Interface (skin) files, - * as well as the ability for non-default skin files to inherit properties from - * a default skin. Use TurbineUI to access skin properties from your screen - * classes and action code. UITool is provided as a pull tool for accessing + * as well as the ability for non-default skin files to inherit properties from + * a default skin. Use {@link TurbineUI} to access skin properties from your screen + * classes and action code. UITool is provided as a pull tool for accessing * skin properties from your templates. * * <p>Skins are lazy loaded in that they are not loaded until first used. * * @author <a href="mailto:[email protected]">Scott Eade</a> * @version $Id$ - * @see UIService - * @see UITool */ public interface UIService extends Service { @@ -42,7 +40,7 @@ public interface UIService extends Servi * The service identifier. */ public String SERVICE_NAME = "UIService"; - + /** * Refresh all skins. */ @@ -50,104 +48,108 @@ public interface UIService extends Servi /** * Refresh a particular skin. - * + * * @param skinName the name of the skin to clear. */ public void refresh(String skinName); /** * Provide access to the list of available skin names. - * + * * @return the available skin names. */ public String[] getSkinNames(); /** - * Get the name of the default skin name for the web application from the - * TurbineResources.properties file. If the property is not present the + * Get the name of the default skin name for the web application from the + * TurbineResources.properties file. If the property is not present the * name of the default skin will be returned. Note that the web application - * skin name may be something other than default, in which case its + * skin name may be something other than default, in which case its * properties will default to the skin with the name "default". - * + * * @return the name of the default skin for the web application. */ public String getWebappSkinName(); /** - * Retrieve a skin property from the named skin. If the property is not - * defined in the named skin the value for the default skin will be - * provided. If the named skin does not exist then the skin configured for + * Retrieve a skin property from the named skin. If the property is not + * defined in the named skin the value for the default skin will be + * provided. If the named skin does not exist then the skin configured for * the webapp will be used. If the webapp skin does not exist the default - * skin will be used. If the default skin does not exist then + * skin will be used. If the default skin does not exist then * <code>null</code> will be returned. - * + * * @param skinName the name of the skin to retrieve the property from. * @param key the key to retrieve from the skin. - * @return the value of the property for the named skin (defaulting to the + * @return the value of the property for the named skin (defaulting to the * default skin), the webapp skin, the default skin or <code>null</code>, * depending on whether or not the property or skins exist. */ public String get(String skinName, String key); /** - * Retrieve a skin property from the default skin for the webapp. If the - * property is not defined in the webapp skin the value for the default skin - * will be provided. If the webapp skin does not exist the default skin - * will be used. If the default skin does not exist then <code>null</code> + * Retrieve a skin property from the default skin for the webapp. If the + * property is not defined in the webapp skin the value for the default skin + * will be provided. If the webapp skin does not exist the default skin + * will be used. If the default skin does not exist then <code>null</code> * will be returned. - * + * * @param key the key to retrieve. - * @return the value of the property for the webapp skin (defaulting to the - * default skin), the default skin or <code>null</code>, depending on + * @return the value of the property for the webapp skin (defaulting to the + * default skin), the default skin or <code>null</code>, depending on * whether or not the property or skins exist. */ public String get(String key); /** - * Retrieve the URL for an image that is part of a skin. The images are + * Retrieve the URL for an image that is part of a skin. The images are * stored in the WEBAPP/resources/ui/skins/[SKIN]/images directory. * - * <p>Use this if for some reason your server name, server scheme, or server - * port change on a per request basis. I'm not sure if this would happen in + * <p>Use this if for some reason your server name, server scheme, or server + * port change on a per request basis. I'm not sure if this would happen in * a load balanced situation. I think in most cases the image(String image) * method would probably be enough, but I'm not absolutely positive. - * + * * @param skinName the name of the skin to retrieve the image from. * @param imageId the id of the image whose URL will be generated. * @param serverData the serverData to use as the basis for the URL. + * @return the image URL */ public String image(String skinName, String imageId, ServerData serverData); /** - * Retrieve the URL for an image that is part of a skin. The images are + * Retrieve the URL for an image that is part of a skin. The images are * stored in the WEBAPP/resources/ui/skins/[SKIN]/images directory. - * + * * @param skinName the name of the skin to retrieve the image from. * @param imageId the id of the image whose URL will be generated. + * @return the image URL */ public String image(String skinName, String imageId); /** - * Retrieve the URL for the style sheet that is part of a skin. The style is - * stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the + * Retrieve the URL for the style sheet that is part of a skin. The style is + * stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the * filename skin.css * - * <p>Use this if for some reason your server name, server scheme, or server - * port change on a per request basis. I'm not sure if this would happen in - * a load balanced situation. I think in most cases the style() method would + * <p>Use this if for some reason your server name, server scheme, or server + * port change on a per request basis. I'm not sure if this would happen in + * a load balanced situation. I think in most cases the style() method would * probably be enough, but I'm not absolutely positive. - * + * * @param skinName the name of the skin to retrieve the style sheet from. * @param serverData the serverData to use as the basis for the URL. + * @return the CSS URL */ public String getStylecss(String skinName, ServerData serverData); /** - * Retrieve the URL for the style sheet that is part of a skin. The style is - * stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the + * Retrieve the URL for the style sheet that is part of a skin. The style is + * stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the * filename skin.css - * + * * @param skinName the name of the skin to retrieve the style sheet from. + * @return the CSS URL */ public String getStylecss(String skinName); @@ -155,14 +157,15 @@ public interface UIService extends Servi * Retrieve the URL for a given script that is part of a skin. The script is * stored in the WEBAPP/resources/ui/skins/[SKIN] directory. * - * <p>Use this if for some reason your server name, server scheme, or server - * port change on a per request basis. I'm not sure if this would happen in - * a load balanced situation. I think in most cases the style() method would + * <p>Use this if for some reason your server name, server scheme, or server + * port change on a per request basis. I'm not sure if this would happen in + * a load balanced situation. I think in most cases the style() method would * probably be enough, but I'm not absolutely positive. * * @param skinName the name of the skin to retrieve the image from. * @param filename the name of the script file. * @param serverData the serverData to use as the basis for the URL. + * @return the script URL */ public String getScript(String skinName, String filename, ServerData serverData); @@ -173,6 +176,7 @@ public interface UIService extends Servi * * @param skinName the name of the skin to retrieve the image from. * @param filename the name of the script file. + * @return the script URL */ public String getScript(String skinName, String filename); Modified: turbine/core/trunk/src/java/org/apache/turbine/services/uniqueid/TurbineUniqueIdService.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/uniqueid/TurbineUniqueIdService.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/uniqueid/TurbineUniqueIdService.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/uniqueid/TurbineUniqueIdService.java Thu Oct 1 13:18:35 2015 @@ -70,7 +70,7 @@ public class TurbineUniqueIdService // getDefaultServerData will return just a dummy value // which is the same for all instances of Turbine. // - // @todo This needs definitely further working. + // TODO This needs definitely further working. String url = Turbine.getDefaultServerData().toString(); MessageDigest md = MessageDigest.getInstance("MD5"); Modified: turbine/core/trunk/src/java/org/apache/turbine/services/uniqueid/UniqueIdService.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/uniqueid/UniqueIdService.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/services/uniqueid/UniqueIdService.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/services/uniqueid/UniqueIdService.java Thu Oct 1 13:18:35 2015 @@ -33,10 +33,11 @@ import org.apache.turbine.services.Servi public interface UniqueIdService extends Service { + /** The service name */ String SERVICE_NAME = "UniqueIdService"; /** - * <p> Returs an identifer of this Turbine instance that is unique + * <p> Returns an identifier of this Turbine instance that is unique * both on the server and worldwide. * * @return A String with the instance identifier. @@ -44,8 +45,8 @@ public interface UniqueIdService String getInstanceId(); /** - * <p> Returns an identifier that is unique within this turbine - * instance, but does not have random-like apearance. + * <p> Returns an identifier that is unique within this Turbine + * instance, but does not have random-like appearance. * * <p> This method is intended to work fast; it can be used for * creating names of temporary files. @@ -58,11 +59,11 @@ public interface UniqueIdService /** * <p> Returns a unique identifier that looks like random data. * - * <p> This method provides indentifiers in a way that makes it + * <p> This method provides identifiers in a way that makes it * hard to guess or count, but still ensures their uniqueness * within this instance of Turbine. It can be used for generating * cookies or other data that travels back and forth between - * server and browser, and is potentialy security sensitive. + * server and browser, and is potentially security sensitive. * * @return A String with the random looking instance identifier. */ Modified: turbine/core/trunk/src/java/org/apache/turbine/util/BrowserDetector.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/BrowserDetector.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/BrowserDetector.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/BrowserDetector.java Thu Oct 1 13:18:35 2015 @@ -47,12 +47,18 @@ package org.apache.turbine.util; */ public class BrowserDetector { + /** Internet Explorer */ public static final String MSIE = "MSIE"; + /** Opera */ public static final String OPERA = "Opera"; + /** Mozilla, Firefox and friends */ public static final String MOZILLA = "Mozilla"; + /** Running on Windows */ public static final String WINDOWS = "Windows"; + /** Running on Unix */ public static final String UNIX = "Unix"; + /** Running on Mac OS X */ public static final String MACINTOSH = "Macintosh"; /** The user agent string. */ Modified: turbine/core/trunk/src/java/org/apache/turbine/util/DateSelector.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/DateSelector.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/DateSelector.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/DateSelector.java Thu Oct 1 13:18:35 2015 @@ -124,7 +124,7 @@ public class DateSelector * output() methods are used. Individual getMonth, getDay, * getYear static methods will not use this setting. * - * @param string A String to use for onChange attribute. If null, + * @param onChange A String to use for onChange attribute. If null, * then nothing will be set. * @return A DateSelector (self). */ @@ -177,7 +177,7 @@ public class DateSelector * Set the selector name prefix. Individual getMonth, getDay, * getYear static methods will not use this setting. * - * @param selname A String with the select name prefix. + * @param selName A String with the select name prefix. */ public void setSelName(String selName) { @@ -330,12 +330,11 @@ public class DateSelector } /** - * Select the day to be selected if the showDays(false) behavior - * is used. Individual getMonth, getDay, getYear static methods - * will not use this setting. - * - * @param day The day. - * @return A DateSelector (self). + * Set a year range to be displayed + * @param firstYear start of year range + * @param lastYear end of year range + * @param selectedYear entry to select + * @return true if the range settings are valid */ public boolean setYear(int firstYear, int lastYear, int selectedYear) { @@ -394,12 +393,13 @@ public class DateSelector * * @return A String with the correct HTML for the date selector. */ + @Override public String toString() { return (ecsOutput().toString()); } - /* + /** * Return an ECS container with the month, day, and year select * objects inside. * Modified: turbine/core/trunk/src/java/org/apache/turbine/util/GenerateUniqueId.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/GenerateUniqueId.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/GenerateUniqueId.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/GenerateUniqueId.java Thu Oct 1 13:18:35 2015 @@ -53,14 +53,14 @@ public class GenerateUniqueId // MAX_RADIX is 36 - /* + /** * We want to have a random string with a length of 6 characters. * Since we encode it BASE 36, we've to modulo it with the * following value: */ public final static long maxRandomLen = 2176782336L; // 36 ** 6 - /* + /** * The session identifier must be unique within the typical * lifespan of a Session; the value can roll over after that. 3 * characters: (this means a roll over after over a day, which is @@ -68,7 +68,7 @@ public class GenerateUniqueId */ public final static long maxSessionLifespanTics = 46656; // 36 ** 3 - /* + /** * Millisecons between different tics. So this means that the * 3-character time string has a new value every 2 seconds: */ @@ -88,7 +88,10 @@ public class GenerateUniqueId // Random value. long n = randomSource.nextLong(); - if (n < 0) n = -n; + if (n < 0) + { + n = -n; + } n %= maxRandomLen; // Add maxLen to pad the leading characters with '0'; remove Modified: turbine/core/trunk/src/java/org/apache/turbine/util/HttpUtils.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/HttpUtils.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/HttpUtils.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/HttpUtils.java Thu Oct 1 13:18:35 2015 @@ -19,11 +19,16 @@ package org.apache.turbine.util; * under the License. */ -import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.time.FastDateFormat; +import org.apache.turbine.Turbine; +import org.apache.turbine.pipeline.PipelineData; + /** * This class provides utilities for handling some semi-trivial HTTP stuff that * would otherwise be handled elsewhere. @@ -36,14 +41,10 @@ public class HttpUtils /** * The date format to use for HTTP Dates. */ - private static SimpleDateFormat httpDateFormat; - - static - { - httpDateFormat = new SimpleDateFormat( - "EEE, dd MMM yyyy HH:mm:ss z", Locale.US); - httpDateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); - } + private static FastDateFormat httpDateFormat = FastDateFormat.getInstance( + "EEE, dd MMM yyyy HH:mm:ss z", + TimeZone.getTimeZone("GMT"), + Locale.US); /** * Formats a java Date according to rfc 1123, the rfc standard for dates in @@ -54,32 +55,31 @@ public class HttpUtils */ public static String formatHttpDate(Date date) { - synchronized (httpDateFormat) - { - return httpDateFormat.format(date); - } + return httpDateFormat.format(date); } /** * This method sets the required expiration headers in the response for a - * given RunData object. This method attempts to set all relevant headers, + * given {@link PipelineData} object. This method attempts to set all relevant headers, * both for HTTP 1.0 and HTTP 1.1. * - * @param data The RunData object we are setting cache information for. + * @param pipelineData The {@link PipelineData} object we are setting cache information for. * @param expiry The number of milliseconds until the document should expire, * <code>0</code> indicating immediate expiration (i.e. no caching). */ - public static void setCacheHeaders(RunData data, int expiry) + public static void setCacheHeaders(PipelineData pipelineData, int expiry) { + HttpServletResponse response = pipelineData.get(Turbine.class, HttpServletResponse.class); + if (0 == expiry) { - data.getResponse().setHeader("Pragma", "no-cache"); - data.getResponse().setHeader("Cache-Control", "no-cache"); - data.getResponse().setDateHeader("Expires", System.currentTimeMillis()); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + response.setDateHeader("Expires", System.currentTimeMillis()); } else { - data.getResponse().setDateHeader("Expires", System.currentTimeMillis() + expiry); + response.setDateHeader("Expires", System.currentTimeMillis() + expiry); } } } Modified: turbine/core/trunk/src/java/org/apache/turbine/util/SecurityCheck.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/SecurityCheck.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/SecurityCheck.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/SecurityCheck.java Thu Oct 1 13:18:35 2015 @@ -58,7 +58,7 @@ public class SecurityCheck /** * Holds information if a missing Permission or Role should be created and granted on-the-fly. - * This is good behaviour, if these change a lot. + * This is good behavior, if these change a lot. */ private boolean initialize; Modified: turbine/core/trunk/src/java/org/apache/turbine/util/TimeSelector.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/TimeSelector.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/TimeSelector.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/TimeSelector.java Thu Oct 1 13:18:35 2015 @@ -256,7 +256,7 @@ public class TimeSelector * Set the selector name prefix. Individual getHour, getMinute, * getSeconds, getAMPM static methods will not use this setting. * - * @param selname A String with the select name prefix. + * @param selName A String with the select name prefix. */ public void setSelName(String selName) { @@ -342,6 +342,7 @@ public class TimeSelector * Return a minute selector. * * @param name The name to use for the selected minute. + * @param now Calendar to start with. * @return A select object with minute options. */ public static Select getMinuteSelector(String name, Calendar now) @@ -411,7 +412,6 @@ public class TimeSelector * @param format Time format. * @return A select object with all the hours. */ - @SuppressWarnings("cast") public static Select getHourSelector(String name, Calendar now, int format) { Select hourSelect = new Select().setName(name); @@ -436,7 +436,7 @@ public class TimeSelector { Option o = new Option(); - o.addElement(nbrFmt.format((long) curHour)); + o.addElement(nbrFmt.format(curHour)); o.setValue(curHour); if (now.get(Calendar.AM_PM) == Calendar.AM) { @@ -607,7 +607,9 @@ public class TimeSelector Select tmp = getSecondSelector(selName + SECOND_SUFFIX, useDate, this.secondInterval); if (onChangeSet) + { tmp.setOnChange(onChange); + } secondSelect = tmp; } else @@ -631,7 +633,9 @@ public class TimeSelector ec.addElement(":"); ec.addElement(minuteSelect); if (this.showSeconds == true) + { ec.addElement(":"); + } ec.addElement(secondSelect); if (this.timeFormat == TimeSelector.TWELVE_HOUR) { Modified: turbine/core/trunk/src/java/org/apache/turbine/util/TurbineConfig.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/TurbineConfig.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/TurbineConfig.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/TurbineConfig.java Thu Oct 1 13:18:35 2015 @@ -67,7 +67,7 @@ import org.apache.turbine.Turbine; * initialize the Resource and Logging Services and any other services you * have defined in your TurbineResources.properties file. * - * @todo Make this class enforce the lifecycle contracts + * TODO Make this class enforce the lifecycle contracts * * @author <a href="mailto:[email protected]">Quinton McCombs</a> * @author <a href="mailto:[email protected]">Rafal Krzewski</a> @@ -137,7 +137,17 @@ public class TurbineConfig } /** - * @see #TurbineConfig(String path, Map attributes, Map initParams) + * Constructs a new TurbineConfig. + * + * This is the general form of the constructor. You can provide + * a path to search for files, and a name-value map of init + * parameters. + * + * <p> For the list of recognized init parameters, see + * {@link org.apache.turbine.Turbine} class. + * + * @param path The web application root (i.e. the path for file lookup). + * @param initParams initialization parameters. */ public TurbineConfig(String path, Map<String, String> initParams) { @@ -163,6 +173,7 @@ public class TurbineConfig * Causes this class to initialize itself which in turn initializes * all of the Turbine Services that need to be initialized. */ + @Override public void initialize() { try @@ -178,6 +189,7 @@ public class TurbineConfig /** * Initialization requiring a HTTP <code>GET</code> request. + * @param data the Turbine request */ public void init(RunData data) { @@ -191,6 +203,7 @@ public class TurbineConfig * Shutdown the Turbine System, lifecycle style * */ + @Override public void dispose() { if (turbine != null) @@ -214,6 +227,7 @@ public class TurbineConfig * * @return a ServletContext reference */ + @Override public ServletContext getServletContext() { return this; @@ -227,6 +241,7 @@ public class TurbineConfig * @return An absolute version of the supplied path, or <code>null</code> * if the translated path doesn't map to a file or directory. */ + @Override public String getRealPath(String path) { String result = null; @@ -264,6 +279,7 @@ public class TurbineConfig * @param name the name of the parameter. * @return the value of the parameter. */ + @Override public String getInitParameter(String name) { return initParams.get(name); @@ -274,6 +290,7 @@ public class TurbineConfig * * @return an Enumeration of initialization parameter names. */ + @Override public Enumeration<String> getInitParameterNames() { return new Vector<String>(initParams.keySet()).elements(); @@ -286,6 +303,7 @@ public class TurbineConfig * * @return the servlet name. */ + @Override public String getServletName() { return "Turbine"; @@ -298,6 +316,7 @@ public class TurbineConfig * * @return the context name */ + @Override public String getServletContextName() { return "Turbine"; @@ -310,6 +329,7 @@ public class TurbineConfig * * @return the context path */ + @Override public String getContextPath() { return "/turbine"; @@ -324,6 +344,7 @@ public class TurbineConfig * @return a URL pointing to the resource * @exception MalformedURLException */ + @Override public URL getResource(String s) throws MalformedURLException { @@ -337,6 +358,7 @@ public class TurbineConfig * @param s the path to the resource * @return an InputStream object from which the resource can be read */ + @Override public InputStream getResourceAsStream(String s) { try @@ -357,6 +379,7 @@ public class TurbineConfig * @param m a message. * @deprecated use log(String,Throwable) instead */ + @Override @Deprecated public void log(Exception e, String m) { @@ -368,6 +391,7 @@ public class TurbineConfig * * @param m a message. */ + @Override public void log(String m) { log.info(m); @@ -379,6 +403,7 @@ public class TurbineConfig * @param t a Throwable object. * @param m a message. */ + @Override public void log(String m, Throwable t) { log.info(m, t); @@ -388,6 +413,7 @@ public class TurbineConfig * Returns the servlet container attribute with the given name, or * null if there is no attribute by that name. */ + @Override public Object getAttribute(String s) { return attributes.get(s); @@ -397,6 +423,7 @@ public class TurbineConfig * Returns an Enumeration containing the attribute names available * within this servlet context. */ + @Override public Enumeration<String> getAttributeNames() { return new Vector<String>(attributes.keySet()).elements(); @@ -411,6 +438,7 @@ public class TurbineConfig * implemented and will throw <code>UnsuportedOperationException</code> * upon invocation */ + @Override public ServletContext getContext(String s) { throw new UnsupportedOperationException(); @@ -423,6 +451,7 @@ public class TurbineConfig * implemented and will throw <code>UnsuportedOperationException</code> * upon invocation */ + @Override public int getMajorVersion() { throw new UnsupportedOperationException(); @@ -435,6 +464,7 @@ public class TurbineConfig * implemented and will throw <code>UnsuportedOperationException</code> * upon invocation */ + @Override public String getMimeType(String s) { throw new UnsupportedOperationException(); @@ -447,6 +477,7 @@ public class TurbineConfig * implemented and will throw <code>UnsuportedOperationException</code> * upon invocation */ + @Override public int getMinorVersion() { throw new UnsupportedOperationException(); @@ -459,6 +490,7 @@ public class TurbineConfig * implemented and will throw <code>UnsuportedOperationException</code> * upon invocation */ + @Override public RequestDispatcher getNamedDispatcher(String s) { throw new UnsupportedOperationException(); @@ -471,6 +503,7 @@ public class TurbineConfig * implemented and will throw <code>UnsuportedOperationException</code> * upon invocation */ + @Override public RequestDispatcher getRequestDispatcher(String s) { throw new UnsupportedOperationException(); @@ -482,6 +515,7 @@ public class TurbineConfig * A method in ServletContext (2.3) interface that is not implemented and * will throw <code>UnsuportedOperationException</code> upon invocation */ + @Override public Set<String> getResourcePaths(String s) { throw new UnsupportedOperationException(); @@ -493,6 +527,7 @@ public class TurbineConfig * A method in ServletContext (2.3) interface that is not implemented and * will throw <code>UnsuportedOperationException</code> upon invocation */ + @Override public String getServerInfo() { throw new UnsupportedOperationException(); @@ -505,6 +540,7 @@ public class TurbineConfig * throw <code>UnsuportedOperationException</code> upon invocation * @deprecated As of Java Servlet API 2.1, with no direct replacement. */ + @Override @Deprecated public Servlet getServlet(String s) { @@ -518,6 +554,7 @@ public class TurbineConfig * throw <code>UnsuportedOperationException</code> upon invocation * @deprecated As of Java Servlet API 2.1, with no replacement. */ + @Override @Deprecated public Enumeration<String> getServletNames() { @@ -531,6 +568,7 @@ public class TurbineConfig * throw <code>UnsuportedOperationException</code> upon invocation * @deprecated As of Java Servlet API 2.0, with no replacement. */ + @Override @Deprecated public Enumeration<Servlet> getServlets() { @@ -543,6 +581,7 @@ public class TurbineConfig * A method in ServletContext interface that is not implemented and will * throw <code>UnsuportedOperationException</code> upon invocation */ + @Override public void removeAttribute(String s) { throw new UnsupportedOperationException(); @@ -554,6 +593,7 @@ public class TurbineConfig * A method in ServletContext interface that is not implemented and will * throw <code>UnsuportedOperationException</code> upon invocation */ + @Override public void setAttribute(String s, Object o) { throw new UnsupportedOperationException(); Modified: turbine/core/trunk/src/java/org/apache/turbine/util/TurbineXmlConfig.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/TurbineXmlConfig.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/TurbineXmlConfig.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/TurbineXmlConfig.java Thu Oct 1 13:18:35 2015 @@ -45,7 +45,7 @@ import java.util.Map; * initialize the Resource and Logging Services and any other services you * have defined in your TurbineResources.properties file. * - * @todo Make this class enforce the lifecycle contracts + * TODO Make this class enforce the lifecycle contracts * * @author <a href="mailto:[email protected]">Eric Pugh</a> * @version $Id$ @@ -74,7 +74,17 @@ public class TurbineXmlConfig } /** - * @see #TurbineXmlConfig(String path, Map attributes, Map initParams) + * Constructs a new TurbineXmlConfig. + * + * This is the general form of the constructor. You can provide + * a path to search for files, and a name-value map of init + * parameters. + * + * <p> For the list of recognized init parameters, see + * {@link org.apache.turbine.Turbine} class. + * + * @param path The web application root (i.e. the path for file lookup). + * @param initParams initialization parameters. */ public TurbineXmlConfig(String path, Map<String, String> initParams) { @@ -85,10 +95,10 @@ public class TurbineXmlConfig * Constructs a TurbineXmlConfig. * * This is a specialized constructor that allows to configure - * Turbine easiliy in the common setups. + * Turbine easily in the common setups. * * @param path The web application root (i.e. the path for file lookup). - * @param configuration the relative path to TurbineResources.xml file + * @param config the relative path to TurbineResources.xml file */ public TurbineXmlConfig(String path, String config) { Modified: turbine/core/trunk/src/java/org/apache/turbine/util/template/HtmlPageAttributes.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/template/HtmlPageAttributes.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/template/HtmlPageAttributes.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/template/HtmlPageAttributes.java Thu Oct 1 13:18:35 2015 @@ -31,7 +31,6 @@ import org.apache.commons.lang.StringUti import org.apache.turbine.Turbine; import org.apache.turbine.TurbineConstants; import org.apache.turbine.services.pull.ApplicationTool; -import org.apache.turbine.util.RunData; /** * Template context tool that can be used to set various attributes of a @@ -123,29 +122,20 @@ public class HtmlPageAttributes private String doctype = null; /** - * Default constructor. The init method must be called before use + * Construct a new instance */ public HtmlPageAttributes() { - // empty - } - - /** - * Construct a new instance with the given RunData object. - * - * @param data a RunData instance - */ - public HtmlPageAttributes(RunData data) - { - init(data); + init(null); } /** - * Initialise this instance with the given RunData object. + * Initialize this instance. * (ApplicationTool method) * - * @param data Assumed to be a RunData instance + * @param data not used */ + @Override public void init(Object data) { this.title = null; @@ -160,6 +150,7 @@ public class HtmlPageAttributes /** * Refresh method - does nothing */ + @Override public void refresh() { // empty Modified: turbine/core/trunk/src/java/org/apache/turbine/util/template/SelectorBox.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/template/SelectorBox.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/template/SelectorBox.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/template/SelectorBox.java Thu Oct 1 13:18:35 2015 @@ -223,6 +223,7 @@ public class SelectorBox * * @return A String with the HTML code. */ + @Override public String toString() { return this.toString(size); @@ -286,7 +287,7 @@ public class SelectorBox /** * This allows one to set the array of selected booleans. * - * @param an array of booleans + * @param bools an array of booleans * @return A SelectorBox (self). */ public SelectorBox setSelected(boolean[] bools) Modified: turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateInfo.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateInfo.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateInfo.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateInfo.java Thu Oct 1 13:18:35 2015 @@ -42,9 +42,11 @@ import org.apache.turbine.util.uri.URICo public class TemplateInfo { - /* Constants for tempStorage hash map. */ + /** Constants for tempStorage hash map. */ public static final String NAVIGATION_TEMPLATE = "00navigation_template00"; + /** Constants for tempStorage hash map. */ public static final String LAYOUT_TEMPLATE = "00layout_template00"; + /** Constants for tempStorage hash map. */ public static final String SERVICE_NAME = "template_service"; /* Handle to the RunData object. */ @@ -56,7 +58,7 @@ public class TemplateInfo /** * Constructor * - * @param RunData A Turbine Rundata object. + * @param data A Turbine RunData object. */ public TemplateInfo(RunData data) { @@ -273,7 +275,7 @@ public class TemplateInfo return tempStorage.remove(name); } - /* + /** * Returns all the available names in the temporary storage. * * @return A object array with the keys. Modified: turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateNavigation.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateNavigation.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateNavigation.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateNavigation.java Thu Oct 1 13:18:35 2015 @@ -23,13 +23,9 @@ package org.apache.turbine.util.template import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; - import org.apache.ecs.ConcreteElement; - import org.apache.turbine.modules.NavigationLoader; - import org.apache.turbine.services.template.TurbineTemplate; - import org.apache.turbine.util.RunData; /** @@ -86,6 +82,7 @@ public class TemplateNavigation * * @return A String. */ + @Override public String toString() { String module = null; Modified: turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateScreen.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateScreen.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateScreen.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/template/TemplateScreen.java Thu Oct 1 13:18:35 2015 @@ -90,6 +90,7 @@ public class TemplateScreen * * @return A String. */ + @Override public String toString() { String returnValue = ""; Modified: turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityActionEvent.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityActionEvent.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityActionEvent.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityActionEvent.java Thu Oct 1 13:18:35 2015 @@ -65,7 +65,7 @@ public abstract class VelocityActionEven * doEvent() method. If that fails, then it will execute the * doPerform() method instead. * - * @param data A Turbine RunData object. + * @param pipelineData A Turbine RunData object. * @exception Exception a generic exception. */ @Override Modified: turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityEmail.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityEmail.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityEmail.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityEmail.java Thu Oct 1 13:18:35 2015 @@ -127,6 +127,7 @@ public class VelocityEmail extends Simpl /** * Constructor + * @param context the velocity context to use */ public VelocityEmail(Context context) { Modified: turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityHtmlEmail.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityHtmlEmail.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityHtmlEmail.java (original) +++ turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityHtmlEmail.java Thu Oct 1 13:18:35 2015 @@ -33,7 +33,6 @@ import org.apache.turbine.Turbine; import org.apache.turbine.TurbineConstants; import org.apache.turbine.pipeline.PipelineData; import org.apache.turbine.services.velocity.TurbineVelocity; -import org.apache.turbine.util.RunData; import org.apache.velocity.context.Context; /** @@ -108,19 +107,9 @@ public class VelocityHtmlEmail extends H private String mailServer; /** - * Constructor, sets the context object from the passed RunData object - * @deprecated use PipelineData version instead - * @param data A Turbine RunData object. - */ - public VelocityHtmlEmail(RunData data) - { - this(TurbineVelocity.getContext(data)); - } - - /** - * Constructor, sets the context object from the passed RunData object + * Constructor, sets the context object from the passed {@link PipelineData} object * - * @param data A Turbine RunData object. + * @param pipelineData A Turbine {@link PipelineData} object. */ public VelocityHtmlEmail(PipelineData pipelineData) { @@ -199,6 +188,7 @@ public class VelocityHtmlEmail extends H * * @exception EmailException thrown if mail cannot be sent. */ + @Override public String send() throws EmailException { context.put("mail", this); @@ -248,6 +238,7 @@ public class VelocityHtmlEmail extends H * * @see HtmlEmail#embed(URL surl, String name) embed. */ + @Override public String embed(String surl, String name) { String cid = ""; Modified: turbine/core/trunk/src/test-cactus/org/apache/turbine/modules/screens/ErrorTest.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/test-cactus/org/apache/turbine/modules/screens/ErrorTest.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/test-cactus/org/apache/turbine/modules/screens/ErrorTest.java (original) +++ turbine/core/trunk/src/test-cactus/org/apache/turbine/modules/screens/ErrorTest.java Thu Oct 1 13:18:35 2015 @@ -66,7 +66,7 @@ public class ErrorTest extends ServletTe /** * Tests if we can call the doBuild method * - *@todo Move the turbine setup stuff into the setUp() method. + *TODO Move the turbine setup stuff into the setUp() method. */ public void testDobuild() throws Exception { Modified: turbine/core/trunk/src/test/org/apache/turbine/modules/actions/VelocityActionDoesNothing.java URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/test/org/apache/turbine/modules/actions/VelocityActionDoesNothing.java?rev=1706239&r1=1706238&r2=1706239&view=diff ============================================================================== --- turbine/core/trunk/src/test/org/apache/turbine/modules/actions/VelocityActionDoesNothing.java (original) +++ turbine/core/trunk/src/test/org/apache/turbine/modules/actions/VelocityActionDoesNothing.java Thu Oct 1 13:18:35 2015 @@ -44,7 +44,7 @@ public class VelocityActionDoesNothing e /** * Default action is throw an exception. * - * @param data Current RunData information + * @param pipelineData Current RunData information * @param context Context to populate * @exception Exception Thrown on error */ @@ -61,7 +61,7 @@ public class VelocityActionDoesNothing e /** * Annotated action method. * - * @param data Current RunData information + * @param pipelineData Current RunData information * @param context Context to populate * @exception Exception Thrown on error */
