Skip to content
This repository has been archived by the owner on Jun 8, 2018. It is now read-only.

Commit

Permalink
add gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
denisneuling committed Dec 8, 2012
1 parent cc86ab1 commit 5957889
Show file tree
Hide file tree
Showing 24 changed files with 360 additions and 118 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.class
.classpath

# Package Files #
*.jar
*.war
*.ear

# Eclipse Files #
.settings/
.project

# Maven Files #
target/
41 changes: 7 additions & 34 deletions apitrary-api-client/.classpath
Original file line number Diff line number Diff line change
@@ -1,36 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
<classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
<classpathentry kind="src" path="src/main/java" including="**/*.java"/>
<classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
</classpath>
14 changes: 14 additions & 0 deletions apitrary-api-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.class
.classpath

# Package Files #
*.jar
*.war
*.ear

# Eclipse Files #
.settings/
.project

# Maven Files #
target/
37 changes: 16 additions & 21 deletions apitrary-api-client/.project
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>apitrary-api-client</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
<name>apitrary-api-client</name>
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@

public class Client {

private static String apiAuthHeaderKey = "X-Api-Key";

private Header createHeader(){

}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package com.apitrary.api.client.serialization;

import javax.xml.ws.Response;

import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonSyntaxException;
import com.sun.xml.internal.ws.encoding.soap.SerializationException;

public class ResultSerializer {

protected Gson gson;

/**
* <p>
* Constructor for JsonDeserializer.
* </p>
*/
public ResultSerializer() {
initializeGson();
}

/**
*
*/
private void initializeGson() {
gson = new GsonBuilder().setExclusionStrategies(new ExclusionStrategy() {
public boolean shouldSkipField(FieldAttributes fieldAttributes) {
if (fieldAttributes.getName().equalsIgnoreCase("serialVersionUUID")) {
return true;
}
return false;
}

public boolean shouldSkipClass(Class<?> arg0) {
return false;
}
}).create();
}

/**
* <p>
* fromJSON.
* </p>
*
* @param response
* a {@link java.lang.String} object.
* @param target
* a {@link com.cloudcontrolled.api.response.Response} object.
* @param <T>
* a T object.
* @return a {@link com.cloudcontrolled.api.response.Response} object.
*/
@SuppressWarnings("unchecked")
public <T> Response<T> fromJSON(String response, Response<T> target) {
try {
response = StandardizationUtil.getJSONStandardizer(target).normalize(response);
} catch (Exception e) {
throw new SerializationException(e);
}

try {
Response<T> fromJson = gson.fromJson(response, target.getClass());
if (fromJson == null) {
fromJson = target;
}
return fromJson;
} catch (JsonSyntaxException jse) {
throw new SerializationException(jse);
}
}

}
42 changes: 8 additions & 34 deletions apitrary-api/.classpath
Original file line number Diff line number Diff line change
@@ -1,36 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
<classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
<classpathentry kind="src" path="src/main/java" including="**/*.java"/>
<classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/com/google/code/gson/gson/2.2.2/gson-2.2.2.jar"/>
</classpath>
14 changes: 14 additions & 0 deletions apitrary-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.class
.classpath

# Package Files #
*.jar
*.war
*.ear

# Eclipse Files #
.settings/
.project

# Maven Files #
target/
37 changes: 16 additions & 21 deletions apitrary-api/.project
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>apitrary-api</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
<name>apitrary-api</name>
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
26 changes: 18 additions & 8 deletions apitrary-api/pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.apitrary</groupId>
<artifactId>apitrary-jar</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>apitrary-api</artifactId>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.apitrary</groupId>
<artifactId>apitrary-jar</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>apitrary-api</artifactId>

<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.apitrary.api.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.apitrary.api.response.normalized.Normalizer;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Normalized {

Class<? extends Normalizer> value() default Normalizer.class;
}
13 changes: 13 additions & 0 deletions apitrary-api/src/main/java/com/apitrary/api/annotation/Path.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.apitrary.api.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Path {


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.apitrary.api.request;

import java.io.Serializable;

public abstract class AbstractRequest implements Serializable{
private static final long serialVersionUID = -5919354837987240483L;

}
Loading

0 comments on commit 5957889

Please sign in to comment.