[vlma-devel] commit: Add successView for streamChannel to : (Adrien Maglo )

git version control git at videolan.org
Tue May 20 14:38:05 CEST 2008


vlma | branch: master | Adrien Maglo <magsoft at videolan.org> | Tue May 20 14:23:52 2008 +0200| [7af9a91bde5e2b8b59720207aff9182e21408467]

Add successView for streamChannel to :
- add a program,
- remove a program,
- and remove a streamChannel.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=7af9a91bde5e2b8b59720207aff9182e21408467
---

 .../vlma/web/media/MediasProgramAddController.java |   14 ++++++++++++++
 .../web/media/MediasProgramRemoveController.java   |   15 +++++++++++++++
 .../vlma/web/media/TNTChannelRemoveController.java |   14 ++++++++++++++
 3 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediasProgramAddController.java b/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediasProgramAddController.java
index ea186b1..017f472 100644
--- a/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediasProgramAddController.java
+++ b/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediasProgramAddController.java
@@ -35,6 +35,7 @@ import org.springframework.web.servlet.mvc.SimpleFormController;
 import org.springframework.web.servlet.view.RedirectView;
 import org.videolan.vlma.Data;
 import org.videolan.vlma.model.media.FilesChannel;
+import org.videolan.vlma.model.media.StreamChannel;
 import org.videolan.vlma.model.media.Media;
 import org.videolan.vlma.model.media.SatChannel;
 import org.videolan.vlma.model.media.TNTChannel;
@@ -48,6 +49,8 @@ public class MediasProgramAddController extends SimpleFormController {
 
     private String successViewFiles;
 
+    private String successViewStream;
+
     public Data getData() {
         return data;
     }
@@ -72,6 +75,14 @@ public class MediasProgramAddController extends SimpleFormController {
         this.successViewFiles = successViewFiles;
     }
 
+    public String getSuccessViewStream() {
+        return successViewStream;
+    }
+
+    public void setSuccessViewStream(String successViewStream) {
+        this.successViewStream = successViewStream;
+    }
+
     @Override
     public ModelAndView onSubmit(Object command) throws ServletException,
             MalformedURLException, IOException {
@@ -90,6 +101,9 @@ public class MediasProgramAddController extends SimpleFormController {
         if (media.getClass() == FilesChannel.class) {
             successView = getSuccessViewFiles();
         }
+        else if (media.getClass() == StreamChannel.class) {
+            successView = getSuccessViewStream();
+        }
         else {
             successView = getSuccessViewMedias();
         }
diff --git a/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediasProgramRemoveController.java b/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediasProgramRemoveController.java
index a790a12..1904e97 100644
--- a/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediasProgramRemoveController.java
+++ b/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediasProgramRemoveController.java
@@ -35,6 +35,7 @@ import org.springframework.web.servlet.view.RedirectView;
 import org.videolan.vlma.Data;
 import org.videolan.vlma.model.media.FilesChannel;
 import org.videolan.vlma.model.media.Media;
+import org.videolan.vlma.model.media.StreamChannel;
 
 public class MediasProgramRemoveController extends SimpleFormController {
 
@@ -44,6 +45,8 @@ public class MediasProgramRemoveController extends SimpleFormController {
 
     private String successViewFiles;
 
+    private String successViewStream;
+
     public Data getData() {
         return data;
     }
@@ -67,6 +70,15 @@ public class MediasProgramRemoveController extends SimpleFormController {
     public void setSuccessViewFiles(String successViewFiles) {
         this.successViewFiles = successViewFiles;
     }
+
+    public String getSuccessViewStream() {
+        return successViewStream;
+    }
+
+    public void setSuccessViewStream(String successViewStream) {
+        this.successViewStream = successViewStream;
+    }
+
     @Override
     public ModelAndView onSubmit(Object command) throws ServletException,
             UnknownHostException {
@@ -79,6 +91,9 @@ public class MediasProgramRemoveController extends SimpleFormController {
         if (media.getClass() == FilesChannel.class) {
             successView = getSuccessViewFiles();
         }
+        else if (media.getClass() == StreamChannel.class) {
+            successView = getSuccessViewStream();
+        }
         else {
             successView = getSuccessViewMedias();
         }
diff --git a/vlma-webapp/src/main/java/org/videolan/vlma/web/media/TNTChannelRemoveController.java b/vlma-webapp/src/main/java/org/videolan/vlma/web/media/TNTChannelRemoveController.java
index fe68302..627cb6b 100644
--- a/vlma-webapp/src/main/java/org/videolan/vlma/web/media/TNTChannelRemoveController.java
+++ b/vlma-webapp/src/main/java/org/videolan/vlma/web/media/TNTChannelRemoveController.java
@@ -35,6 +35,7 @@ import org.springframework.web.servlet.view.RedirectView;
 import org.videolan.vlma.Data;
 import org.videolan.vlma.model.media.FilesChannel;
 import org.videolan.vlma.model.media.Media;
+import org.videolan.vlma.model.media.StreamChannel;
 
 public class TNTChannelRemoveController extends SimpleFormController {
 
@@ -44,6 +45,8 @@ public class TNTChannelRemoveController extends SimpleFormController {
 
     private String successViewFiles;
 
+    private String successViewStream;
+
     public Data getData() {
         return data;
     }
@@ -64,6 +67,14 @@ public class TNTChannelRemoveController extends SimpleFormController {
         this.successViewFiles = successViewFiles;
     }
 
+    public String getSuccessViewStream() {
+        return successViewStream;
+    }
+
+    public void setSuccessViewStream(String successViewStream) {
+        this.successViewStream = successViewStream;
+    }
+
     public void setData(Data data) {
         this.data = data;
     }
@@ -82,6 +93,9 @@ public class TNTChannelRemoveController extends SimpleFormController {
         if (media.getClass() == FilesChannel.class) {
             successView = getSuccessViewFiles();
         }
+        else if (media.getClass() == StreamChannel.class) {
+            successView = getSuccessViewStream();
+        }
         else {
             successView = getSuccessViewMedias();
         }



More information about the vlma-devel mailing list