Permalink
Browse files

adding missing files

  • Loading branch information...
1 parent 2f01b12 commit 53e6c2b37bd5c151bd3a5099dc00c3af58184d9d @mdhari committed Nov 11, 2011
View
28 WebPages/addAlbum.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Add Album</title>
+<script type="text/javascript"
+ src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
+</head>
+<body>
+
+<script type="text/javascript">
+
+$.ajax({
+ url: "http://localhost:8080/OneVillage/photo/album",
+ type: "POST",
+ contentType: "application/json;charset=utf-8",
+ data: '{"album_name":"MyFirstPhotoAlbum","user_id":"1234","created_date":"created"}',
+ dataType: "application/xml",
+ success: function(result) {
+ alert(result);
+ }
+});
+
+
+</script>
+
+</body>
+</html>
View
22 WebPages/addPhotoToAlbum.html
@@ -0,0 +1,22 @@
+<html>
+<body>
+ <h1>File Upload with Jersey</h1>
+
+ <form action="OneVillage/photo/album/5/1" method="post" enctype="multipart/form-data">
+
+ Time Taken: <input type="text" name="time_taken" />
+ Latitude: <input type="text" name="latitude" />
+ Longitude: <input type="text" name="longitude" />
+ Album ID: <input type="text" name="album_id" />
+ Created By: <input type="text" name="created_by" />
+ Description: <input type="text" name="description" />
+
+ <p>
+ Select a file : <input type="file" name="file" size="45" />
+ </p>
+
+ <input type="submit" value="Upload It" />
+ </form>
+
+</body>
+</html>
View
3 WebPages/fileupload.html
@@ -2,8 +2,9 @@
<body>
<h1>File Upload with Jersey</h1>
- <form action="OneVillage/photo/uploadTest" method="post" enctype="multipart/form-data">
+ <form action="OneVillage/photo/album/1234" method="post" enctype="multipart/form-data">
+ User Id: <input type="text" name="user_id" />
Time Taken: <input type="text" name="time_taken" />
Latitude: <input type="text" name="latitude" />
Longitude: <input type="text" name="longitude" />
View
28 WebPages/updatePhotoInfo.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Add Album</title>
+<script type="text/javascript"
+ src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
+</head>
+<body>
+
+<script type="text/javascript">
+
+$.ajax({
+ url: "http://localhost:8080/OneVillage/photo/album/1234",
+ type: "POST",
+ contentType: "application/json;charset=utf-8",
+ data: '{"photo_id":"12345","user_id":"1234","time_taken":"12:13:12"}',
+ dataType: "application/json",
+ success: function(result) {
+ alert(result);
+ }
+});
+
+
+</script>
+
+</body>
+</html>
View
35 src/edu/sjsu/carbonated/data/PhotoResponse.java
@@ -0,0 +1,35 @@
+package edu.sjsu.carbonated.data;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class PhotoResponse{
+
+ private String photo_id;
+
+ public PhotoResponse(){
+ // JAXB needs this
+ }
+
+ public PhotoResponse(String photo_id){
+ this.photo_id=photo_id;
+ }
+
+ /**
+ * @return the photo_id
+ */
+ public String getPhoto_id() {
+ return photo_id;
+ }
+
+ /**
+ * @param photo_id the photo_id to set
+ */
+ public void setPhoto_id(String photo_id) {
+ this.photo_id = photo_id;
+ }
+
+
+
+
+}
View
9 src/edu/sjsu/carbonated/util/Utils.java
@@ -0,0 +1,9 @@
+package edu.sjsu.carbonated.util;
+
+public class Utils{
+
+ public static boolean isEmptyString(String data){
+ return (data == null || data.isEmpty())?true:false;
+ }
+
+}

0 comments on commit 53e6c2b

Please sign in to comment.