Skip to content

Commit

Permalink
fix the test
Browse files Browse the repository at this point in the history
  • Loading branch information
rareddy committed Oct 10, 2014
1 parent eec7fe8 commit ef4dc8a
Show file tree
Hide file tree
Showing 27 changed files with 4,050 additions and 12 deletions.
34 changes: 31 additions & 3 deletions build/assembly/jboss-as7/dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,34 @@
<unpack>false</unpack>
<outputDirectory>modules/system/layers/base/org/jboss/teiid/main/deployments</outputDirectory>
</binaries>
</moduleSet>
</moduleSet>

<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>org.jboss.teiid:teiid-olingo</include>
</includes>
<binaries>
<includeDependencies>false</includeDependencies>
<unpack>false</unpack>
<outputDirectory>modules/system/layers/base/org/jboss/teiid/olingo/main</outputDirectory>
</binaries>
</moduleSet>

<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>org.jboss.teiid:teiid-olingo</include>
</includes>
<binaries>
<includeDependencies>false</includeDependencies>
<unpack>false</unpack>
<outputDirectory>modules/system/layers/base/org/jboss/teiid/main/deployments</outputDirectory>
<includes>
<include>org.jboss.teiid:teiid-olingo:war</include>
</includes>
</binaries>
</moduleSet>

<!-- These are Teiid internal dependencies; to make JCA work -->
<moduleSet>
Expand Down Expand Up @@ -164,7 +191,9 @@
<outputDirectory>modules/system/layers/base/org/jboss/teiid/admin/main</outputDirectory>
</binaries>
</moduleSet>




<!-- ********************************************************
These are built in resource-adapters
*********************************************************-->
Expand Down Expand Up @@ -205,5 +234,4 @@
</moduleSet>

</moduleSets>

</assembly>
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
teiid-odata-${project.version}.war
teiid-odata-${project.version}.war
teiid-olingo-${project.version}.war
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.jboss.teiid.olingo">
<resources>
<!--
<resource-root path="teiid-olingo-${project.version}.jar" />
<resource-root path="olingo-commons-api-${version.org.apache.olingo}.jar" />
<resource-root path="olingo-commons-core-${version.org.apache.olingo}.jar" />
<resource-root path="olingo-server-api-${version.org.apache.olingo}.jar" />
<resource-root path="olingo-server-core-${version.org.apache.olingo}.jar" />
-->
</resources>

<dependencies>
<!--
<module name="org.apache.olingo" />
-->
<module name="org.jboss.teiid" />
<module name="org.apache.httpcomponents"/>
</dependencies>

</module>
155 changes: 155 additions & 0 deletions olingo/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>8.9.0.Alpha3-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-olingo</artifactId>
<name>teiid-olingo</name>
<description>Teiid OData4 Server module</description>
<packaging>war</packaging>


<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<manifestFile>src/main/webapp/META-INF/MANIFEST.MF</manifestFile>
</archive>
<archiveClasses>true</archiveClasses>
<!--
<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
-->
</configuration>
<!--
<executions>
<execution>
<id>create-assemblies</id>
<phase>package</phase>
<goals>
<goal>war</goal>
</goals>
</execution>
</executions>
-->
</plugin>
</plugins>
</build>

<dependencies>

<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-engine</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-api</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-client</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-admin</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-runtime</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-commons-api</artifactId>
</dependency>

<dependency>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-commons-core</artifactId>
</dependency>

<dependency>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-server-api</artifactId>
</dependency>

<dependency>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-server-core</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-runtime</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-engine</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-common-core</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>translator-loopback</artifactId>
<groupId>org.jboss.teiid.connectors</groupId>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>translator-jdbc</artifactId>
<groupId>org.jboss.teiid.connectors</groupId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
64 changes: 64 additions & 0 deletions olingo/src/main/java/org/teiid/olingo/Client.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* JBoss, Home of Professional Open Source.
* See the COPYRIGHT.txt file distributed with this work for information
* regarding copyright ownership. Some portions may be licensed
* to Red Hat, Inc. under one or more contributor license agreements.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* 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.teiid.olingo;

import java.util.List;
import java.util.Map;

import org.apache.olingo.commons.api.edm.EdmEntitySet;
import org.apache.olingo.commons.core.edm.primitivetype.SingletonPrimitiveType;
import org.apache.olingo.server.api.uri.UriInfo;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.metadata.MetadataStore;
import org.teiid.query.sql.lang.Command;
import org.teiid.query.sql.lang.Query;

public interface Client {
VDBMetaData getVDB();

MetadataStore getMetadataStore();

BaseResponse executeCall(String sql, List<SQLParam> sqlParams, SingletonPrimitiveType returnType);

EntityList executeSQL(Query query, List<SQLParam> parameters, EdmEntitySet entitySet, List<ProjectedColumn> projectedColumns, UriInfo queryInfo);

CountResponse executeCount(Query query, List<SQLParam> parameters);

UpdateResponse executeUpdate(Command command, List<SQLParam> parameters);
}

interface UpdateResponse {
Map<String, Object> getGeneratedKeys();
int getUpdateCount();
}

interface CountResponse {
long getCount();
}

interface BaseResponse {
}

interface ProjectedColumn {
String getName();
boolean isVisible();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* JBoss, Home of Professional Open Source.
* See the COPYRIGHT.txt file distributed with this work for information
* regarding copyright ownership. Some portions may be licensed
* to Red Hat, Inc. under one or more contributor license agreements.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* 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.teiid.olingo;

import javax.servlet.http.HttpServletRequest;

public class ContextAwareHttpSerlvetRequest extends HttpServletRequestDelegate {
private String contextPath;

public ContextAwareHttpSerlvetRequest(HttpServletRequest delegate) {
super(delegate);
}

public void setContextPath(String path) {
this.contextPath = path;
}

public String getContextPath() {
if (contextPath != null) {
return contextPath;
}
return super.getContextPath();
}
}
Loading

0 comments on commit ef4dc8a

Please sign in to comment.