Author: conkan Date: 2006-06-02 14:42:43 -0400 (Fri, 02 Jun 2006) New Revision: 4581 Added: labs/portletswap/imagegalleryportlet/trunk/gallery/ labs/portletswap/imagegalleryportlet/trunk/gallery/images/ labs/portletswap/imagegalleryportlet/trunk/gallery/images/Thumbs.db labs/portletswap/imagegalleryportlet/trunk/gallery/images/bufo.jpg labs/portletswap/imagegalleryportlet/trunk/gallery/images/desert.jpg labs/portletswap/imagegalleryportlet/trunk/gallery/images/fan.jpg labs/portletswap/imagegalleryportlet/trunk/gallery/images/rana.jpg labs/portletswap/imagegalleryportlet/trunk/gallery/images/xen.jpg labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/ labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/Thumbs.db labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/bufo.jpg labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/desert.jpg labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/fan.jpg labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/rana.jpg labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/xen.jpg labs/portletswap/imagegalleryportlet/trunk/ig_2.2/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.classpath labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.cvsignore labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.project labs/portletswap/imagegalleryportlet/trunk/ig_2.2/LICENSE.txt labs/portletswap/imagegalleryportlet/trunk/ig_2.2/README.txt labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.bat labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.log labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.sh labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.xml labs/portletswap/imagegalleryportlet/trunk/ig_2.2/portal-imagegallery.ear labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/Thumbs.db labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/add.gif labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/back.gif labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/delete.gif labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/edit.gif labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/next.gif labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/previous.gif labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/view.gif labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/etc/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/etc/portal-imagegallery-war.mf labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/Const.java labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/DataHelper.java labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/ImageGalleryModule.java labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/ImageGalleryPortlet.java labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/impl/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/impl/ImageCollectionImpl.java labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/impl/ImageDetailImpl.java labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/impl/ImageGalleryModuleImpl.java labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/model/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/model/ImageCollection.java labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/model/ImageDetail.java labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/test/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/test/imagegallery/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/test/imagegallery/ImageGalleryPortletTestCase.java labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-ear/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-ear/META-INF/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-ear/META-INF/application.xml labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-ear/META-INF/jboss-app.xml labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-har/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-har/META-INF/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-sar/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-sar/META-INF/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-sar/META-INF/jboss-service.xml labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-sar/conf/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-sar/conf/hibernate/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-sar/conf/hibernate/hibernate.cfg.xml labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-sar/conf/hibernate/setup.txt labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/classes/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/classes/Resource.properties labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/classes/Resource_en.properties labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/imagegallery-object.xml labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jboss-app.xml labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jboss-portlet.xml labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jboss-web.xml labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/browseCMS.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/collectionAdd.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/collectionDelete.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/collectionEdit.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/collectionView.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/collections.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/detailAdd.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/detailDelete.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/detailEdit.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/detailView.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/details.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/jsp/imagedetail.jsp labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/portal-lib.tld labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/portlet.xml labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/portal-imagegallery-war/WEB-INF/web.xml labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/setup/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/setup/setup.sql labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/test/ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/test/hibernate.properties labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/resources/test/log4j.properties Log: Added: labs/portletswap/imagegalleryportlet/trunk/gallery/images/Thumbs.db =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/images/Thumbs.db ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/gallery/images/bufo.jpg =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/images/bufo.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/gallery/images/desert.jpg =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/images/desert.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/gallery/images/fan.jpg =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/images/fan.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/gallery/images/rana.jpg =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/images/rana.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/gallery/images/xen.jpg =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/images/xen.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/Thumbs.db =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/Thumbs.db ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/bufo.jpg =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/bufo.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/desert.jpg =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/desert.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/fan.jpg =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/fan.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/rana.jpg =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/rana.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/xen.jpg =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/gallery/thumbnails/xen.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.classpath =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.classpath 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.classpath 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/main"/> + <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/jboss-server/lib/jboss.jar"/> + <classpathentry exported="true" kind="src" path="/portal-core"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/jboss-system/lib/jboss-system.jar"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/jboss-system/lib/jboss-jmx.jar"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/jboss-system/lib/jboss-common.jar"/> + <classpathentry exported="true" kind="src" path="/portal-api"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/jboss-j2ee/lib/jboss-j2ee.jar"/> + <classpathentry exported="true" kind="src" path="/portal-portlet"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/sun-servlet/lib/jsp-api.jar"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/sun-servlet/lib/servlet-api.jar"/> + <classpathentry exported="true" kind="src" path="/portal-server"/> + <classpathentry exported="true" kind="src" path="/portal-common"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/jakarta-log4j/lib/log4j.jar"/> + <classpathentry exported="true" kind="src" path="/portal-format"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/jboss-hibernate/lib/hibernate2.jar"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/jakarta-lucene/lib/lucene.jar"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/oswego-concurrent/lib/concurrent.jar"/> + <classpathentry exported="true" kind="lib" path="/portal-thirdparty/jboss-hibernate/lib/jboss-hibernate.jar"/> + <classpathentry kind="output" path="output"/> +</classpath> Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.cvsignore =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.cvsignore 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.cvsignore 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,2 @@ +output +build.log Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.project =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.project 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/.project 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>ig_2.2</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.wst.validation.validationbuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/LICENSE.txt =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/LICENSE.txt 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/LICENSE.txt 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,8 @@ +/***************************************** + * * + * The Image Gallery Portlet * + * * + * Distributable under LGPL license. * + * See terms of license at gnu.org. * + * * + *****************************************/ \ No newline at end of file Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/README.txt =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/README.txt 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/README.txt 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,42 @@ +IMAGEGALLERY README + +'Imagegallery' portlet is licensed under the GNU public license. All rights are reserved. + +About Imagegallery: + +'Imagegallery' is a portlet built and deployed on jboss portal 2.2. This portlet +is used to organize and display images and image information on the portal. One +must save the images and thumbnails using the jboss portal content management system (CMS). +The imagegallery organizes the images by image collections. Each collection can be +represented by a sample thumbnail. Click on the collection thumbnail and the image +thumbnails for the collection are shown. After the image thumbnails shown, clicking on +the image thumbnail allows one to see the image and image information. Forward or back +arrows can then be used to see the next or previous images in the collection. + +The images will be displayed as 500 x 500 pixel images and the thumbnails will be displayed +as 100 x 100 pixel images. + +To add, modify, or delete the image information, one must log into the portal as 'admin'. + +To see the sample images that are sent with the imagegallery, one must create a directory +called 'gallery' under '/portal/content' using the CMS. /portal/content is the root +directory of the CMS and should already have a 'default' directory in it. Then upload the +'images.zip' and 'thumbnails.zip' under 'gallery' using the CMS 'upload archive' icon. + +If you have downloaded the imagegallery.ear file, place it under the JBoss deploy +directory. + +If you have downloaded the imagegallery source code, move the imagegallery directory +under the jboss-portal-2.2 directory. Go under the imagegallery directory and do a +'build.bat deploy' or 'build.sh deploy'. + +To get a general idea on how the imagegallery looks visit this URL: + +http://edcw2ks15.cr.usgs.gov:8090/ImageGallery/SilverStream/Pages/pgcollectiondisplay.html + +Please send us an email if you have any questions or suggestions or just to let us know +your imagegallery URL. Our email address is im...@ho... + +Thanks + +Ron & Conrad Kanengieter \ No newline at end of file Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.bat =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.bat 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.bat 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,54 @@ +@echo off +rem +rem Invokes a script of the same name in the 'tools' module. +rem +rem The 'tools' module is expected to be a peer directory of the directory +rem in which this script lives. +rem +rem @author Jason Dillon <ja...@pl...> +rem + +rem $Id: build.bat,v 1.1.1.1 2005/01/14 23:12:37 vietj Exp $ + +setlocal + +set PROGNAME=%~nx0 +set DIRNAME=%~dp0 + +rem Legacy shell support +if x%PROGNAME%==x set PROGNAME=build.bat +if x%DIRNAME%==x set DIRNAME=.\ + +set MODULE_ROOT=%DIRNAME% +if x%TOOLS_ROOT%==x set TOOLS_ROOT=%DIRNAME%..\tools +set TARGET=%TOOLS_ROOT%\bin\build.bat +set ARGS=%* + +rem Start'er up yo +goto main + +:debug +if not x%DEBUG%==x echo %PROGNAME%: %* +goto :EOF + +:main +call :debug PROGNAME=%PROGNAME% +call :debug DIRNAME=%DIRNAME% +call :debug TOOLS_ROOT=%TOOLS_ROOT% +call :debug TARGET=%TARGET% + +if exist %TARGET% call :call-script & goto :EOF +rem else fail, we can not go on + +echo %PROGNAME%: *ERROR* The target executable does not exist: +echo %PROGNAME%: +echo %PROGNAME%: %TARGET% +echo %PROGNAME%: +echo %PROGNAME%: Please make sure you have checked out the 'tools' module +echo %PROGNAME%: and make sure it is up to date. +goto :EOF + +:call-script +call :debug Executing %TARGET% %ARGS% +call %TARGET% %ARGS% +goto :EOF Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.log =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.log 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.log 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,75 @@ + +configure: + +configure-libraries: + +configure-modules: + +configure-defaults: + +configure-tools: + +_configure:explode:task: + +_configure:jflex:task: + +_configure:xdoclet:task: + +_configure:xdoclet:ejbdoclet: + +_configure:xdoclet:jmxdoclet: + +_configure:xdoclet:hibernatedoclet: + +_configure:xdoclet:webdoclet: + +_configure:cactus:cactus: + [echo] C:\portal-2.2.1/thirdparty/junit-junit/lib + +init: + +generate-classes: + +_default:compile-classes: + [mkdir] Created dir: C:\portal-2.2.1\ig_2.2\output\classes + [mkdir] Created dir: C:\portal-2.2.1\ig_2.2\output\gen\classes + [depend] Deleted 0 out of date files in 0 seconds + [javac] Compiling 10 source files to C:\portal-2.2.1\ig_2.2\output\classes + +_default:check-exists-etc: + +_default:compile-etc: + [mkdir] Created dir: C:\portal-2.2.1\ig_2.2\output\etc + [copy] Copying 1 file to C:\portal-2.2.1\ig_2.2\output\etc + +_default:check-exists-resources: + +_default:compile-resources: + [mkdir] Created dir: C:\portal-2.2.1\ig_2.2\output\resources + [copy] Copying 29 files to C:\portal-2.2.1\ig_2.2\output\resources + [copy] Copied 1 empty directory to C:\portal-2.2.1\ig_2.2\output\resources + +compile: +[jmxdoclet] Jun 2, 2006 12:49:12 PM xdoclet.XDocletMain start +[jmxdoclet] INFO: Running <jbossxmbean/> +[jmxdoclet] Jun 2, 2006 12:49:13 PM xdoclet.TemplateSubTask engineStarted +[jmxdoclet] INFO: Generating output for 'org.jboss.portlet.imagegallery.impl.ImageGalleryModuleImpl' using template file 'jar:file:C:\portal-2.2.1\thirdparty\xdoclet-xdoclet\lib\xdoclet-jboss-module.jar!/xdoclet/modules/jboss/jmx/resources/jbossmx-xml-descriptor.xdt'. +[hibernatedoclet] Jun 2, 2006 12:49:13 PM xdoclet.XDocletMain start +[hibernatedoclet] INFO: Running <hibernate/> +[hibernatedoclet] Generating mapping file for org.jboss.portlet.imagegallery.impl.ImageDetailImpl. +[hibernatedoclet] org.jboss.portlet.imagegallery.impl.ImageDetailImpl +[hibernatedoclet] Generating mapping file for org.jboss.portlet.imagegallery.impl.ImageCollectionImpl. +[hibernatedoclet] org.jboss.portlet.imagegallery.impl.ImageCollectionImpl + +output: + [mkdir] Created dir: C:\portal-2.2.1\ig_2.2\output\lib + [jar] Building jar: C:\portal-2.2.1\ig_2.2\output\lib\portal-imagegallery-lib.jar + [jar] Building jar: C:\portal-2.2.1\ig_2.2\output\lib\portal-imagegallery.war + [jar] Building jar: C:\portal-2.2.1\ig_2.2\output\lib\portal-imagegallery.sar + [copy] Copying 3 files to C:\portal-2.2.1\ig_2.2\output\resources\portal-imagegallery-ear + [jar] Building jar: C:\portal-2.2.1\ig_2.2\output\lib\portal-imagegallery.ear + +deploy: + [copy] Copying 1 file to C:\JBoss\jboss-4.0.3SP1\server\default\deploy + +BUILD SUCCESSFUL Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.sh =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.sh 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.sh 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,49 @@ +#!/bin/sh +## +## Invokes a script of the same name in the 'tools' module. +## +## The 'tools' module is expected to be a peer directory of the directory +## in which this script lives. +## +## @author Jason Dillon <ja...@pl...> +## + +# $Id: build.sh,v 1.1.1.1 2005/01/14 23:12:37 vietj Exp $ + +PROGNAME=`basename $0` +DIRNAME=`dirname $0` + +# Buss it yo +main() { + if [ "x$TOOLS_ROOT" = "x" ]; then + TOOLS_ROOT=`cd $DIRNAME/../tools && pwd` + fi + + MODULE_ROOT=`cd $DIRNAME; pwd` + export TOOLS_ROOT MODULE_ROOT DEBUG TRACE + + # Where is the target script? + target="$TOOLS_ROOT/bin/$PROGNAME" + if [ ! -f "$target" ]; then + echo "${PROGNAME}: *ERROR* The target executable does not exist:" + echo "${PROGNAME}:" + echo "${PROGNAME}: $target" + echo "${PROGNAME}:" + echo "${PROGNAME}: Please make sure you have checked out the 'tools' module" + echo "${PROGNAME}: and make sure it is up to date." + exit 2 + fi + + # Get busy yo! + if [ "x$DEBUG" != "x" ]; then + echo "${PROGNAME}: Executing: /bin/sh $target $@" + fi + if [ "x$TRACE" = "x" ]; then + exec /bin/sh $target "$@" + else + exec /bin/sh -x $target "$@" + fi +} + +# Lets get ready to rumble! +main "$@" Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.xml =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.xml 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/build.xml 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,325 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE project [ + <!ENTITY buildmagic SYSTEM "../tools/etc/buildfragments/buildmagic.ent"> + <!ENTITY tools SYSTEM "../tools/etc/buildfragments/tools.ent"> + <!ENTITY libraries SYSTEM "../tools/etc/buildfragments/libraries.ent"> + <!ENTITY modules SYSTEM "../tools/etc/buildfragments/modules.ent"> + <!ENTITY defaults SYSTEM "../tools/etc/buildfragments/defaults.ent"> + <!ENTITY targets SYSTEM "../tools/etc/buildfragments/targets.ent"> + ]> + +<!-- $Id: build.xml,v 1.13 2005/11/05 15:02:50 bdaw Exp $ --> + +<!--+======================================================================+--> +<!--| JBoss Portal (The OpenSource Portal) Build File |--> +<!--| |--> +<!--| Distributable under LGPL license. |--> +<!--| See terms of license at http://www.gnu.org. |--> +<!--| |--> +<!--| This file has been designed to work with the 'tools' module and |--> +<!--| Buildmagic extentions. |--> +<!--+======================================================================+--> + +<project default="main" name="JBoss Portal Image Gallery"> + + <!--+====================================================================+--> + <!--| Setup |--> + <!--| |--> + <!--| Include the common build elements. |--> + <!--| |--> + <!--| This defines several different targets, properties and paths. |--> + <!--| It also sets up the basic extention tasks amoung other things. |--> + <!--+====================================================================+--> + + &buildmagic; + &libraries; + &modules; + &defaults; + &tools; + &targets; + + <!-- ================================================================== --> + <!-- Initialization --> + <!-- ================================================================== --> + + <!-- + | Initialize the build system. Must depend on '_buildmagic:init'. + | Other targets should depend on 'init' or things will mysteriously fail. + --> + + <target name="init" unless="init.disable" depends="_buildmagic:init"> + </target> + + <!--+====================================================================+--> + <!--| Configuration |--> + <!--| |--> + <!--| This target is invoked by the Buildmagic initialization logic |--> + <!--| and should contain module specific configuration elements. |--> + <!--+====================================================================+--> + + <target name="configure" unless="configure.disable"> + + <!-- Configure some properties --> + <property name="jndi-root" value="portal"/> + + <!-- Configure thirdparty libraries --> + <call target="configure-libraries"/> + <path id="library.classpath"> + <path refid="oswego.concurrent.classpath"/> + <path refid="jboss.system.classpath"/> + <path refid="jboss.j2ee.classpath"/> + <path refid="jboss.server.classpath"/> + <path refid="jakarta.log4j.classpath"/> + <path refid="junit.junit.classpath"/> + <path refid="sun.servlet.classpath"/> + <path refid="jakarta.cactus.classpath"/> + <path refid="jakarta.lucene.classpath"/> + <path refid="jakarta.fileupload.classpath"/> + <path refid="jwebunit.jwebunit.classpath"/> + <path refid="dbunit.dbunit.classpath"/> + </path> + + <!-- Configure modules --> + <call target="configure-modules"/> + <path id="dependentmodule.classpath"> + <path refid="jboss.portal-core.classpath"/> + <path refid="jboss.portal-cms.classpath"/> + <path refid="jboss.portal-format.classpath"/> + <path refid="jboss.portal-common.classpath"/> + <path refid="jboss.portal-portlet.classpath"/> + <path refid="jboss.portal-server.classpath"/> + <path refid="jboss.portlet-api.classpath"/> + <path refid="jboss.hibernate.classpath"/> + </path> + + <!--+=======================================+--> + <!--| Override any default properties here. |--> + <!--+=======================================+--> + + <!-- Configure defaults & build tools --> + <call target="configure-defaults"/> + <call target="configure-tools"/> + + <!--+=======================================+--> + <!--| Define module specific elements here. |--> + <!--+=======================================+--> + <property name="javadoc.private" value="true"/> + <property name="javadoc.protected" value="false"/> + + </target> + + + <!--+====================================================================+--> + <!--| Compile |--> + <!--| |--> + <!--| This target should depend on other compile-* targets for each |--> + <!--| different type of compile that needs to be performed, short of |--> + <!--| documentation compiles. |--> + <!--+====================================================================+--> + + <target name="compile" description="Compile all source files." depends="generate-classes, + _default:compile-classes, + _default:compile-etc, + _default:compile-resources"> + <!-- Add module specific elements here. --> + <jmxdoclet + destDir="${build.classes}"> + <fileset dir="${jboss.portal-common.root}/../src/main"> + <include name="org/jboss/portal/common/system/AbstractJBossService.java"/> + </fileset> + <fileset dir="${jboss.portal-core.root}/../src/main"> + <include name="org/jboss/portal/core/modules/AbstractModule.java"/> + </fileset> + <fileset dir="${source.classes}" includes="**/*.java"/> + <jbossxmbean/> + </jmxdoclet> + <hibernatedoclet + destDir="${build.resources}/portal-imagegallery-sar"> + <fileset dir="${source.java}"> + <include name="**/impl/*Impl.java"/> + </fileset> + <hibernate + version="3.0" + destDir="${build.resources}/portal-imagegallery-sar"/> + </hibernatedoclet> + </target> + + <!-- Generate all class files --> + <target name="generate-classes" depends="init"> + </target> + + <!-- Remove or change the delimiter in hibernate-export if your database has a different deliniter --> + <target name="ddl" depends="output"> + <taskdef + classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" + name="hibernate-export"> + <classpath> + <path refid="javac.classpath"/> + <pathelement location="${build.resources}/test"/> + <fileset dir="${build.lib}" includes="portal-imagegallery-lib.jar"/> + <fileset dir="${jboss.home}/lib" includes="dom4j.jar,commons-logging.jar"/> + <fileset dir="${jboss.hibernate.lib}" includes="commons-collections.jar,odmg.jar"/> + </classpath> + </taskdef> + <mkdir dir="${build.resources}/setup/"/> + <hibernate-export properties="${hibernate.properties}" text="true" quiet="true" delimiter=";" + output="${build.resources}/setup/setup.ddl"> + <fileset dir="${build.resources}/portal-imagegallery-sar" includes="**/*.hbm.xml"/> + </hibernate-export> + </target> + + <!--+====================================================================+--> + <!--| Generate Output |--> + <!--| |--> + <!--| Generates the target output for this module. Target output is |--> + <!--| the output which is ment to be released or used by external |--> + <!--| modules. |--> + <!--+====================================================================+--> + + <target name="output" description="Generate all target output." depends="compile"> + + <mkdir dir="${build.lib}"/> + + <!-- portal-imagegallery-lib.jar --> + <jar jarfile="${build.lib}/portal-imagegallery-lib.jar"> + <fileset dir="${build.classes}"/> + </jar> + + <!-- portal-imagegallery.war --> + <jar jarfile="${build.lib}/portal-imagegallery.war" manifest="${build.etc}/portal-imagegallery-war.mf"> + <fileset dir="${build.resources}/portal-imagegallery-war"/> + <fileset dir="${source.bin}/portal-imagegallery-war"/> + </jar> + + <!-- portal-imagegallery.sar --> + <jar jarfile="${build.lib}/portal-imagegallery.sar"> + <fileset dir="${build.resources}/portal-imagegallery-sar" includes="**/*"/> + <fileset dir="${jakarta.fileupload.root}/lib" includes="commons-fileupload.jar"/> + </jar> + + <!-- portal-imagegallery.ear --> + <copy todir="${build.resources}/portal-imagegallery-ear"> + <fileset dir="${jakarta.lucene.root}/lib" includes="lucene-1.4-final.jar"/> + <fileset dir="${build.lib}" includes="portal-imagegallery.war,portal-imagegallery-lib.jar,portal-imagegallery.sar"/> + </copy> + <jar jarfile="${build.lib}/portal-imagegallery.ear"> + <fileset dir="${build.resources}/portal-imagegallery-ear" includes="**/*"/> + </jar> + </target> + + <target name="explode" depends="init"> + <explode file="${build.lib}/portal-imagegallery.ear" todir="${build.lib}" name="portal-imagegallery-exploded.ear"/> + </target> + + <!-- ================================================================== --> + <!-- Cleaning --> + <!-- ================================================================== --> + + <!-- Clean up all build output --> + <target name="clean" depends="_default:clean"> + <!-- Add module specific elements here. --> + </target> + + <!--+====================================================================+--> + <!--| Documents |--> + <!--| |--> + <!--| Generate all documentation for this module. |--> + <!--+====================================================================+--> + + <target name="docs" depends="_default:docs"> + <!-- Add module specific elements here. --> + </target> + + <!-- ================================================================== --> + <!-- Misc. --> + <!-- ================================================================== --> + + <target name="main" depends="most"/> + <target name="all" depends="_default:all"/> + <target name="most" depends="_default:most"/> + <target name="help" depends="_default:help"/> + + <!-- ================================================================== --> + <!-- Deployment --> + <!-- ================================================================== --> + + <!-- + | Deploy the application + --> + <target name="deploy" description="Deploy." depends="output"> + <require file="${jboss.home}/server/${portal.deploy.dir}/deploy"/> + <copy file="${build.lib}/portal-imagegallery.ear" todir="${jboss.home}/server/${portal.deploy.dir}/deploy"/> + </target> + + <!-- + | Undeploy the application + --> + <target name="undeploy" description="Undeploy." depends="init"> + <require file="${jboss.home}/server/${portal.deploy.dir}/deploy"/> + <delete file="${jboss.home}/server/${portal.deploy.dir}/deploy/portal-imagegallery.ear"/> + </target> + + <target name="test" depends="init"> + + <property name="build.testlog" value="${module.output}/log"/> + + <echo> + <![CDATA[ + ${build.reports} + ${build.testlog} + ${module.output} + ${junit.printsummary} + ${junit.batchtest.haltonerror} + ${junit.batchtest.haltonfailure} + ${junit.batchtest.fork} + ${junit.timeout} + ${junit.jvm} + ]]> + </echo> + + <mkdir dir="${build.reports}"/> + <mkdir dir="${build.testlog}"/> + + <junit dir="${module.output}" printsummary="${junit.printsummary}" haltonerror="${junit.haltonerror}" + haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" timeout="${junit.timeout}" jvm="${junit.jvm}"> + <formatter type="plain" usefile="false"/> + <formatter type="xml" usefile="true"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="build.resources" value="${build.resources}"/> + <!--<test name="org.jboss.portlet.test.imagegallery.AnonymousUserTestCase" /> + <test name="org.jboss.portlet.test.imagegallery.UserTestCase" /> + <test name="org.jboss.portlet.test.imagegallery.AdminTestCase" />--> + <!--<test name="org.jboss.portlet.test.imagegallery.AdminFullTestCase" />--> + <test name="org.jboss.portlet.test.imagegallery.AdminPostTestCase"/> + <test name="org.jboss.portlet.test.imagegallery.AdminEditTopicTypeTestCase"/> + <test name="org.jboss.portlet.test.imagegallery.AdminPollPostEditTestCase"/> + <test name="org.jboss.portlet.test.imagegallery.TopicModelTestCase"/> + <test name="org.jboss.portlet.test.imagegallery.ForumModelTestCase"/> + <test name="org.jboss.portlet.test.imagegallery.CategoryModelTestCase"/> + <test name="org.jboss.portlet.test.imagegallery.PostModelTestCase"/> + <classpath> + <pathelement location="${build.classes}"/> + <!--<pathelement location="${build.resources}/portal-core-sar" />--> + <pathelement location="${build.resources}/portal-imagegallery-sar"/> + <pathelement location="${build.resources}/test"/> + <pathelement location="${jboss.home}/lib/dom4j.jar"/> + <pathelement location="${jboss.config}/lib/hsqldb.jar"/> + <pathelement location="${jboss.config}/lib/jgroups.jar"/> + <pathelement location="${jboss.config}/lib/cglib-full-2.0.1.jar"/> + <path refid="jboss.hibernate.classpath"/> + <path refid="library.classpath"/> + <path refid="dependentmodule.classpath"/> + <pathelement location="${jwebunit.jwebunit.lib}/nekohtml.jar"/> + <pathelement location="${dbunit.dbunit.lib}/dbunit.jar"/> + <pathelement location="${jdbc.connectors.lib}/mysql-connector-java.jar"/> + <pathelement location="${jboss.home}/server/default/deploy/jboss-hibernate.deployer/asm.jar"/> + <pathelement location="${jboss.home}/server/default/deploy/jboss-hibernate.deployer/hibernate3.jar"/> + <pathelement location="${jboss.home}/server/default/deploy/jboss-hibernate.deployer/cglib-2.1.jar"/> + <pathelement location="${jboss.home}/server/default/deploy/jboss-hibernate.deployer/antlr-2.7.5H3.jar"/> + <!--<path refid="jboss.hibernate.classpath"/>--> + <path refid="library.classpath"/> + </classpath> + </junit> + + </target> +</project> Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/portal-imagegallery.ear =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/portal-imagegallery.ear ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/Thumbs.db =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/Thumbs.db ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/add.gif =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/add.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/back.gif =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/back.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/delete.gif =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/delete.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/edit.gif =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/edit.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/next.gif =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/next.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/previous.gif =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/previous.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/view.gif =================================================================== (Binary files differ) Property changes on: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/bin/portal-imagegallery-war/images/view.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/etc/portal-imagegallery-war.mf =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/etc/portal-imagegallery-war.mf 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/etc/portal-imagegallery-war.mf 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Created-By: @java.vm.version@ (@java.vm.vendor@) +Specification-Title: @specification.title@ +Specification-Version: @specification.version@ +Specification-Vendor: @specification.vendor@ +Implementation-Title: @implementation.title@ +Implementation-URL: @implementation.url@ +Implementation-Version: @implementation.version@ +Implementation-Vendor: @implementation.vendor@ +Implementation-Vendor-Id: @implementation.vendor.id@ +Class-Path: ./portal-imagegallery-lib.jar Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/Const.java =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/Const.java 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/Const.java 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,98 @@ + +package org.jboss.portlet.imagegallery; + +/** + * This is a file of constants that are used for the image gallery + * portlet. These are parameters that will be passed within the portlet. + * + * @author <a href="im...@ho...">Ron & Conrad Kanengieter</a> + * $Revision: 1.5.6.1 $ + */ +public class Const +{ + // Basic sub operations + public static final String OP = "op"; + public static final String OP_ADD = "add"; + public static final String OP_EDIT = "edit"; + public static final String OP_DELETE = "delete"; + public static final String OP_CANCEL = "cancel"; + public static final String OP_VIEW = "view"; + public static final String OP_SUB = "subop"; + public static final String OP_REDIRECT = "redirect"; + public static final String OP_CMS_ACTION = "cmsAction"; + public static final String OP_BROWSE_CMS = "browseCMSSystem"; + + // Operations for image collection + public static final String OP_COLLECTIONVIEW = "collectionView"; + public static final String OP_COLLECTIONEDIT = "collectionEdit"; + public static final String OP_COLLECTIONDELETE = "collectionDelete"; + public static final String OP_COLLECTIONADD = "collectionAdd"; + public static final String OP_COLLECTIONS = "collections"; + + // Actions for image collection + public static final String ACTION_VIEWCOLLECTION = "viewCollection"; + public static final String ACTION_EDITCOLLECTION = "editCollection"; + public static final String ACTION_DELETECOLLECTION = "deleteCollection"; + public static final String ACTION_ADDCOLLECTION = "addCollection"; + + // Operations for image detail + public static final String OP_DETAILVIEW = "detailView"; + public static final String OP_DETAILEDIT = "detailEdit"; + public static final String OP_DETAILDELETE = "detailDelete"; + public static final String OP_DETAILADD = "detailAdd"; + public static final String OP_DETAILS = "details"; + public static final String OP_IMAGEDETAIL = "imagedetail"; + + // Actions for image detail + public static final String ACTION_VIEWDETAIL = "viewDetail"; + public static final String ACTION_EDITDETAIL = "editDetail"; + public static final String ACTION_DELETEDETAIL = "deleteDetail"; + public static final String ACTION_ADDDETAIL = "addDetail"; + + // Action for returning to a file + public static final String ACTION_CAPTURE_CMS = "captureCMS"; + + // Special operations + public static final String OP_CMS_VIEW = "viewCMS"; + + // Image width constants + public static final Integer THUMBNAIL_WIDTH = new Integer(100); + public static final Integer IMAGE_WIDTH = new Integer(500); + + // Constants for input form data + public static final String CTX = "ctx"; + public static final String MSG = "msg"; + public static final String DETAIL_ID = "detailID"; + public static final String COLLECTION_ID = "collectionID"; + public static final String NAME = "name"; + public static final String DESCRIPTION = "description"; + public static final String FEATURED_FLAG = "featuredFlag"; + public static final String FEATURED_CHECKED ="featuredChecked"; + public static final String BASE_PATH = "basePath"; + public static final String THUMBNAIL_PATH = "thumbnailPath"; + public static final String IMAGE_PATH = "imagePath"; + public static final String SHOW_THUMBNAIL = "showThumbnail"; + public static final String SHOW_IMAGE = "showImage"; + public static final String PHOTOGRAPHER = "photographer"; + public static final String REDIRECT = "redirectToLocation"; + + // Constants for browsing individual images + public static final String ID_INDEX = "IDindex"; + public static final String ID_COUNTER = "IDcount"; + public static final String ID_NEXT = "NextID"; + public static final String ID_PREVIOUS = "PreviousID"; + + // Constants for browsing the CMS File System + public static final String CMS_THUMBNAIL = "thumbnails"; + public static final String CMS_IMAGE = "images"; + public static final String CMS_FOLDER = "cmsFolder"; + public static final String CMS_ACTION = "cmsAction"; + public static final String CMS_FILE_NAME = "cmsFileName"; + public static final String CMS_FILE_PATH = "cmsFilePath"; + public static final String CMS_FILE_LAST_MODIFIED = "cmsFileLastModified"; + public static final String CMS_FILE_CREATION_DATE = "cmsFileCreationDate"; + + // Change this when the CMS Root Path changes in the JBoss Portal. + public static final String CMS_ROOT = "/portal/content"; + +} Added: labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/DataHelper.java =================================================================== --- labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/DataHelper.java 2006-06-02 18:40:23 UTC (rev 4580) +++ labs/portletswap/imagegalleryportlet/trunk/ig_2.2/src/main/org/jboss/portlet/imagegallery/DataHelper.java 2006-06-02 18:42:43 UTC (rev 4581) @@ -0,0 +1,337 @@ + +package org.jboss.portlet.imagegallery; + +import org.jboss.portal.common.context.DelegateContext; +import org.jboss.portlet.imagegallery.model.*; +import org.jboss.portlet.imagegallery.ImageGalleryPortlet; +import org.jboss.portlet.JBossActionRequest; +import org.jboss.portlet.JBossPortlet; +import org.jboss.portlet.JBossRenderRequest; + +import org.jboss.portal.cms.model.Folder; +import org.jboss.portal.cms.impl.FolderImpl; +import org.jboss.portal.cms.model.File; +import org.jboss.portal.cms.impl.FileImpl; +import org.jboss.portal.cms.util.FileUtil; + +/** + * @author <a href="im...@ho...">Ron & Conrad Kanengieter</a> + * $Revision: 1.5.6.1 $ + */ +public class DataHelper +{ + public DataHelper() + { + } + + /** + * Load the ctx with key-values from the imagecollection. + * @param imageCollection is the imagecollection object. + * @param ctx is the ctx object to be loaded. + */ + public void getCtxCollection(ImageCollection imageCollection, DelegateContext ctx) + { + ctx.put(Const.COLLECTION_ID, imageCollection.getID()); + ctx.put(Const.NAME, imageCollection.getName()); + ctx.put(Const.DESCRIPTION, imageCollection.getDescription()); + ctx.put(Const.BASE_PATH, imageCollection.getBasePath()); + ctx.put(Const.THUMBNAIL_PATH, imageCollection.getThumbnailPath()); + String sThumbnail = FileUtil.cleanDoubleSlashes(imageCollection.getBasePath() + + "/" + imageCollection.getThumbnailPath()); + ctx.put(Const.SHOW_THUMBNAIL, sThumbnail); + + if (imageCollection.getFeaturedFlag().booleanValue() == true) + { + ctx.put(Const.FEATURED_FLAG, "True"); + ctx.put(Const.FEATURED_CHECKED, "checked"); + } + else + { + ctx.put(Const.FEATURED_FLAG, "False"); + ctx.put(Const.FEATURED_CHECKED, ""); + } + } + + + /** + * Load the ctx with key-values from the imagecollection and imagedetail. + * @param imageCollection is the imagecollection object. + * @param imageDetail is the imagedetail object. + * @param ctx is the ctx object to be loaded. + */ + public void getCtxDetail(ImageCollection imageCollection, + ImageDetail imageDetail, + DelegateContext ctx) + { + ctx.put(Const.COLLECTION_ID, imageCollection.getID()); + ctx.put(Const.DETAIL_ID, imageDetail.getID()); + ctx.put(Const.NAME, imageDetail.getName()); + ctx.put(Const.DESCRIPTION, imageDetail.getDescription()); + ctx.put(Const.THUMBNAIL_PATH, imageDetail.getThumbnailPath()); + String sThumbnail = FileUtil.cleanDoubleSlashes(imageCollection.getBasePath() + + "/" + imageDetail.getThumbnailPath()); + ctx.put(Const.SHOW_THUMBNAIL, sThumbnail); + String sImage = FileUtil.cleanDoubleSlashes(imageCollection.getBasePath() + + "/" + imageDetail.getImagePath()); + ctx.put(Const.SHOW_IMAGE, sImage); + ctx.put(Const.IMAGE_PATH, imageDetail.getImagePath()); + ctx.put(Const.PHOTOGRAPHER, imageDetail.getPhotographer()); + } + + + /** + * Load the ctx with blank key-values for forms. + * @param ctx is the ctx object to be loaded. + */ + public void getFormCtxInit(DelegateContext ctx) + { + String imageGalleryRoot = FileUtil.cleanDoubleSlashes(Const.CMS_ROOT + "/gallery"); + ctx.put(Const.MSG, ""); + ctx.put(Const.DETAIL_ID, ""); + ctx.put(Const.COLLECTION_ID, ""); + ctx.put(Const.NAME, ""); + ctx.put(Const.DESCRIPTION, ""); + ctx.put(Const.FEATURED_FLAG, ""); + ctx.put(Const.BASE_PATH, imageGalleryRoot); + ctx.put(Const.THUMBNAIL_PATH, ""); + ctx.put(Const.IMAGE_PATH, ""); + ctx.put(Const.SHOW_THUMBNAIL, ""); + ctx.put(Const.SHOW_IMAGE, ""); + ctx.put(Const.PHOTOGRAPHER, ""); + ctx.put(Const.REDIRECT, ""); + ctx.put(Const.OP_SUB, ""); + + } + + + /** + * Load the ctx with key-values from the collection form. + * @param req is the object containing the collection form parameters. + * @param ctx is the ctx object to be loaded. + */ + public void getFormCtxCollection(JBossActionRequest req, DelegateContext ctx) + { + Integer id = req.getParameters().getIntObject(Const.COLLECTION_ID); + String name = req.getParameter(Const.NAME); + String description = req.getParameter(Const.DESCRIPTION); + String basePath = req.getParameter(Const.BASE_PATH); + String thumbnailPath = req.getParameter(Const.THUMBNAIL_PATH); + String featuredFlag = req.getParameter(Const.FEATURED_FLAG); + String opSub = req.getParameter(Const.OP_SUB); + String opRedirect = req.getParameter(Const.OP_REDIRECT); + String opCmsAction = req.getParameter(Const.OP_CMS_ACTION); + String checkPath = null; + + if (name != null) + ctx.put(Const.NAME, name); + else + ctx.put(Const.NAME, ""); + + if (description != null) + ctx.put(Const.DESCRIPTION, description); + else + ctx.put(Const.DESCRIPTION, ""); + + if (basePath != null) + { + // Trim off the CMS root path if present for CMS path. + if (basePath.startsWith(Const.CMS_ROOT)) + { + checkPath = basePath.substring(Const.CMS_ROOT.length()); + } + else + { + checkPath = FileUtil.cleanDoubleSlashes("/" + basePath); + basePath = FileUtil.cleanDoubleSlashes(Const.CMS_ROOT + "/" + basePath); + } + checkPath = FileUtil.cleanDoubleSlashes(checkPath + "/"); + + // Remove ending slash from base path if present. + if (basePath.endsWith("/")) + { + basePath = basePath.substring(0, basePath.length() - 1); + } + ctx.put(Const.BASE_PATH, basePath); + ctx.put(Const.CMS_FOLDER, checkPath); + } + else + { + ctx.put(Const.BASE_PATH, ""); + ctx.put(Const.CMS_FOLDER, ""); + } + + if (thumbnailPath != null) + ctx.put(Const.THUMBNAIL_PATH, thumbnailPath); + else + ctx.put(Const.THUMBNAIL_PATH, ""); + + ctx.put(Const.FEATURED_CHECKED, ""); + if (featuredFlag != null) + { + ctx.put(Const.FEATURED_FLAG, featuredFlag); + if (featuredFlag.equals("true")) + ctx.put(Const.FEATURED_CHECKED, "checked"); + } + else + ctx.put(Const.FEATURED_FLAG, ""); + + if (opSub != null) + ctx.put(Const.OP_SUB, opSub); + else + ctx.put(Const.OP_SUB, ""); + + if (opRedirect != null) + ctx.put(Const.OP_REDIRECT, opRedirect); + else + ctx.put(Const.OP_REDIRECT, ""); + + if (opCmsAction != null) + ctx.put(Const.OP_CMS_ACTION, opCmsAction); + else + ctx.put(Const.OP_CMS_ACTION, ""); + + if (id != null) + ctx.put(Const.COLLECTION_ID, id.toString()); + } + + + /** + * Load the ... [truncated message content] |