Permalink
Browse files

Removed libraries/vaadin from the SDK

  • Loading branch information...
1 parent 0894b82 commit 265d6fa4c5f7db0837ef7e734c472b6c18512f1b @eskatos eskatos committed Feb 13, 2012
View
@@ -27,7 +27,6 @@ slf4jVersion = '1.6.1'
solrVersion = "1.4.1"
springVersion = '2.5.6'
strutsVersion = '2.1.8.1'
-vaadinVersion = '6.4.8'
velocityVersion = '1.6.2'
voldemortVersion = '0.81'
@@ -1,18 +0,0 @@
-description = "Qi4j Vaadin Library integrates the Vaadin web framework with Qi4j applications."
-
-jar { manifest { name = "Qi4j Library - Vaadin" }}
-
-dependencies {
- compile(project(":org.qi4j.core:org.qi4j.core.api"))
- compile(libraries.slf4j_api)
- compile('javax.servlet:servlet-api:'+servletVersion)
- compile('com.vaadin:vaadin:'+vaadinVersion)
- testCompile(libraries.junit)
- testCompile(project(':org.qi4j.libraries:org.qi4j.library.http'))
- testCompile(project(":org.qi4j.core:org.qi4j.core.bootstrap"))
- testCompile(project(":org.qi4j.core:org.qi4j.core.testsupport"))
- testRuntime(project(":org.qi4j.core:org.qi4j.core.runtime"))
- testRuntime(libraries.asm)
- testRuntime(libraries.asm_commons)
- testRuntime(libraries.slf4j_simple)
-}
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1">
- <status>
- <!--none,early,beta,stable,mature-->
- <codebase>beta</codebase>
-
- <!-- none, brief, good, complete -->
- <documentation>none</documentation>
-
- <!-- none, some, good, complete -->
- <unittests>none</unittests>
- </status>
- <licenses>
- <license>ALv2</license>
- </licenses>
-</module>
No changes.
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2010, Paul Merlin. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.qi4j.library.vaadin;
-
-import com.vaadin.Application;
-import com.vaadin.terminal.gwt.server.AbstractApplicationServlet;
-import org.qi4j.api.injection.scope.Structure;
-import org.qi4j.api.object.ObjectFactory;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * @author Paul Merlin
- */
-public class Qi4jVaadinApplicationServlet
- extends AbstractApplicationServlet
-{
-
- @Structure
- private ObjectFactory obf;
-
- @Override
- protected Application getNewApplication( HttpServletRequest request )
- throws ServletException
- {
- try {
- return obf.newObject( getApplicationClass() );
- } catch ( ClassNotFoundException ex ) {
- throw new ServletException( "getNewApplication failed", ex );
- }
- }
-
- @Override
- protected Class<? extends Application> getApplicationClass()
- throws ClassNotFoundException
- {
- return Application.class;
- }
-
-}
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2010, Paul Merlin. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.qi4j.library.vaadin;
-
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.ServiceComposite;
-
-import javax.servlet.Servlet;
-
-/**
- * @author Paul Merlin
- */
-@Mixins( Qi4jVaadinApplicationServlet.class )
-public interface Qi4jVaadinApplicationServletService
- extends Servlet, ServiceComposite
-{
-}
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2010, Paul Merlin. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.qi4j.library.vaadin;
-
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.ServiceComposite;
-
-/**
- * @author Paul Merlin
- */
-@Mixins( GreetService.Mixin.class )
-public interface GreetService
- extends ServiceComposite
-{
-
- String greet( String name );
-
- abstract class Mixin
- implements GreetService
- {
-
- public String greet( String name )
- {
- return "Greetings " + name + "!";
- }
-
- }
-
-}
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2010, Paul Merlin. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.qi4j.library.vaadin;
-
-import com.vaadin.Application;
-import com.vaadin.ui.*;
-import com.vaadin.ui.Button.ClickEvent;
-import org.qi4j.api.injection.scope.Service;
-
-/**
- * @author Paul Merlin
- */
-public class MyVaadinApplication
- extends Application
-{
-
- private static final long serialVersionUID = 1L;
-
- private Window window;
-
- @Service
- private GreetService greeter;
-
- @Override
- public void init()
- {
- final TextField field = new TextField();
- field.setInputPrompt( "Type your name here" );
- Button button = new Button( "Greetings mortals.." );
- button.addListener( new Button.ClickListener()
- {
-
- public void buttonClick( ClickEvent event )
- {
- String name = "" + field.getValue();
- if ( name.length() <= 0 ) {
- window.showNotification( "You must type your name in the field", Window.Notification.TYPE_ERROR_MESSAGE );
- } else {
- window.showNotification( greeter.greet( "" + field.getValue() ) );
- }
- }
-
- } );
-
- HorizontalLayout horizLayout = new HorizontalLayout();
- horizLayout.setMargin( true );
- horizLayout.addComponent( field );
- horizLayout.addComponent( button );
-
- Panel panel = new Panel( "Vaadin seems nice : )" );
- panel.addComponent( horizLayout );
-
- VerticalLayout vertLayout = new VerticalLayout();
- vertLayout.setMargin( true );
- vertLayout.addComponent( panel );
-
- window = new Window( "test app" );
- window.setSizeFull();
- window.setContent( vertLayout );
- setMainWindow( window );
- }
-
-}
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2010, Paul Merlin. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.qi4j.library.vaadin;
-
-import org.junit.Test;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.entitystore.memory.MemoryEntityStoreService;
-import org.qi4j.library.http.JettyConfiguration;
-import org.qi4j.library.http.JettyServiceAssembler;
-import org.qi4j.test.AbstractQi4jTest;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URL;
-
-import static org.junit.Assert.assertTrue;
-import static org.qi4j.library.http.Servlets.addServlets;
-import static org.qi4j.library.http.Servlets.serve;
-
-/**
- * @author Paul Merlin
- */
-public class VaadinQi4jTest
- extends AbstractQi4jTest
-{
-
- public void assemble( ModuleAssembly ma )
- throws AssemblyException
- {
- new JettyServiceAssembler().assemble( ma );
- ma.services( MemoryEntityStoreService.class );
-
- JettyConfiguration config = ma.forMixin( JettyConfiguration.class ).declareDefaults();
- config.port().set( 8041 );
- config.resourcePath().set( "/tmp" );
-
- addServlets( serve( "/mortals/*" ).with( Qi4jVaadinApplicationServletService.class ) ).to( ma );
-
- ma.services( GreetService.class );
- ma.objects( MyVaadinApplication.class );
-
- }
-
- @Test
- public void test()
- throws InterruptedException, IOException
- {
- String url = "http://localhost:8041/mortals";
- String expected = "You have to enable javascript in your browser to use an application built with Vaadin.";
-
- String got = "";
- String eachLine;
- BufferedReader r = new BufferedReader( new InputStreamReader( new URL( url ).openStream() ) );
- while ( ( eachLine = r.readLine() ) != null ) {
- got += eachLine;
- }
-
- assertTrue( got.contains( expected ) );
-
- // Uncomment this, run the test and go to http://localhost:8041/mortals to see it working :)
- // Thread.sleep( Integer.MAX_VALUE );
- }
-
-}
View
@@ -42,7 +42,6 @@ include "core:functional",
'libraries:struts2-codebehind',
'libraries:struts2-convention',
'libraries:uid',
- 'libraries:vaadin',
'extensions:cache-ehcache',
'extensions:entitystore-file',
'extensions:entitystore-gae',

0 comments on commit 265d6fa

Please sign in to comment.