Author: gseitz Date: Sat Nov 3 15:29:53 2007 New Revision: 591700 URL: http://svn.apache.org/viewvc?rev=591700&view=rev Log: WICKET-1043: updated javadoc and remove Page#newVersionManager
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Page.java Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Page.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Page.java?rev=591700&r1=591699&r2=591700&view=diff ============================================================================== --- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Page.java (original) +++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Page.java Sat Nov 3 15:29:53 2007 @@ -35,6 +35,7 @@ import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.model.IModel; import org.apache.wicket.request.RequestParameters; +import org.apache.wicket.session.ISessionStore; import org.apache.wicket.session.pagemap.IPageMapEntry; import org.apache.wicket.settings.IDebugSettings; import org.apache.wicket.util.concurrent.ConcurrentHashMap; @@ -99,10 +100,8 @@ * * <li><b>Back Button </b>- Pages can support the back button by enabling versioning with a call to * setVersioned(boolean). If a Page is versioned and changes occur to it which need to be tracked, a - * version manager will be installed using the overridable factory method newVersionManager(). The - * default version manager returned by the base implementation of this method is an instance of - * UndoPageVersionManager, which manages versions of a page by keeping change records that can be - * reversed at a later time. + * version manager will be installed using the [EMAIL PROTECTED] ISessionStore}'s factory method + * newVersionManager(). * * <li><b>Security </b>- See [EMAIL PROTECTED] IAuthorizationStrategy}, * [EMAIL PROTECTED] SimplePageAuthorizationStrategy} @@ -146,7 +145,7 @@ * */ public Page deserializePage(int id, String name, Page page, ObjectInputStream stream) - throws IOException, ClassNotFoundException; + throws IOException, ClassNotFoundException; /** * Called from the [EMAIL PROTECTED] Page#writeObject(java.io.ObjectOutputStream)} method. @@ -337,7 +336,7 @@ // that forwards to IAuthorizationStrategy for RequestListenerInterface // invocations. public void afterCallComponent(final Component component, - final RequestListenerInterface listener) + final RequestListenerInterface listener) { } @@ -358,7 +357,7 @@ // that forwards to IAuthorizationStrategy for RequestListenerInterface // invocations. public void beforeCallComponent(final Component component, - final RequestListenerInterface listener) + final RequestListenerInterface listener) { } @@ -380,7 +379,7 @@ if (renderedComponents.add(component) == false) { throw new MarkupException("The component " + component + - " has the same wicket:id as another component already added at the same level"); + " has the same wicket:id as another component already added at the same level"); } if (log.isDebugEnabled()) { @@ -585,7 +584,7 @@ else { log.info("No version manager available to retrieve requested versionNumber " + - versionNumber); + versionNumber); return null; } } @@ -614,7 +613,7 @@ // If we went all the way back to the original page if (page != null && page.getCurrentVersionNumber() == 0 && - page.getAjaxVersionNumber() == 0) + page.getAjaxVersionNumber() == 0) { // remove version info page.versionManager = null; @@ -655,7 +654,7 @@ levels++; } buffer.append(StringValue.repeat(levels, " ") + component.getPageRelativePath() + - ":" + Classes.simpleName(component.getClass())); + ":" + Classes.simpleName(component.getClass())); return null; } }); @@ -751,7 +750,7 @@ if (getStatelessHint()) { log.warn("Page '" + this + "' is not stateless because it is not bookmarkable, " + - "but the stateless hint is set to true!"); + "but the stateless hint is set to true!"); } } @@ -783,7 +782,7 @@ if (!stateless.booleanValue() && getStatelessHint()) { log.warn("Page '" + this + "' is not stateless because of '" + returnArray[0] + - "' but the stateless hint is set to true!"); + "' but the stateless hint is set to true!"); } } @@ -812,13 +811,13 @@ * will remain unchanged. */ public final void removePersistedFormData(final Class formClass, - final boolean disablePersistence) + final boolean disablePersistence) { // Check that formClass is an instanceof Form if (!Form.class.isAssignableFrom(formClass)) { throw new WicketRuntimeException("Form class " + formClass.getName() + - " is not a subclass of Form"); + " is not a subclass of Form"); } // Visit all children which are an instance of formClass @@ -965,8 +964,8 @@ if (value && !isBookmarkable()) { throw new WicketRuntimeException( - "Can't set stateless hint to true on a page when the page is not bookmarkable, page: " + - this); + "Can't set stateless hint to true on a page when the page is not bookmarkable, page: " + + this); } setFlag(FLAG_STATELESS_HINT, value); } @@ -994,13 +993,13 @@ if (versionManager != null) { return "[Page class = " + getClass().getName() + ", id = " + getId() + ", version = " + - versionManager.getCurrentVersionNumber() + ", ajax = " + - versionManager.getAjaxVersionNumber() + "]"; + versionManager.getCurrentVersionNumber() + ", ajax = " + + versionManager.getAjaxVersionNumber() + "]"; } else { return "[Page class = " + getClass().getName() + ", id = " + getId() + ", version = " + - 0 + "]"; + 0 + "]"; } } @@ -1035,9 +1034,9 @@ // Add to explanatory string to buffer buffer.append(Integer.toString(unrenderedComponents.size()) + ". " + - component + "\n"); + component + "\n"); String metadata = (String)component - .getMetaData(Component.CONSTRUCTED_AT_KEY); + .getMetaData(Component.CONSTRUCTED_AT_KEY); if (metadata != null) { buffer.append(metadata); @@ -1078,13 +1077,15 @@ { Component sibling = (Component)iterator2.next(); if (!sibling.isVisible() && sibling instanceof MarkupContainer && - ((MarkupContainer)sibling).isTransparentResolver()) + ((MarkupContainer)sibling).isTransparentResolver()) { // we found a transparent container that isn't visible // then ignore this component and only do a debug statement here. - log.warn("Component " + component + - " wasn't rendered but most likely it has a transparent parent: " + - sibling); + log + .warn("Component " + + component + + " wasn't rendered but most likely it has a transparent parent: " + + sibling); iterator.remove(); break; } @@ -1095,8 +1096,8 @@ { // Throw exception throw new WicketRuntimeException( - "The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered).\n\n" + - buffer.toString()); + "The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered).\n\n" + + buffer.toString()); } } } @@ -1205,7 +1206,7 @@ // Auto components do not participate in versioning since they are // added during the rendering phase (which is normally illegal). if (component.isAuto() || (parent == null && !component.isVersioned()) || - (parent != null && !parent.isVersioned())) + (parent != null && !parent.isVersioned())) { return false; } @@ -1331,7 +1332,7 @@ // Write out an xml declaration if the markup stream and settings allow final MarkupStream markupStream = findMarkupStream(); if ((markupStream != null) && (markupStream.getXmlDeclaration() != null) && - (application.getMarkupSettings().getStripXmlDeclarationFromOutput() == false)) + (application.getMarkupSettings().getStripXmlDeclarationFromOutput() == false)) { response.write("<?xml version='1.0' encoding='"); response.write(encoding); @@ -1377,14 +1378,6 @@ setPageMap(map); setNextAvailableId(); - } - - /** - * @return Factory method that creates a version manager for this Page - */ - protected final IPageVersionManager newVersionManager() - { - return null; } /**