Author: nbelaevski
Date: 2011-03-07 12:31:10 -0500 (Mon, 07 Mar 2011)
New Revision: 22076
Removed:
branches/4.0.X/core/impl/src/main/java/org/richfaces/component/nsutils/NSUtils.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/component/nsutils/package-info.java
branches/4.0.X/core/impl/src/test/java/org/richfaces/component/nsutils/NSUtilsTest.java
Log:
Removal of legacy NSUtils class
Deleted:
branches/4.0.X/core/impl/src/main/java/org/richfaces/component/nsutils/NSUtils.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/component/nsutils/NSUtils.java 2011-03-07
17:25:05 UTC (rev 22075)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/component/nsutils/NSUtils.java 2011-03-07
17:31:10 UTC (rev 22076)
@@ -1,43 +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.richfaces.component.nsutils;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import java.io.IOException;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 21.12.2006
- */
-public final class NSUtils {
- public static final String XMLNS_PREFIX = "rich";
- public static final String XMLNS_URI =
"http://richfaces.ajax4jsf.org/rich";
- public static final String XMLNS_VALUE = "xmlns:" + XMLNS_PREFIX;
-
- private NSUtils() {
- }
-
- public static void writeNameSpace(FacesContext context, UIComponent component) throws
IOException {
- context.getResponseWriter().writeAttribute(NSUtils.XMLNS_VALUE,
NSUtils.XMLNS_URI, null);
- }
-}
Deleted:
branches/4.0.X/core/impl/src/main/java/org/richfaces/component/nsutils/package-info.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/component/nsutils/package-info.java 2011-03-07
17:25:05 UTC (rev 22075)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/component/nsutils/package-info.java 2011-03-07
17:31:10 UTC (rev 22076)
@@ -1,4 +0,0 @@
-/**
- * Custom XML namespace utility classes
- */
-package org.richfaces.component.nsutils;
Deleted:
branches/4.0.X/core/impl/src/test/java/org/richfaces/component/nsutils/NSUtilsTest.java
===================================================================
---
branches/4.0.X/core/impl/src/test/java/org/richfaces/component/nsutils/NSUtilsTest.java 2011-03-07
17:25:05 UTC (rev 22075)
+++
branches/4.0.X/core/impl/src/test/java/org/richfaces/component/nsutils/NSUtilsTest.java 2011-03-07
17:31:10 UTC (rev 22076)
@@ -1,61 +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.richfaces.component.nsutils;
-
-import java.io.StringWriter;
-
-import javax.faces.component.UIInput;
-import javax.faces.context.ResponseWriter;
-
-import org.jboss.test.faces.AbstractFacesTest;
-
-public class NSUtilsTest extends AbstractFacesTest {
- public void setUp() throws Exception {
- super.setUp();
- setupFacesRequest();
- }
-
- public void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testWriteNameSpace() throws Exception {
- final StringWriter stringWriter = new StringWriter();
- ResponseWriter writer =
facesContext.getRenderKit().createResponseWriter(stringWriter, "text/html",
"UTF-8");
-
- facesContext.setResponseWriter(writer);
-
- UIInput input = new UIInput();
-
- writer.startDocument();
- writer.startElement("span", input);
- NSUtils.writeNameSpace(facesContext, input);
- writer.endElement("span");
- writer.endDocument();
-
- String result = stringWriter.getBuffer().toString();
-
- assertTrue(result.contains("span
xmlns:rich=\"http://richfaces.ajax4jsf.org/rich\""));
- }
-}