Author: nbelaevski
Date: 2010-12-23 11:14:34 -0500 (Thu, 23 Dec 2010)
New Revision: 20781
Added:
trunk/core/impl/src/test/java/org/ajax4jsf/io/FastBufferOutputStreamTest.java
trunk/core/impl/src/test/java/org/ajax4jsf/io/FastBufferWriterTest.java
Removed:
trunk/core/impl/src/main/java/org/ajax4jsf/config/
trunk/core/impl/src/main/java/org/ajax4jsf/css/
trunk/core/impl/src/main/java/org/ajax4jsf/event/
trunk/core/impl/src/main/java/org/ajax4jsf/javascript/
trunk/core/impl/src/main/java/org/ajax4jsf/request/
trunk/core/impl/src/main/java/org/ajax4jsf/resource/image/animatedgif/
trunk/core/impl/src/main/java/org/ajax4jsf/webapp/XMLResponseWriterState.java
trunk/core/impl/src/main/java/org/ajax4jsf/webapp/package-info.java
trunk/core/impl/src/main/java/org/ajax4jsf/webapp/taglib/
trunk/core/impl/src/main/resources/org/ajax4jsf/webapp/
trunk/core/impl/src/main/resources/org/ajax4jsf/xml/
trunk/core/impl/src/test/java/org/ajax4jsf/config/
trunk/core/impl/src/test/java/org/ajax4jsf/io/parser/FastBufferOutputStreamTest.java
trunk/core/impl/src/test/java/org/ajax4jsf/io/parser/FastBufferWriterTest.java
trunk/core/impl/src/test/java/org/ajax4jsf/javascript/
Modified:
trunk/core/impl/src/main/resources/META-INF/faces-config.xml
Log:
Legacy 3.x code removal
Deleted: trunk/core/impl/src/main/java/org/ajax4jsf/webapp/XMLResponseWriterState.java
===================================================================
---
trunk/core/impl/src/main/java/org/ajax4jsf/webapp/XMLResponseWriterState.java 2010-12-23
16:09:52 UTC (rev 20780)
+++
trunk/core/impl/src/main/java/org/ajax4jsf/webapp/XMLResponseWriterState.java 2010-12-23
16:14:34 UTC (rev 20781)
@@ -1,132 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.webapp;
-
-import java.io.IOException;
-
-import javax.faces.component.UIComponent;
-
-import org.ajax4jsf.Messages;
-
-/**
- * @author shura Class to implement state pattern for
- * <code>ResponceWriter</code> Real states must extend this. By
- * default, block any events, ignore output.
- */
-class XMLResponseWriterState {
-
- // private ResponseWriter writer;
-
- /**
- * @throws java.io.IOException
- */
- private static final String ILLEGAL_METOD_STATE =
Messages.getMessage(Messages.ILLEGAL_METHOD_STATE);
-
- void endDocument() throws IOException {
- throw new IOException(ILLEGAL_METOD_STATE);
- }
-
- /**
- * @param name
- * @throws java.io.IOException
- */
- void endElement(String name) throws IOException {
- throw new IOException(ILLEGAL_METOD_STATE);
- }
-
- /**
- * @throws java.io.IOException
- */
- void startDocument() throws IOException {
- throw new IOException(ILLEGAL_METOD_STATE);
- }
-
- /**
- * @param name
- * @param component
- * @throws java.io.IOException
- */
- void startElement(String name, UIComponent component) throws IOException {
- throw new IOException(ILLEGAL_METOD_STATE);
- }
-
- /**
- * @param name
- * @param value
- * @param property
- * @throws java.io.IOException
- */
- void writeAttribute(String name, Object value, String property) throws IOException {
- throw new IOException(ILLEGAL_METOD_STATE);
- }
-
- /**
- * @param comment
- * @throws java.io.IOException
- */
- void writeComment(Object comment) throws IOException {
- throw new IOException(ILLEGAL_METOD_STATE);
- }
-
- /**
- * @param text
- * @param off
- * @param len
- * @throws java.io.IOException
- */
- void writeText(char[] text, int off, int len) throws IOException {
- throw new IOException(ILLEGAL_METOD_STATE);
- }
-
- /**
- * @param text
- * @param property
- * @throws java.io.IOException
- */
- void writeText(Object text, String property) throws IOException {
- throw new IOException(ILLEGAL_METOD_STATE);
- }
-
- /**
- * @param name
- * @param value
- * @param property
- * @throws java.io.IOException
- */
- void writeURIAttribute(String name, Object value, String property) throws IOException
{
- throw new IOException(ILLEGAL_METOD_STATE);
- }
-
- /**
- * Main hook for realise <code>Writer</code>. In document writed as
- * comment, outside of document do nothing ....
- *
- * @param cbuf
- * @param off
- * @param len
- * @throws IOException
- */
- void write(char[] cbuf, int off, int len) throws IOException {
-
- // DO NOTHING
- }
-}
Deleted: trunk/core/impl/src/main/java/org/ajax4jsf/webapp/package-info.java
===================================================================
--- trunk/core/impl/src/main/java/org/ajax4jsf/webapp/package-info.java 2010-12-23
16:09:52 UTC (rev 20780)
+++ trunk/core/impl/src/main/java/org/ajax4jsf/webapp/package-info.java 2010-12-23
16:14:34 UTC (rev 20781)
@@ -1,4 +0,0 @@
-/**
- * Web application-related stuff: filters, parsers, etc.
- */
-package org.ajax4jsf.webapp;
Modified: trunk/core/impl/src/main/resources/META-INF/faces-config.xml
===================================================================
--- trunk/core/impl/src/main/resources/META-INF/faces-config.xml 2010-12-23 16:09:52 UTC
(rev 20780)
+++ trunk/core/impl/src/main/resources/META-INF/faces-config.xml 2010-12-23 16:14:34 UTC
(rev 20781)
@@ -23,9 +23,6 @@
<system-event-class>javax.faces.event.PreRenderViewEvent</system-event-class>
</system-event-listener>
</application>
- <!-- lifecycle>
- <phase-listener>org.ajax4jsf.event.AjaxPhaseListener</phase-listener>
- </lifecycle -->
<managed-bean>
<managed-bean-name>a4j</managed-bean-name>
<managed-bean-class>org.richfaces.VersionBean</managed-bean-class>
Copied: trunk/core/impl/src/test/java/org/ajax4jsf/io/FastBufferOutputStreamTest.java
(from rev 20771,
trunk/core/impl/src/test/java/org/ajax4jsf/io/parser/FastBufferOutputStreamTest.java)
===================================================================
--- trunk/core/impl/src/test/java/org/ajax4jsf/io/FastBufferOutputStreamTest.java
(rev 0)
+++
trunk/core/impl/src/test/java/org/ajax4jsf/io/FastBufferOutputStreamTest.java 2010-12-23
16:14:34 UTC (rev 20781)
@@ -0,0 +1,84 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+
+package org.ajax4jsf.io;
+
+import junit.framework.TestCase;
+
+import org.ajax4jsf.io.ByteBuffer;
+import org.ajax4jsf.io.FastBufferOutputStream;
+
+/**
+ * @author Nick Belaevski
+ * @since 3.3.0
+ */
+public class FastBufferOutputStreamTest extends TestCase {
+
+ /**
+ * Test method for {@link org.ajax4jsf.io.FastBufferOutputStream#reset()}.
+ */
+ public void testResetOneBuffer() throws Exception {
+ FastBufferOutputStream stream = new FastBufferOutputStream(256);
+
+ for (int i = 0; i < 255; i++) {
+ stream.write(i);
+ }
+
+ assertEquals(255, stream.getLength());
+
+ ByteBuffer firstBuffer = stream.getFirstBuffer();
+
+ assertNull(firstBuffer.getNext());
+ assertNull(firstBuffer.getPrevious());
+ stream.reset();
+ assertEquals(0, stream.getLength());
+ firstBuffer = stream.getFirstBuffer();
+ assertEquals(0, firstBuffer.getUsedSize());
+ assertNull(firstBuffer.getNext());
+ assertNull(firstBuffer.getPrevious());
+ }
+
+ /**
+ * Test method for {@link org.ajax4jsf.io.FastBufferOutputStream#reset()}.
+ */
+ public void testResetTwoBuffers() throws Exception {
+ FastBufferOutputStream stream = new FastBufferOutputStream(256);
+
+ for (int i = 0; i < 257; i++) {
+ stream.write(i);
+ }
+
+ assertEquals(257, stream.getLength());
+
+ ByteBuffer firstBuffer = stream.getFirstBuffer();
+
+ assertNotNull(firstBuffer.getNext());
+ assertNull(firstBuffer.getPrevious());
+ stream.reset();
+ assertEquals(0, stream.getLength());
+ firstBuffer = stream.getFirstBuffer();
+ assertEquals(0, firstBuffer.getUsedSize());
+ assertNull(firstBuffer.getNext());
+ assertNull(firstBuffer.getPrevious());
+ }
+}
Copied: trunk/core/impl/src/test/java/org/ajax4jsf/io/FastBufferWriterTest.java (from rev
20771, trunk/core/impl/src/test/java/org/ajax4jsf/io/parser/FastBufferWriterTest.java)
===================================================================
--- trunk/core/impl/src/test/java/org/ajax4jsf/io/FastBufferWriterTest.java
(rev 0)
+++ trunk/core/impl/src/test/java/org/ajax4jsf/io/FastBufferWriterTest.java 2010-12-23
16:14:34 UTC (rev 20781)
@@ -0,0 +1,118 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+
+package org.ajax4jsf.io;
+
+import junit.framework.TestCase;
+
+import org.ajax4jsf.io.CharBuffer;
+import org.ajax4jsf.io.FastBufferReader;
+import org.ajax4jsf.io.FastBufferWriter;
+
+/**
+ * @author Nick Belaevski
+ * @since 3.3.0
+ */
+public class FastBufferWriterTest extends TestCase {
+
+ /**
+ * Test method for {@link org.ajax4jsf.io.FastBufferWriter#reset()}.
+ */
+ public void testResetOneBuffer() throws Exception {
+ FastBufferWriter stream = new FastBufferWriter(256);
+
+ for (int i = 0; i < 255; i++) {
+ stream.write(i);
+ }
+
+ assertEquals(255, stream.getLength());
+
+ CharBuffer firstBuffer = stream.getFirstBuffer();
+
+ assertNull(firstBuffer.getNext());
+ assertNull(firstBuffer.getPrevious());
+ stream.reset();
+ assertEquals(0, stream.getLength());
+ firstBuffer = stream.getFirstBuffer();
+ assertEquals(0, firstBuffer.getUsedSize());
+ assertNull(firstBuffer.getNext());
+ assertNull(firstBuffer.getPrevious());
+ }
+
+ /**
+ * Test method for {@link org.ajax4jsf.io.FastBufferWriter#reset()}.
+ */
+ public void testResetTwoBuffers() throws Exception {
+ FastBufferWriter stream = new FastBufferWriter(256);
+
+ for (int i = 0; i < 257; i++) {
+ stream.write(i);
+ }
+
+ assertEquals(257, stream.getLength());
+
+ CharBuffer firstBuffer = stream.getFirstBuffer();
+
+ assertNotNull(firstBuffer.getNext());
+ assertNull(firstBuffer.getPrevious());
+ stream.reset();
+ assertEquals(0, stream.getLength());
+ firstBuffer = stream.getFirstBuffer();
+ assertEquals(0, firstBuffer.getUsedSize());
+ assertNull(firstBuffer.getNext());
+ assertNull(firstBuffer.getPrevious());
+ }
+
+ public void testCompact() throws Exception {
+ int itemsTowWrite = 16384 + 16000;
+ FastBufferWriter writer = new FastBufferWriter(16384);
+
+ for (int i = 0; i < itemsTowWrite; i++) {
+ writer.write(i);
+ }
+
+ writer.close();
+
+ CharBuffer firstBuffer = writer.getFirstBuffer();
+
+ assertNotNull(firstBuffer);
+
+ CharBuffer nextBuffer = firstBuffer.getNext();
+
+ assertNotNull(nextBuffer);
+ assertNull(nextBuffer.getNext());
+ assertTrue(firstBuffer.getUsedSize() == firstBuffer.getCacheSize());
+ assertTrue(nextBuffer.getUsedSize() < nextBuffer.getCacheSize());
+ firstBuffer.compact();
+ assertTrue(firstBuffer.getUsedSize() == firstBuffer.getCacheSize());
+ assertTrue(nextBuffer.getUsedSize() == nextBuffer.getCacheSize());
+
+ FastBufferReader reader = new FastBufferReader(firstBuffer);
+
+ for (int i = 0; i < itemsTowWrite; i++) {
+ assertEquals(i, reader.read());
+ }
+
+ reader.close();
+ }
+}
Deleted:
trunk/core/impl/src/test/java/org/ajax4jsf/io/parser/FastBufferOutputStreamTest.java
===================================================================
---
trunk/core/impl/src/test/java/org/ajax4jsf/io/parser/FastBufferOutputStreamTest.java 2010-12-23
16:09:52 UTC (rev 20780)
+++
trunk/core/impl/src/test/java/org/ajax4jsf/io/parser/FastBufferOutputStreamTest.java 2010-12-23
16:14:34 UTC (rev 20781)
@@ -1,84 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-package org.ajax4jsf.io.parser;
-
-import junit.framework.TestCase;
-
-import org.ajax4jsf.io.ByteBuffer;
-import org.ajax4jsf.io.FastBufferOutputStream;
-
-/**
- * @author Nick Belaevski
- * @since 3.3.0
- */
-public class FastBufferOutputStreamTest extends TestCase {
-
- /**
- * Test method for {@link org.ajax4jsf.io.FastBufferOutputStream#reset()}.
- */
- public void testResetOneBuffer() throws Exception {
- FastBufferOutputStream stream = new FastBufferOutputStream(256);
-
- for (int i = 0; i < 255; i++) {
- stream.write(i);
- }
-
- assertEquals(255, stream.getLength());
-
- ByteBuffer firstBuffer = stream.getFirstBuffer();
-
- assertNull(firstBuffer.getNext());
- assertNull(firstBuffer.getPrevious());
- stream.reset();
- assertEquals(0, stream.getLength());
- firstBuffer = stream.getFirstBuffer();
- assertEquals(0, firstBuffer.getUsedSize());
- assertNull(firstBuffer.getNext());
- assertNull(firstBuffer.getPrevious());
- }
-
- /**
- * Test method for {@link org.ajax4jsf.io.FastBufferOutputStream#reset()}.
- */
- public void testResetTwoBuffers() throws Exception {
- FastBufferOutputStream stream = new FastBufferOutputStream(256);
-
- for (int i = 0; i < 257; i++) {
- stream.write(i);
- }
-
- assertEquals(257, stream.getLength());
-
- ByteBuffer firstBuffer = stream.getFirstBuffer();
-
- assertNotNull(firstBuffer.getNext());
- assertNull(firstBuffer.getPrevious());
- stream.reset();
- assertEquals(0, stream.getLength());
- firstBuffer = stream.getFirstBuffer();
- assertEquals(0, firstBuffer.getUsedSize());
- assertNull(firstBuffer.getNext());
- assertNull(firstBuffer.getPrevious());
- }
-}
Deleted: trunk/core/impl/src/test/java/org/ajax4jsf/io/parser/FastBufferWriterTest.java
===================================================================
---
trunk/core/impl/src/test/java/org/ajax4jsf/io/parser/FastBufferWriterTest.java 2010-12-23
16:09:52 UTC (rev 20780)
+++
trunk/core/impl/src/test/java/org/ajax4jsf/io/parser/FastBufferWriterTest.java 2010-12-23
16:14:34 UTC (rev 20781)
@@ -1,118 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-package org.ajax4jsf.io.parser;
-
-import junit.framework.TestCase;
-
-import org.ajax4jsf.io.CharBuffer;
-import org.ajax4jsf.io.FastBufferReader;
-import org.ajax4jsf.io.FastBufferWriter;
-
-/**
- * @author Nick Belaevski
- * @since 3.3.0
- */
-public class FastBufferWriterTest extends TestCase {
-
- /**
- * Test method for {@link org.ajax4jsf.io.FastBufferWriter#reset()}.
- */
- public void testResetOneBuffer() throws Exception {
- FastBufferWriter stream = new FastBufferWriter(256);
-
- for (int i = 0; i < 255; i++) {
- stream.write(i);
- }
-
- assertEquals(255, stream.getLength());
-
- CharBuffer firstBuffer = stream.getFirstBuffer();
-
- assertNull(firstBuffer.getNext());
- assertNull(firstBuffer.getPrevious());
- stream.reset();
- assertEquals(0, stream.getLength());
- firstBuffer = stream.getFirstBuffer();
- assertEquals(0, firstBuffer.getUsedSize());
- assertNull(firstBuffer.getNext());
- assertNull(firstBuffer.getPrevious());
- }
-
- /**
- * Test method for {@link org.ajax4jsf.io.FastBufferWriter#reset()}.
- */
- public void testResetTwoBuffers() throws Exception {
- FastBufferWriter stream = new FastBufferWriter(256);
-
- for (int i = 0; i < 257; i++) {
- stream.write(i);
- }
-
- assertEquals(257, stream.getLength());
-
- CharBuffer firstBuffer = stream.getFirstBuffer();
-
- assertNotNull(firstBuffer.getNext());
- assertNull(firstBuffer.getPrevious());
- stream.reset();
- assertEquals(0, stream.getLength());
- firstBuffer = stream.getFirstBuffer();
- assertEquals(0, firstBuffer.getUsedSize());
- assertNull(firstBuffer.getNext());
- assertNull(firstBuffer.getPrevious());
- }
-
- public void testCompact() throws Exception {
- int itemsTowWrite = 16384 + 16000;
- FastBufferWriter writer = new FastBufferWriter(16384);
-
- for (int i = 0; i < itemsTowWrite; i++) {
- writer.write(i);
- }
-
- writer.close();
-
- CharBuffer firstBuffer = writer.getFirstBuffer();
-
- assertNotNull(firstBuffer);
-
- CharBuffer nextBuffer = firstBuffer.getNext();
-
- assertNotNull(nextBuffer);
- assertNull(nextBuffer.getNext());
- assertTrue(firstBuffer.getUsedSize() == firstBuffer.getCacheSize());
- assertTrue(nextBuffer.getUsedSize() < nextBuffer.getCacheSize());
- firstBuffer.compact();
- assertTrue(firstBuffer.getUsedSize() == firstBuffer.getCacheSize());
- assertTrue(nextBuffer.getUsedSize() == nextBuffer.getCacheSize());
-
- FastBufferReader reader = new FastBufferReader(firstBuffer);
-
- for (int i = 0; i < itemsTowWrite; i++) {
- assertEquals(i, reader.read());
- }
-
- reader.close();
- }
-}