tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-tapestry/framework/src/net/sf/tapestry TapestryStrings.properties IPage.java IEngine.java ApplicationServlet.java AbstractComponent.java AbstractPage.java
Date Fri, 07 Feb 2003 04:20:33 GMT
hlship      2003/02/06 20:20:33

  Modified:    framework/src/net/sf/tapestry TapestryStrings.properties
                        IPage.java IEngine.java ApplicationServlet.java
                        AbstractComponent.java AbstractPage.java
  Log:
  Deprecated and remove support for interface PageCleanupListener.
  
  Revision  Changes    Path
  1.42      +5 -5      jakarta-tapestry/framework/src/net/sf/tapestry/TapestryStrings.properties
  
  Index: TapestryStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/TapestryStrings.properties,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- TapestryStrings.properties	27 Jan 2003 16:30:21 -0000	1.41
  +++ TapestryStrings.properties	7 Feb 2003 04:20:32 -0000	1.42
  @@ -40,7 +40,7 @@
   ApplicationServlet.could-not-parse-spec=Unable to parse application specification {0}.
   ApplicationServlet.get-app-path-not-overriden=Application servlet {0} does not provide
an implementation of method getApplicationServletPath().
   ApplicationServlet.no-application-specification=Running application without an application
specification.
  -
  +ApplicationServlet.engine-stateful-without-session=Engine {0} is stateful even though there
is no HttpSession.  Discarding the engine. 
   BaseComponent.undefined-embedded-component=Template for component {0} references undefined
embedded component {1}.
   BaseComponent.multiple-component-references=Template for component {0} contains multiple
references to embedded component {1}.
   BaseComponent.unbalanced-close-tags=More closing tags the open tags in template.
  @@ -199,7 +199,6 @@
   
   ListEdit.unable-to-convert-value=Unable to convert {0} to an external string in ListEdit
component.
   ListEdit.unable-to-convert-string=Unable to convert {0} back into an object in ListEdit
component.
  -ListEdit.unable-to-convert-source=Unable to convert {0} to a source for ListEdit component.
   
   Option.must-be-contained-by-select=Option component must be contained within a Select.
   
  @@ -276,18 +275,19 @@
   SpecificationParser.unable-to-copy=Unable to copy component {0}, which does not exist.
   SpecificationParser.invalid-parameter-name=Parameter ''{0}'' is an invalid name.  Parameter
names should be valid Java identifiers.
   SpecificationParser.invalid-page-name=''{0}'' is not a valid page name.  Page names must
start with a letter and consist only of letters, numbers, period, dash and underscore.
  -SpecificationParser.invalid-component-alias=''{0}'' is not a valid component alias.  Aliases
must start with a letter and consist only of letters, numbers, period, dash and underscore.
  +SpecificationParser.invalid-component-type=''{0}'' is not a valid component type.  Types
must be valid Java identifiers.
   SpecificationParser.invalid-property-name=''{0}'' is not a valid JavaBean property name.
 Property names must be valid Java identifiers.
   SpecificationParser.invalid-bean-name=''{0}'' is not a valid helper bean name.  Helper
bean names must be valid Java identifiers.
   SpecificationParser.unknown-static-value-type=Unknown <static-value> type: ''{0}''.
   SpecificationParser.invalid-component-id=''{0}'' is not a valid component id.  Component
ids must be valid Java identifiers.
   SpecificationParser.invalid-asset-name=''{0}'' is not a valid asset name.  Asset names
must be valid Java identifiers.
   SpecificationParser.invalid-service-name=''{0}'' is not a valid service name.  Service
names must start with a letter, and contain only letters, numbers, dash, underscore and period.
  -SpecificationParser.not-allowed-for-page=Page specifications may not include the <{0}>
element, as it only makes sense for components.
   SpecificationParser.invalid-library-id=''{0}'' is not a valid library id.  Library ids
must be valid Java identifiers.
   SpecificationParser.invalid-extension-name=''{0}'' is not a valid extension name.  Extension
names must start with a letter, and contain only letters, numbers, dash and underscore.
   SpecificationParser.invalid-component-type=''{0}'' is not a valid component type.
   SpecificationParser.framework-library-id-is-reserved=The library id ''{0}'' is reserved
and may not be used.
  +SpecificationParser.no-attribute-and-body=It is not valid to specify a value for attribute
''{0}'' of <{1}> and provide a value in the body of the element.
  +SpecificationParser.required-extended-attribute=Element <{0}> does not specify a
value for attribute ''{1}'', or contain a body value.
   
   TemplateParser.comment-not-ended=Comment on line {0} did not end.
   TemplateParser.unclosed-tag=Tag <{0}> on line {1} is never closed.
  
  
  
  1.17      +10 -11    jakarta-tapestry/framework/src/net/sf/tapestry/IPage.java
  
  Index: IPage.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/IPage.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- IPage.java	17 Jan 2003 17:40:17 -0000	1.16
  +++ IPage.java	7 Feb 2003 04:20:32 -0000	1.17
  @@ -313,15 +313,10 @@
       public void setRequestCycle(IRequestCycle cycle);
   
       /**
  -     *  Invoked when the application terminates (that is, when the 
  -     *  {@link javax.servlet.http.HttpSession}
  -     *  containing the {@link IEngine} is invalidated or times out).  This gives
  -     *  the page a chance to release any additional resources it may have ...
  -     *  in particular,
  -     *  it allows a page to remove stateful session EJBs it may be using.
  -     *
  -     *  <p>Invokes {@link PageCleanupListener#pageCleanup(PageEvent)} on any listeners.
        *
  +     *  @deprecated With no replacement.
  +     *  @see PageCleanupListener
  +     * 
        **/
   
       public void cleanupPage();
  @@ -377,8 +372,11 @@
       public void removePageDetachListener(PageDetachListener listener);
   
       /**
  +     *  
        *  @since 1.0.5
  -     *
  +     *  @deprecated With no replacement.
  +     *  @see PageCleanupListener
  +     * 
        **/
   
       public void addPageCleanupListener(PageCleanupListener listener);
  @@ -386,7 +384,8 @@
       /**
        * 
        *  @since 2.1
  -     * 
  +     *  @deprecated With no replacement.
  +     *  @see PageCleanupListener
        **/
   
       public void removePageCleanupListener(PageCleanupListener listener);
  
  
  
  1.18      +6 -11     jakarta-tapestry/framework/src/net/sf/tapestry/IEngine.java
  
  Index: IEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/IEngine.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- IEngine.java	24 Jan 2003 00:49:34 -0000	1.17
  +++ IEngine.java	7 Feb 2003 04:20:32 -0000	1.18
  @@ -364,18 +364,13 @@
       public boolean isRefreshing();
   
       /** 
  -     * 
  -     *  Set by the application servlet just before the engine is
  -     *  "refreshed" into the HttpSession.  Some servlet containers
  -     *  will invoke the 
  -     *  {@link javax.servlet.http.HttpSessionBindingListener#valueUnbound(javax.servlet.http.HttpSessionBindingEvent)}
  -     *  event listener method (before updating the attribute and invoking
  -     *  {@link javax.servlet.http.HttpSessionBindingListener#valueBound(javax.servlet.http.HttpSessionBindingEvent)}),

  -     *  which will be interpreted by the engine
  -     *  as the session being invalidated, at which point it will (normally)
  -     *  true to cleanup the pages ... setting this flag, prevents the unwanted cleanup.
    
  +     *  This method has been deprecated.  It existed as part
  +     *  of support for {@link net.sf.tapestry.event.PageCleanupListener} interface,
  +     *  which has also been deprecated.
  +     *   
        * 
        *  @since 2.2
  +     *  @deprecated With no replacement.
        * 
        **/
   
  
  
  
  1.24      +21 -17    jakarta-tapestry/framework/src/net/sf/tapestry/ApplicationServlet.java
  
  Index: ApplicationServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/ApplicationServlet.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ApplicationServlet.java	26 Jan 2003 02:59:24 -0000	1.23
  +++ ApplicationServlet.java	7 Feb 2003 04:20:32 -0000	1.24
  @@ -189,7 +189,8 @@
        *
        **/
   
  -    public void doGet(HttpServletRequest request, HttpServletResponse response) throws
IOException, ServletException
  +    public void doGet(HttpServletRequest request, HttpServletResponse response)
  +        throws IOException, ServletException
       {
           doService(request, response);
       }
  @@ -227,7 +228,8 @@
               IEngine engine = getEngine(context);
   
               if (engine == null)
  -                throw new ServletException(Tapestry.getString("ApplicationServlet.could-not-locate-engine"));
  +                throw new ServletException(
  +                    Tapestry.getString("ApplicationServlet.could-not-locate-engine"));
   
               boolean dirty = engine.service(context);
   
  @@ -247,22 +249,15 @@
                   try
                   {
   
  -                    boolean forceStore = engine.isStateful() && (session.getAttribute(_attributeName)
== null);
  +                    boolean forceStore =
  +                        engine.isStateful() && (session.getAttribute(_attributeName)
== null);
   
                       if (forceStore || dirty)
                       {
                           if (LOG.isDebugEnabled())
                               LOG.debug("Storing " + engine + " into session as " + _attributeName);
   
  -                        // Some servlet container invoke valueUnbound(), then valueBound()
  -                        // when "refreshing" this way, so we tell the engine it is being
  -                        // refreshed.
  -
  -                        engine.setRefreshing(true);
  -
                           session.setAttribute(_attributeName, engine);
  -
  -                        engine.setRefreshing(false);
                       }
                   }
                   catch (IllegalStateException ex)
  @@ -283,7 +278,10 @@
   
               if (engine.isStateful())
               {
  -                LOG.error("Engine " + engine + " is stateful even though there is no session.
 Discarding the engine.");
  +                LOG.error(
  +                    Tapestry.getString(
  +                        "ApplicationServlet.engine-stateful-without-session",
  +                        engine));
                   return;
               }
   
  @@ -335,7 +333,9 @@
        * 
        **/
   
  -    protected RequestContext createRequestContext(HttpServletRequest request, HttpServletResponse
response)
  +    protected RequestContext createRequestContext(
  +        HttpServletRequest request,
  +        HttpServletResponse response)
           throws IOException
       {
           return new RequestContext(this, request, response);
  @@ -357,7 +357,8 @@
        *
        **/
   
  -    public void doPost(HttpServletRequest request, HttpServletResponse response) throws
IOException, ServletException
  +    public void doPost(HttpServletRequest request, HttpServletResponse response)
  +        throws IOException, ServletException
       {
           doService(request, response);
       }
  @@ -599,7 +600,8 @@
       {
           ApplicationSpecification result = new ApplicationSpecification();
   
  -        IResourceLocation virtualLocation = new ContextResourceLocation(getServletContext(),
"/WEB-INF/");
  +        IResourceLocation virtualLocation =
  +            new ContextResourceLocation(getServletContext(), "/WEB-INF/");
   
           result.setSpecificationLocation(virtualLocation);
   
  @@ -631,7 +633,9 @@
           {
               show(ex);
   
  -            throw new ServletException(Tapestry.getString("ApplicationServlet.could-not-parse-spec",
location), ex);
  +            throw new ServletException(
  +                Tapestry.getString("ApplicationServlet.could-not-parse-spec", location),
  +                ex);
           }
       }
   
  
  
  
  1.24      +20 -15    jakarta-tapestry/framework/src/net/sf/tapestry/AbstractComponent.java
  
  Index: AbstractComponent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/AbstractComponent.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- AbstractComponent.java	17 Jan 2003 17:40:17 -0000	1.23
  +++ AbstractComponent.java	7 Feb 2003 04:20:32 -0000	1.24
  @@ -281,9 +281,8 @@
   
       /**
        *  Registers this component as a listener of the page if it
  -     *  implements {@link net.sf.tapestry.event.PageDetachListener},
  -     *  {@link net.sf.tapestry.event.PageRenderListener} or 
  -     *  {@link net.sf.tapestry.event.PageCleanupListener}.
  +     *  implements {@link net.sf.tapestry.event.PageDetachListener} or 
  +     *  {@link net.sf.tapestry.event.PageRenderListener}.
        * 
        *  <p>
        *  Invokes {@link #finishLoad()}.  Subclasses may overide as needed, but
  @@ -293,7 +292,10 @@
        *
        **/
   
  -    public void finishLoad(IRequestCycle cycle, IPageLoader loader, ComponentSpecification
specification)
  +    public void finishLoad(
  +        IRequestCycle cycle,
  +        IPageLoader loader,
  +        ComponentSpecification specification)
           throws PageLoaderException
       {
           if (this instanceof PageDetachListener)
  @@ -302,9 +304,6 @@
           if (this instanceof PageRenderListener)
               _page.addPageRenderListener((PageRenderListener) this);
   
  -        if (this instanceof PageCleanupListener)
  -            _page.addPageCleanupListener((PageCleanupListener) this);
  -
           finishLoad();
       }
   
  @@ -560,7 +559,8 @@
       public void setContainer(IComponent value)
       {
           if (_container != null)
  -            throw new ApplicationRuntimeException(Tapestry.getString("AbstractComponent.attempt-to-change-container"));
  +            throw new ApplicationRuntimeException(
  +                Tapestry.getString("AbstractComponent.attempt-to-change-container"));
   
           _container = value;
       }
  @@ -600,7 +600,8 @@
           String containerIdPath;
   
           if (_container == null)
  -            throw new NullPointerException(Tapestry.getString("AbstractComponent.null-container",
this));
  +            throw new NullPointerException(
  +                Tapestry.getString("AbstractComponent.null-container", this));
   
           containerIdPath = _container.getIdPath();
   
  @@ -620,7 +621,8 @@
       public void setPage(IPage value)
       {
           if (_page != null)
  -            throw new ApplicationRuntimeException(Tapestry.getString("AbstractComponent.attempt-to-change-page"));
  +            throw new ApplicationRuntimeException(
  +                Tapestry.getString("AbstractComponent.attempt-to-change-page"));
   
           _page = value;
       }
  @@ -633,7 +635,8 @@
       public void setSpecification(ComponentSpecification value)
       {
           if (_specification != null)
  -            throw new ApplicationRuntimeException(Tapestry.getString("AbstractComponent.attempt-to-change-spec"));
  +            throw new ApplicationRuntimeException(
  +                Tapestry.getString("AbstractComponent.attempt-to-change-spec"));
   
           _specification = value;
       }
  @@ -750,7 +753,7 @@
   
           // Now, iterate over the formal parameters and add the formal parameters
           // that have a binding.
  -        
  +
           List names = _specification.getParameterNames();
   
           int count = names.size();
  @@ -870,7 +873,8 @@
        * 
        **/
   
  -    public final void render(IMarkupWriter writer, IRequestCycle cycle) throws RequestCycleException
  +    public final void render(IMarkupWriter writer, IRequestCycle cycle)
  +        throws RequestCycleException
       {
           try
           {
  @@ -912,7 +916,8 @@
        * 
        **/
   
  -    protected abstract void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
throws RequestCycleException;
  +    protected abstract void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
  +        throws RequestCycleException;
   
       /**
        *  Invoked by {@link #render(IMarkupWriter, IRequestCycle)}
  
  
  
  1.17      +18 -31    jakarta-tapestry/framework/src/net/sf/tapestry/AbstractPage.java
  
  Index: AbstractPage.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/AbstractPage.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- AbstractPage.java	24 Jan 2003 00:49:34 -0000	1.16
  +++ AbstractPage.java	7 Feb 2003 04:20:32 -0000	1.17
  @@ -407,16 +407,15 @@
       }
   
       /**
  -     *  Invokes {@link PageCleanupListener#pageCleanup(PageEvent)} on any
  -     *  listener.
  -     *
  -     *  <p>Subclasses may override, but should invoke this implementation.
  +     *  Does nothing.
  +     * 
  +     *  @deprecated With no replacement.
  +     *  @see PageCleanupListener
        *
        **/
   
       public void cleanupPage()
       {
  -        firePageCleanup();
       }
   
       /**
  @@ -475,9 +474,16 @@
           addListener(PageRenderListener.class, listener);
       }
   
  +	/**
  +	 *  Does nothing.
  +	 * 
  +	 *  @deprecated With no replacement.
  +     *  @see PageCleanupListener
  +     * 
  +     **/
  +	
       public void addPageCleanupListener(PageCleanupListener listener)
       {
  -        addListener(PageCleanupListener.class, listener);
       }
   
       /**
  @@ -560,36 +566,17 @@
               }
           }
       }
  -    protected void firePageCleanup()
  -    {
  -        if (_listenerList == null)
  -            return;
   
  -        PageEvent event = null;
  -        Object[] listeners = _listenerList.getListenerList();
  -
  -        for (int i = 0; i < listeners.length; i += 2)
  -        {
  -            if (listeners[i] == PageCleanupListener.class)
  -            {
  -                PageCleanupListener l = (PageCleanupListener) listeners[i + 1];
  -
  -                if (event == null)
  -                    event = new PageEvent(this, null);
  -
  -                l.pageCleanup(event);
  -            }
  -        }
  -    }
  -
  -    /**
  -     *  @since 2.1-beta-2
  +	/**
  +	 *  Does nothing.
  +	 * 
  +	 *  @deprecated With no replacement.
  +     *  @see PageCleanupListener
        * 
        **/
   
       public void removePageCleanupListener(PageCleanupListener listener)
       {
  -        removeListener(PageCleanupListener.class, listener);
       }
   
       /**
  
  
  

Mime
View raw message