Author: bdaw
Date: 2011-09-13 07:54:01 -0400 (Tue, 13 Sep 2011)
New Revision: 7381
Added:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/FilteredNavigationExportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadResource.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/gwt-gadgets-1.2.0.jar
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/blank.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/cogwheel.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/error-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/home-icon.jpg
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/loading.gif
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/success-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/warning-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml
Removed:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/gwt-gadgets-1.2.0.jar
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/blank.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/cogwheel.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/error-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/home-icon.jpg
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/loading.gif
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/success-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/warning-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml
Modified:
epp/portal/branches/EPP_5_2_Branch/
epp/portal/branches/EPP_5_2_Branch/component/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/gatein.ear/pom.xml
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/configuration.xml
epp/portal/branches/EPP_5_2_Branch/examples/extension/config/src/main/java/conf/configuration.xml
epp/portal/branches/EPP_5_2_Branch/examples/portal/config/src/main/java/conf/configuration.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/pom.xml
epp/portal/branches/EPP_5_2_Branch/pom.xml
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/navigation.xml
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/pages.xml
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml
Log:
Merge Portal Lifecycle Management changes
Property changes on: epp/portal/branches/EPP_5_2_Branch
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1790:5871
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7210,7262,7308,7326
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1790:5871
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7239,7262,7308,7326,7331,7359,7367
Property changes on: epp/portal/branches/EPP_5_2_Branch/component
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1790/component:5871
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7095,7117,7120,7125,7132-7134,7210,7262,7308,7326
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1790/component:5871
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7095,7117,7120,7125,7132-7134,7239,7262,7308,7326,7331,7359,7367
Property changes on:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component/portal/src/main/java/org:5868
/portal/branches/branch-GTNPORTAL-1592/component/portal/src/main/java/org:4894
/portal/branches/branch-GTNPORTAL-1643/component/portal/src/main/java/org:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component/portal/src/main/java/org:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component/portal/src/main/java/org:5765
/portal/branches/branch-GTNPORTAL-1790/component/portal/src/main/java/org:5871
/portal/branches/branch-GTNPORTAL-1822/component/portal/src/main/java/org:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component/portal/src/main/java/org:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component/portal/src/main/java/org:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component/portal/src/main/java/org:6603
/portal/branches/branch-GTNPORTAL-1963/component/portal/src/main/java/org:6904,6915-6916
/portal/trunk/component/portal/src/main/java/org:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7095,7117,7120,7125,7132-7134,7210,7262,7308,7326
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component/portal/src/main/java/org:5868
/portal/branches/branch-GTNPORTAL-1592/component/portal/src/main/java/org:4894
/portal/branches/branch-GTNPORTAL-1643/component/portal/src/main/java/org:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component/portal/src/main/java/org:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component/portal/src/main/java/org:5765
/portal/branches/branch-GTNPORTAL-1790/component/portal/src/main/java/org:5871
/portal/branches/branch-GTNPORTAL-1822/component/portal/src/main/java/org:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component/portal/src/main/java/org:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component/portal/src/main/java/org:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component/portal/src/main/java/org:6603
/portal/branches/branch-GTNPORTAL-1963/component/portal/src/main/java/org:6904,6915-6916
/portal/trunk/component/portal/src/main/java/org:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7095,7117,7120,7125,7132-7134,7239,7262,7308,7326,7331,7359,7367
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -33,6 +33,7 @@
import org.exoplatform.portal.mop.management.operations.page.PageReadResource;
import org.exoplatform.portal.mop.management.operations.site.SiteLayoutExportResource;
import org.exoplatform.portal.mop.management.operations.site.SiteLayoutReadConfigAsXml;
+import org.exoplatform.portal.mop.management.operations.site.SiteLayoutReadResource;
import org.exoplatform.portal.mop.management.operations.site.SiteReadResource;
import org.exoplatform.portal.mop.management.operations.site.SiteTypeReadResource;
import org.gatein.management.api.ComponentRegistration;
@@ -54,16 +55,16 @@
ComponentRegistration registration =
context.registerManagedComponent("mop");
registration.registerBindingProvider(MopBindingProvider.INSTANCE);
- ManagedResource.Registration mop =
registration.registerManagedResource(description("MOP (Model Object for Portal)
Managed Resource"));
+ ManagedResource.Registration mop =
registration.registerManagedResource(description("MOP (Model Object for Portal)
Managed Resource, responsible for handling management operations on navigation, pages, and
sites."));
mop.registerOperationHandler(OperationNames.IMPORT_RESOURCE, new
MopImportResource(), description("Imports mop data from an exported zip
file."));
- mop.registerOperationHandler(OperationNames.READ_RESOURCE, new MopReadResource(),
description("Available site types for a portal"));
+ mop.registerOperationHandler(OperationNames.READ_RESOURCE, new MopReadResource(),
description("Lists available site types for a portal"));
ManagedResource.Registration sitetypes =
mop.registerSubResource("{site-type}sites", description("Management
resource responsible for handling management operations on a specific site type for a
portal."));
- sitetypes.registerOperationHandler(OperationNames.READ_RESOURCE, new
SiteTypeReadResource(), description("Available sites for a given site type."));
+ sitetypes.registerOperationHandler(OperationNames.READ_RESOURCE, new
SiteTypeReadResource(), description("Lists available sites for a given site
type."));
ManagedResource.Registration sites =
sitetypes.registerSubResource("{site-name: .*}", description("Management
resource responsible for handling management operations on a specific site."));
- sites.registerOperationHandler(OperationNames.READ_RESOURCE, new
SiteReadResource(), description("Available artifacts for a given site (ie pages,
navigation, site layout)"));
+ sites.registerOperationHandler(OperationNames.READ_RESOURCE, new
SiteReadResource(), description("Lists available resources for a given site (ie
pages, navigation, site layout)"));
// Site Layout management
siteLayoutManagementRegistration(sites);
@@ -77,7 +78,9 @@
private void siteLayoutManagementRegistration(ManagedResource.Registration sites)
{
- ManagedResource.Registration siteLayout =
sites.registerSubResource("portal", description("Management resource
responsible for handling management operations for a site layout."));
+ // This allows us to filter based on path template site-layout.
+ ManagedResource.Registration siteLayout =
sites.registerSubResource("{site-layout: portal}", description("Management
resource responsible for handling management operations for a site's layout."));
+ siteLayout.registerOperationHandler(OperationNames.READ_RESOURCE, new
SiteLayoutReadResource(), description("The site layout resource."));
siteLayout.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new
SiteLayoutReadConfigAsXml(), description("Reads site layout data for a specific site
as configuration xml."));
siteLayout.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new
SiteLayoutExportResource(), description("Exports site layout configuration xml as a
zip file."));
}
@@ -85,15 +88,15 @@
private void pageManagementRegistration(ManagedResource.Registration sites)
{
// Pages management resource registration
- ManagedResource.Registration pages = sites.registerSubResource("pages",
description("Management resource responsible for handling management operations on
all pages of a site."));
+ ManagedResource.Registration pages = sites.registerSubResource("pages",
description("Management resource responsible for handling management operations for
pages of a site."));
// Pages management operations
- pages.registerOperationHandler(OperationNames.READ_RESOURCE, new
PageReadResource(), description("Available pages at the specified address."),
true);
- pages.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new
PageReadConfigAsXml(), description("Reads pages as configuration xml at the specified
address."), true);
+ pages.registerOperationHandler(OperationNames.READ_RESOURCE, new
PageReadResource(), description("Lists available pages at a specified
address."), true);
+ pages.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new
PageReadConfigAsXml(), description("Reads pages as configuration xml at a specified
address."), true);
pages.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new
PageExportResource(), description("Exports pages configuration xml as a zip
file."), true);
// Page name management resource registration
- pages.registerSubResource("{page-name}", description("Page
management resource representing an individual page."));
+ pages.registerSubResource("{page-name}", description("Page resource
representing an individual page of a site."));
}
private void navigationManagementRegistration(ManagedResource.Registration sites)
@@ -103,7 +106,7 @@
// Navigation management operations
navigation.registerOperationHandler(OperationNames.READ_RESOURCE, new
NavigationReadResource(), description("Available navigation nodes at the specified
address."), true);
- navigation.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new
NavigationReadConfigAsXml(), description("Reads navigation as configuration xml at
the specified address."), true);
+ navigation.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new
NavigationReadConfigAsXml(), description("Reads navigation as configuration xml at a
specified address."), true);
navigation.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new
NavigationExportResource(), description("Exports navigation configuration xml as a
zip file."), true);
// Navigation node management resource registration
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -99,10 +99,10 @@
writer.writeElement(Element.PRIORITY, WritableValueTypes.INTEGER,
navigation.getPriority());
// Page nodes
- writer.writeStartElement(Element.PAGE_NODES);
ArrayList<NavigationFragment> fragments = navigation.getFragments();
for (NavigationFragment fragment : fragments)
{
+ writer.writeStartElement(Element.PAGE_NODES);
if (fragment.getParentURI() != null)
{
String parentUri = fragment.getParentURI();
@@ -117,9 +117,10 @@
marshallNode(writer, node);
}
}
+ writer.writeEndElement(); // End page-nodes
}
- writer.writeEndElement().writeEndElement(); // End page-nodes and node-navigation
+ writer.writeEndElement(); // End node-navigation
}
public void marshallNode(StaxWriter<Element> writer, PageNode node) throws
XMLStreamException
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -23,6 +23,7 @@
package org.exoplatform.portal.mop.management.exportimport;
import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.description.DescriptionService;
import org.exoplatform.portal.mop.management.operations.navigation.NavigationKey;
import org.exoplatform.portal.mop.management.operations.navigation.NavigationUtils;
@@ -55,6 +56,15 @@
this.marshaller = marshaller;
}
+ // TODO: This is a little sloppy to support filtering, fix if we have time.
+ private PageNavigation navigation;
+ public NavigationExportTask(PageNavigation navigation,
Marshaller<PageNavigation> marshaller)
+ {
+ super(new SiteKey(navigation.getOwnerType(), navigation.getOwnerId()));
+ this.navigation = navigation;
+ this.marshaller = marshaller;
+ }
+
@Override
protected String getXmlFileName()
{
@@ -64,7 +74,11 @@
@Override
public void export(OutputStream outputStream) throws IOException
{
- PageNavigation navigation = NavigationUtils.loadPageNavigation(navigationKey,
navigationService, descriptionService);
+ if (navigation == null)
+ {
+ navigation = NavigationUtils.loadPageNavigation(navigationKey,
navigationService, descriptionService);
+ }
+
marshaller.marshal(navigation, outputStream);
}
}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -107,6 +107,7 @@
Map<SiteKey, MopImport> importMap = new HashMap<SiteKey, MopImport>();
final NonCloseableZipInputStream zis = new
NonCloseableZipInputStream(inputStream);
ZipEntry entry;
+ boolean empty = false;
try
{
log.info("Preparing data for import.");
@@ -114,6 +115,9 @@
{
// Skip directories
if (entry.isDirectory()) continue;
+ // Skip empty entries (this allows empty zip files to not cause exceptions).
+ empty = entry.getName().equals("");
+ if (empty) continue;
// Parse zip entry
String[] parts = parseEntry(entry);
@@ -186,6 +190,12 @@
}
}
+ if (empty)
+ {
+ log.info("Nothing to import, zip file empty.");
+ return;
+ }
+
// Perform import
Map<SiteKey, MopImport> importsRan = new HashMap<SiteKey,
MopImport>();
try
Copied:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/FilteredNavigationExportResource.java
(from rev 7359,
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/FilteredNavigationExportResource.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/FilteredNavigationExportResource.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/FilteredNavigationExportResource.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,238 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.management.operations.navigation;
+
+import org.exoplatform.portal.config.model.NavigationFragment;
+import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.mop.management.exportimport.NavigationExportTask;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.ManagedResource;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.PathTemplateFilter;
+import org.gatein.management.api.binding.BindingProvider;
+import org.gatein.management.api.binding.Marshaller;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.OperationContextDelegate;
+import org.gatein.management.api.operation.OperationHandler;
+import org.gatein.management.api.operation.OperationNames;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.StepResultHandler;
+import org.gatein.management.api.operation.model.ExportResourceModel;
+import org.gatein.management.api.operation.model.ExportTask;
+import org.gatein.management.api.operation.model.ReadResourceModel;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class FilteredNavigationExportResource
+{
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler,
PathTemplateFilter filter)
+ {
+ BindingProvider bindingProvider = operationContext.getBindingProvider();
+ Marshaller<PageNavigation> marshaller =
bindingProvider.getMarshaller(PageNavigation.class, ContentType.XML);
+
+ final ManagedResource resource = operationContext.getManagedResource();
+ final PathAddress address = operationContext.getAddress();
+ final String operationName = operationContext.getOperationName();
+
+ StepResultHandler<PageNavigation> stepResultHandler = new
StepResultHandler<PageNavigation>(address)
+ {
+ @Override
+ public void failed(String failureDescription)
+ {
+ if (address.equals(getCurrentAddress()))
+ {
+ throw new OperationException(operationName, "Navigation export
failed. Reason: " + failureDescription);
+ }
+ else
+ {
+ throw new OperationException(operationName, "Navigation export
failed. Reason: " + failureDescription + " [Step Address: " +
getCurrentAddress() + "]");
+ }
+ }
+
+ @Override
+ protected void doCompleted(PageNavigation result)
+ {
+ if (getResults().isEmpty())
+ {
+ super.doCompleted(result);
+ }
+ else
+ {
+ PageNavigation navigation = getResults().get(0);
+ merge(navigation, result);
+ }
+ }
+ };
+
+ try
+ {
+ executeHandlers(resource, operationContext, address,
OperationNames.READ_CONFIG_AS_XML, stepResultHandler, filter, true);
+ List<PageNavigation> results = stepResultHandler.getResults();
+ if (results.isEmpty())
+ {
+ resultHandler.completed(new
ExportResourceModel(Collections.<ExportTask>emptyList()));
+ }
+ else
+ {
+ NavigationExportTask task = new
NavigationExportTask(stepResultHandler.getResults().get(0), marshaller);
+ resultHandler.completed(new ExportResourceModel(task));
+ }
+ }
+ catch (OperationException e)
+ {
+ throw new OperationException(e.getOperationName(), getStepMessage(e, address,
stepResultHandler), e);
+ }
+ catch (Throwable t)
+ {
+ throw new OperationException(operationName, getStepMessage(t, address,
stepResultHandler), t);
+ }
+ }
+
+ private void executeHandlers(ManagedResource resource, final OperationContext
operationContext, PathAddress address, String operationName,
StepResultHandler<PageNavigation> stepResultHandler, PathTemplateFilter filter,
boolean root)
+ {
+ //resource.getSubResource(address);
+ OperationHandler handler = resource.getOperationHandler(address, operationName);
+ System.out.println("Filter: " + filter + " accepted ? " +
address.accepts(filter) + " for address " + address + " and nav-uri
template " + address.resolvePathTemplate("nav-uri"));
+ if (handler != null && !root && address.accepts(filter))
+ {
+ handler.execute(operationContext, stepResultHandler);
+ }
+ else
+ {
+ OperationHandler readResource = resource.getOperationHandler(address,
OperationNames.READ_RESOURCE);
+ BasicResultHandler readResourceResult = new BasicResultHandler();
+ readResource.execute(new OperationContextDelegate(operationContext)
+ {
+ @Override
+ public String getOperationName()
+ {
+ return OperationNames.READ_RESOURCE;
+ }
+ }, readResourceResult);
+ if (readResourceResult.getFailureDescription() != null)
+ {
+ throw new OperationException(operationName, "Failure '" +
readResourceResult.getFailureDescription() + "' encountered executing " +
OperationNames.READ_RESOURCE);
+ }
+
+ Object model = readResourceResult.getResult();
+ if (! (model instanceof ReadResourceModel) )
+ {
+ throw new RuntimeException("Was expecting " +
ReadResourceModel.class + " to be returned for operation " +
OperationNames.READ_RESOURCE + " at address " + address);
+ }
+
+ for (String child : ((ReadResourceModel) model).getChildren())
+ {
+ final PathAddress childAddress = address.append(child);
+ OperationContext childContext = new
OperationContextDelegate(operationContext)
+ {
+ @Override
+ public PathAddress getAddress()
+ {
+ return childAddress;
+ }
+ };
+ executeHandlers(resource, childContext, childAddress, operationName,
stepResultHandler.next(childAddress), filter, false);
+ }
+ }
+ }
+
+ private String getStepMessage(Throwable t, PathAddress originalAddress,
StepResultHandler<PageNavigation> stepResultHandler)
+ {
+ String message = (t.getMessage() == null) ? "Step operation failure" :
t.getMessage();
+ if (originalAddress.equals(stepResultHandler.getCurrentAddress()))
+ {
+ return message;
+ }
+ else
+ {
+ return message + " [Step Address: " +
stepResultHandler.getCurrentAddress() + "]";
+ }
+ }
+
+ private void merge(PageNavigation navigation, PageNavigation result)
+ {
+ for (NavigationFragment fragment : result.getFragments())
+ {
+ if (fragment.getParentURI() != null)
+ {
+ NavigationFragment found = findFragment(navigation,
fragment.getParentURI());
+ if (found == null)
+ {
+ navigation.addFragment(fragment);
+ }
+ else
+ {
+ found.getNodes().addAll(fragment.getNodes());
+ }
+ }
+ else
+ {
+ navigation.addFragment(fragment);
+ }
+ }
+ }
+
+ private NavigationFragment findFragment(PageNavigation navigation, String parentUri)
+ {
+ for (NavigationFragment fragment : navigation.getFragments())
+ {
+ if (fragment.getParentURI().equals(parentUri)) return fragment;
+ }
+
+ return null;
+ }
+
+ private static class BasicResultHandler implements ResultHandler
+ {
+ private Object result;
+ private String failureDescription;
+
+ @Override
+ public void completed(Object result)
+ {
+ this.result = result;
+ }
+
+ @Override
+ public void failed(String failureDescription)
+ {
+ this.failureDescription = failureDescription;
+ }
+
+ public Object getResult()
+ {
+ return result;
+ }
+
+ public String getFailureDescription()
+ {
+ return failureDescription;
+ }
+ }
+}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -28,6 +28,7 @@
import org.exoplatform.portal.mop.management.exportimport.NavigationExportTask;
import org.exoplatform.portal.mop.navigation.NavigationService;
import org.gatein.management.api.ContentType;
+import org.gatein.management.api.PathTemplateFilter;
import org.gatein.management.api.binding.BindingProvider;
import org.gatein.management.api.binding.Marshaller;
import org.gatein.management.api.exceptions.OperationException;
@@ -38,26 +39,49 @@
import org.gatein.mop.api.workspace.Navigation;
import org.gatein.mop.api.workspace.Site;
+import java.text.ParseException;
+import java.util.List;
+
/**
* @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
* @version $Revision$
*/
public class NavigationExportResource extends AbstractNavigationOperationHandler
{
+ private static final FilteredNavigationExportResource filtered = new
FilteredNavigationExportResource();
+
@Override
protected void execute(OperationContext operationContext, ResultHandler resultHandler,
Navigation navigation) throws ResourceNotFoundException, OperationException
{
- Site site = navigation.getSite();
- String navUri =
operationContext.getAddress().resolvePathTemplate("nav-uri");
- SiteKey siteKey = getSiteKey(site);
+ List<String> filterAttributes =
operationContext.getAttributes().getValues("filter");
+ PathTemplateFilter filter;
+ try
+ {
+ filter = PathTemplateFilter.parse(filterAttributes);
+ }
+ catch (ParseException e)
+ {
+ throw new OperationException(operationContext.getOperationName(), "Could
not parse filter attributes.", e);
+ }
- DescriptionService descriptionService =
operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
- NavigationService navigationService =
operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
- BindingProvider bindingProvider = operationContext.getBindingProvider();
- Marshaller<PageNavigation> marshaller =
bindingProvider.getMarshaller(PageNavigation.class, ContentType.XML);
+ if (filter.hasPathTemplate("nav-uri"))
+ {
+ filtered.execute(operationContext, resultHandler, filter);
+ }
+ else
+ {
+ Site site = navigation.getSite();
+ String navUri =
operationContext.getAddress().resolvePathTemplate("nav-uri");
+ SiteKey siteKey = getSiteKey(site);
- NavigationExportTask exportTask = new NavigationExportTask(new
NavigationKey(siteKey, navUri), navigationService, descriptionService, marshaller);
+ DescriptionService descriptionService =
operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
+ NavigationService navigationService =
operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
+ BindingProvider bindingProvider = operationContext.getBindingProvider();
+ Marshaller<PageNavigation> marshaller =
bindingProvider.getMarshaller(PageNavigation.class, ContentType.XML);
- resultHandler.completed(new ExportResourceModel(exportTask));
+ NavigationExportTask exportTask = new NavigationExportTask(new
NavigationKey(siteKey, navUri), navigationService, descriptionService, marshaller);
+
+ resultHandler.completed(new ExportResourceModel(exportTask));
+ }
}
}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -26,6 +26,8 @@
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.management.exportimport.PageExportTask;
import org.gatein.management.api.ContentType;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.PathTemplateFilter;
import org.gatein.management.api.binding.BindingProvider;
import org.gatein.management.api.exceptions.OperationException;
import org.gatein.management.api.exceptions.ResourceNotFoundException;
@@ -35,8 +37,10 @@
import org.gatein.management.api.operation.model.ExportTask;
import org.gatein.mop.api.workspace.Page;
+import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
/**
@@ -55,6 +59,7 @@
Collection<Page> pagesList = pages.getChildren();
List<ExportTask> tasks = new ArrayList<ExportTask>(pagesList.size());
+
PageExportTask pageExportTask =
new PageExportTask(siteKey, dataStorage, bindingProvider.getMarshaller(
org.exoplatform.portal.config.model.Page.PageSet.class, ContentType.XML));
@@ -64,7 +69,24 @@
{
if (pageName == null)
{
- pageExportTask.addPageName(page.getName());
+ PathAddress pageAddress =
operationContext.getAddress().append(page.getName());
+ // We need to look up the subresource because this sets the path template
resolver to be used by the filter.
+ operationContext.getManagedResource().getSubResource(pageAddress);
+
+ PathTemplateFilter filter;
+ try
+ {
+ filter =
PathTemplateFilter.parse(operationContext.getAttributes().getValues("filter"));
+ }
+ catch (ParseException e)
+ {
+ throw new OperationException(operationContext.getOperationName(),
"Could not parse filter attributes.", e);
+ }
+
+ if (pageAddress.accepts(filter))
+ {
+ pageExportTask.addPageName(page.getName());
+ }
}
else if (pageName.equals(page.getName()))
{
@@ -76,9 +98,14 @@
{
throw new ResourceNotFoundException("No page found for " + new
PageKey(siteKey, pageName));
}
-
- tasks.add(pageExportTask);
-
- resultHandler.completed(new ExportResourceModel(tasks));
+ else if (pageExportTask.getPageNames().isEmpty())
+ {
+ resultHandler.completed(new
ExportResourceModel(Collections.<ExportTask>emptyList()));
+ }
+ else
+ {
+ tasks.add(pageExportTask);
+ resultHandler.completed(new ExportResourceModel(tasks));
+ }
}
}
Copied:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadResource.java
(from rev 7359,
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadResource.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadResource.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadResource.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.management.operations.site;
+
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.model.ReadResourceModel;
+import org.gatein.mop.api.workspace.Site;
+
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class SiteLayoutReadResource extends AbstractSiteOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler,
Site site) throws ResourceNotFoundException, OperationException
+ {
+ ReadResourceModel readResource = new ReadResourceModel(
+ "The site layout for site " + site.getName(),
Collections.<String>emptySet());
+
+ resultHandler.completed(readResource);
+ }
+}
Modified:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/gatein.ear/pom.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/gatein.ear/pom.xml 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/gatein.ear/pom.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -53,6 +53,12 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.gwtGadgets</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.gadgets-server</artifactId>
<version>${project.version}</version>
<type>war</type>
Modified:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/configuration.xml 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/configuration.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -70,6 +70,9 @@
<value>
<string>eXoGadgets</string>
</value>
+ <value>
+ <string>gwtGadgets</string>
+ </value>
<value>
<string>eXoGadgetServer</string>
</value>
Modified:
epp/portal/branches/EPP_5_2_Branch/examples/extension/config/src/main/java/conf/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/examples/extension/config/src/main/java/conf/configuration.xml 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/examples/extension/config/src/main/java/conf/configuration.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -64,6 +64,9 @@
<string>eXoGadgets</string>
</value>
<value>
+ <string>gwtGadgets</string>
+ </value>
+ <value>
<string>eXoGadgetServer</string>
</value>
<value>
Modified:
epp/portal/branches/EPP_5_2_Branch/examples/portal/config/src/main/java/conf/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/examples/portal/config/src/main/java/conf/configuration.xml 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/examples/portal/config/src/main/java/conf/configuration.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -63,6 +63,9 @@
<value>
<string>eXoGadgets</string>
</value>
+ <value>
+ <string>gwtGadgets</string>
+ </value>
<value>
<string>eXoGadgetServer</string>
</value>
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/gwt-gadgets-1.2.0.jar
===================================================================
(Binary files differ)
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/gwt-gadgets-1.2.0.jar
(from rev 7367, portal/trunk/gadgets/gwtGadgets/mvn-dependencies/gwt-gadgets-1.2.0.jar)
===================================================================
(Binary files differ)
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml
===================================================================
--- portal/trunk/gadgets/gwtGadgets/pom.xml 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml 2011-09-13 11:54:01 UTC
(rev 7381)
@@ -1,104 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This 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 software 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 software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- -->
-
-<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">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.gadgets</artifactId>
- <version>3.2.0-M02-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.portal.gwtGadgets</artifactId>
- <packaging>war</packaging>
- <name>GateIn Portal GWT Gadgets Application</name>
-
- <properties>
- <com.google.gwt.version>2.1.0</com.google.gwt.version>
-
<com.googlecode.gwtupload.version>0.6.3-compat</com.googlecode.gwtupload.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.gatein.management</groupId>
- <artifactId>gatein-management-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.gatein.common</groupId>
- <artifactId>common-logging</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- <scope>provided</scope>
- </dependency>
- <!-- GWT Dependencies -->
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-servlet</artifactId>
- <version>${com.google.gwt.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-user</artifactId>
- <version>${com.google.gwt.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.googlecode.gwtupload</groupId>
- <artifactId>gwtupload</artifactId>
- <version>${com.googlecode.gwtupload.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.gwt.google-apis</groupId>
- <artifactId>gwt-gadgets</artifactId>
- <version>1.2.0</version>
- <scope>system</scope>
-
<systemPath>${project.basedir}/mvn-dependencies/gwt-gadgets-1.2.0.jar</systemPath>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>gwtGadgets</finalName>
-
- <!-- dev mode doesn't seem to work for gadgets, so just including the gwt
plugin for compile -->
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>gwt-maven-plugin</artifactId>
- <version>2.1.0</version>
- <executions>
- <execution>
- <goals>
- <goal>compile</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml (from rev 7367,
portal/trunk/gadgets/gwtGadgets/pom.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml
(rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml 2011-09-13 11:54:01 UTC
(rev 7381)
@@ -0,0 +1,104 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ This 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 software 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 software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<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">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.gadgets</artifactId>
+ <version>5.2.0-epp-DEV04-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>exo.portal.gwtGadgets</artifactId>
+ <packaging>war</packaging>
+ <name>GateIn Portal GWT Gadgets Application</name>
+
+ <properties>
+ <com.google.gwt.version>2.1.0</com.google.gwt.version>
+
<com.googlecode.gwtupload.version>0.6.3-compat</com.googlecode.gwtupload.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.gatein.management</groupId>
+ <artifactId>gatein-management-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.common</groupId>
+ <artifactId>common-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <!-- GWT Dependencies -->
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ <version>${com.google.gwt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>${com.google.gwt.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.googlecode.gwtupload</groupId>
+ <artifactId>gwtupload</artifactId>
+ <version>${com.googlecode.gwtupload.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt.google-apis</groupId>
+ <artifactId>gwt-gadgets</artifactId>
+ <version>1.2.0</version>
+ <scope>system</scope>
+
<systemPath>${project.basedir}/mvn-dependencies/gwt-gadgets-1.2.0.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>gwtGadgets</finalName>
+
+ <!-- dev mode doesn't seem to work for gadgets, so just including the gwt
plugin for compile -->
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>gwt-maven-plugin</artifactId>
+ <version>2.1.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,47 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This 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 software 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 software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- -->
-
-<!DOCTYPE module PUBLIC "//gwt-module/"
-
"http://google-web-toolkit.googlecode.com/svn/tags/2.3.0/distro-source/core/src/gwt-module.dtd">
-<module rename-to="exportimport">
-
- <!-- Inherit the core Web Toolkit stuff. -->
- <inherits name='com.google.gwt.user.User'/>
-
- <!-- inherit css based theme -->
- <inherits name='com.google.gwt.user.theme.standard.Standard'/>
-
- <!-- inherit gadget support -->
- <inherits name="com.google.gwt.gadgets.Gadgets"/>
-
- <!-- Include GWTUpload library -->
- <inherits name="gwtupload.GWTUpload"/>
-
- <!-- Specify the app entry point class. -->
- <entry-point
class='org.gatein.management.gadget.mop.exportimport.client.Application'/>
-
- <!-- Specify the application specific style sheet. -->
- <stylesheet src="Application.css"/>
-
- <!-- Load dynamically predefined styles in the library when the application starts
-->
- <stylesheet src="Upload.css"/>
-</module>
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,47 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ This 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 software 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 software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<!DOCTYPE module PUBLIC "//gwt-module/"
+
"http://google-web-toolkit.googlecode.com/svn/tags/2.3.0/distro-source/core/src/gwt-module.dtd">
+<module rename-to="exportimport">
+
+ <!-- Inherit the core Web Toolkit stuff. -->
+ <inherits name='com.google.gwt.user.User'/>
+
+ <!-- inherit css based theme -->
+ <inherits name='com.google.gwt.user.theme.standard.Standard'/>
+
+ <!-- inherit gadget support -->
+ <inherits name="com.google.gwt.gadgets.Gadgets"/>
+
+ <!-- Include GWTUpload library -->
+ <inherits name="gwtupload.GWTUpload"/>
+
+ <!-- Specify the app entry point class. -->
+ <entry-point
class='org.gatein.management.gadget.mop.exportimport.client.Application'/>
+
+ <!-- Specify the application specific style sheet. -->
+ <stylesheet src="Application.css"/>
+
+ <!-- Load dynamically predefined styles in the library when the application starts
-->
+ <stylesheet src="Upload.css"/>
+</module>
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,533 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.logical.shared.OpenEvent;
-import com.google.gwt.event.logical.shared.OpenHandler;
-import com.google.gwt.event.logical.shared.SelectionEvent;
-import com.google.gwt.event.logical.shared.SelectionHandler;
-import com.google.gwt.gadgets.client.Gadget;
-import com.google.gwt.gadgets.client.Gadget.ModulePrefs;
-import com.google.gwt.gadgets.client.UserPreferences;
-import com.google.gwt.resources.client.ImageResource;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-import com.google.gwt.user.client.ui.AbsolutePanel;
-import com.google.gwt.user.client.ui.Anchor;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.CheckBox;
-import com.google.gwt.user.client.ui.DecoratedTabPanel;
-import com.google.gwt.user.client.ui.DecoratorPanel;
-import com.google.gwt.user.client.ui.DialogBox;
-import com.google.gwt.user.client.ui.Frame;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.HasVerticalAlignment;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.NamedFrame;
-import com.google.gwt.user.client.ui.RootPanel;
-import com.google.gwt.user.client.ui.ScrollPanel;
-import com.google.gwt.user.client.ui.Tree;
-import com.google.gwt.user.client.ui.TreeItem;
-import gwtupload.client.IUploader;
-import gwtupload.client.MultiUploader;
-
-import java.util.List;
-
-/**
- * {@code Application}
- * <p>
- * Creates a gadget that will show the sites tree which allows to navigate
- * between different sites. This gadget allows the administrator of the portal
- * to import/export sites.
- * </p>
- * Created on Dec 29, 2010, 8:01:18 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
- * @version 1.0
- */
-@ModulePrefs(title = "Export/Import Tool", author = "Nabil
Benothman", author_email = "nbenothm(a)redhat.com",
- description = "This gadget allows the administrator to export/import
sites")
-(a)Gadget.AllowHtmlQuirksMode(false)
-(a)Gadget.UseLongManifestName(false)
-public class Application extends Gadget<UserPreferences>
-{
- private static final String EXPORT_IMPORT_SERVLET_BASE =
ServletPath.path("/exportimport");
-
- // asycn services to get requests from the server through ajax.
- private final GateInServiceAsync gtnService = GWT.create(GateInService.class);
- private static final String UPLOAD_ACTION_URL = EXPORT_IMPORT_SERVLET_BASE +
"/upload";
- private static final String DOWNLOAD_ACTION_URL = EXPORT_IMPORT_SERVLET_BASE +
"/download";
- // gui elements
- private HTML header;
- private HTML details;
- private Button exportButton;
- private Frame frame;
- private String exportHref = "";
-
- private SelectionHandler<TreeItem> selectionHandler;
- private OpenHandler<TreeItem> openHandler;
-
- @Override
- protected void init(UserPreferences preferences)
- {
- ((ServiceDefTarget) gtnService).setServiceEntryPoint(EXPORT_IMPORT_SERVLET_BASE +
"/GateInService");
-
- selectionHandler = createSelectionHandler();
- openHandler = createOpenHandler();
-
- TreeImages images = GWT.create(TreeImages.class);
-
- RootPanel rootPanel = RootPanel.get();
- rootPanel.setSize("885px", "490px");
- rootPanel.addStyleName("rootpanelstyle");
-
- DecoratedTabPanel decoratedTabPanel = new DecoratedTabPanel();
- decoratedTabPanel.setAnimationEnabled(true);
- rootPanel.add(decoratedTabPanel, 10, 10);
- decoratedTabPanel.setSize("870px", "480px");
-
- AbsolutePanel absolutePanel = new AbsolutePanel();
- absolutePanel.setSize("847px", "425px");
-
- DecoratorPanel decoratorPanelWest = new DecoratorPanel();
- absolutePanel.add(decoratorPanelWest, 10, 10);
- decoratorPanelWest.setSize("240px", "400px");
-
- AbsolutePanel treePanel = new AbsolutePanel();
- treePanel.setSize("230px", "395px");
- decoratorPanelWest.setWidget(treePanel);
-
- ScrollPanel treeScrollPanel = new ScrollPanel();
- treePanel.add(treeScrollPanel, 10, 10);
- treeScrollPanel.setSize("210px", "375px");
-
- final Tree tree = getTree(images);
- treeScrollPanel.setWidget(tree);
-
- final DecoratorPanel decoratorPanelCenter = new DecoratorPanel();
-
- absolutePanel.add(decoratorPanelCenter, 256, 10);
- decoratorPanelCenter.setSize("400px", "402px");
-
- AbsolutePanel centerAbsolutePanel = new AbsolutePanel();
- centerAbsolutePanel.setSize("97%", "100%");
-
- this.header = new HTML("Select an item");
- this.header.setDirectionEstimator(true);
- centerAbsolutePanel.add(this.header, 10, 10);
- this.header.setSize("450px", "50px");
- this.header.setStyleName("header-style");
-
- this.details = new HTML("No item selected");
- centerAbsolutePanel.add(this.details, 10, 76);
- this.details.setSize("450px", "156px");
-
- HTML html = new HTML("<hr />", true);
- centerAbsolutePanel.add(html, 10, 43);
- html.setSize("380px", "15px");
-
- this.frame = new NamedFrame("download-frame");
- frame.setStyleName("download-frame");
- rootPanel.add(frame);
-
- this.exportButton = new Button("Export site", new ClickHandler()
- {
-
- public void onClick(ClickEvent event)
- {
- frame.setUrl(exportHref);
- }
- });
- this.exportButton.setEnabled(false);
- centerAbsolutePanel.add(this.exportButton, 10, 359);
- decoratorPanelCenter.setWidget(centerAbsolutePanel);
- centerAbsolutePanel.setSize("400px", "393px");
-
- DecoratorPanel decoratorPanelEast = new DecoratorPanel();
- absolutePanel.add(decoratorPanelEast, 672, 10);
- decoratorPanelEast.setSize("165px", "405px");
- AbsolutePanel absolutePanelImportLink = new AbsolutePanel();
- absolutePanelImportLink.setSize("162px", "395px");
-
- final Anchor importAnchor = new Anchor("Import site");
- absolutePanelImportLink.add(importAnchor, 10, 10);
- importAnchor.setWidth("90%");
-
- decoratorPanelEast.setWidget(absolutePanelImportLink);
-
- decoratedTabPanel.add(absolutePanel, "Export/Import sites", false);
- importAnchor.addClickHandler(new ClickHandler()
- {
-
- public void onClick(ClickEvent event)
- {
- DialogBox dialogBox = createDialogBox();
- dialogBox.setPopupPosition(267, 60);
- dialogBox.show();
- }
- });
-
- decoratedTabPanel.selectTab(0);
- }
-
- public native String getPortalContainerName()/*-{
- return parent.eXo.env.portal.context.substring(1); // remove leading '/'
- }-*/;
-
- /**
- * Create and return the dialog box for the site upload.
- *
- * @return a {@code DialogBox}
- */
- private DialogBox createDialogBox()
- {
-
- // Create a dialog box
- final DialogBox dialogBox = new DialogBox();
- dialogBox.setText("Import site");
- dialogBox.setAnimationEnabled(true);
- dialogBox.setModal(true);
- dialogBox.setGlassEnabled(true);
-
- final AbsolutePanel absolutePanel = new AbsolutePanel();
- dialogBox.setWidget(absolutePanel);
- absolutePanel.setStyleName("status-panel");
- absolutePanel.setSize("400px", "220px");
-
- final Button importButton = new Button("Import");
- final CheckBox overwriteBox = new CheckBox("Overwrite the existing
site");
- final HTML statusImg = new
HTML(" ", true);
- final Label statusLabel = new Label("status label");
- final Label headerLabel = new Label("Select file to import :");
- final AbsolutePanel statusPanel = new AbsolutePanel();
- headerLabel.setSize("380px", "39px");
- headerLabel.setStyleName("header-style");
- absolutePanel.add(headerLabel, 10, 10);
-
- final MultiUploader uploader = new GTNMultiUploader();
- uploader.setAvoidRepeatFiles(false);
- absolutePanel.add(uploader, 10, 46);
- uploader.setSize("380px", "32px");
- uploader.addOnChangeUploadHandler(new IUploader.OnChangeUploaderHandler()
- {
-
- @Override
- public void onChange(IUploader uploader)
- {
- // Nothing to do
- if (uploader.getFileName() != null)
- {
- importButton.setEnabled(true);
- }
- }
- });
-
- // Add a finish handler which will notify user once the upload finishes
- uploader.addOnFinishUploadHandler(new IUploader.OnFinishUploaderHandler()
- {
-
- public void onFinish(IUploader uploader)
- {
-
- switch (uploader.getStatus())
- {
- case SUCCESS:
- statusLabel.setText("File uploaded with success");
- statusLabel.setStyleName("success-style");
- statusImg.setStyleName("success-style-icon");
- break;
- case ERROR:
- statusLabel.setText("File upload error");
- statusLabel.setStyleName("error-style");
- statusImg.setStyleName("error-style-icon");
- break;
- case CANCELED:
- statusLabel.setText("File upload canceled");
- statusLabel.setStyleName("warn-style");
- statusImg.setStyleName("warn-style-icon");
- break;
- default:
- statusLabel.setText("");
- statusLabel.setStyleName("blank-style");
- statusImg.setStyleName("blank-style");
- break;
- }
-
- overwriteBox.setEnabled(true);
- importButton.setEnabled(true);
- }
- });
- // Add a start handler which will disable the UI until the upload finishes
- uploader.addOnStartUploadHandler(new IUploader.OnStartUploaderHandler()
- {
-
- boolean isShwon = false;
-
- public void onStart(IUploader uploader)
- {
- statusLabel.setText("Process in progress...");
- statusLabel.setStyleName("progress-style");
- statusImg.setStyleName("progress-style-icon");
- overwriteBox.setEnabled(false);
- importButton.setEnabled(false);
- if (!isShwon)
- {
- statusPanel.setStyleName("status-panel");
- statusPanel.setSize("380px", "0px");
- absolutePanel.add(statusPanel, 10, 120);
-
- Timer t = new Timer()
- {
-
- int dx = 5;
- int height = 0;
-
- public void run()
- {
- height += dx;
- statusPanel.setHeight(height + "px");
- if (height >= 45)
- {
- cancel(); // Stop the timer
- }
- }
- };
-
- // Schedule the timer to run once in 100 milliseconds.
- t.scheduleRepeating(100);
- isShwon = true;
- }
- }
- });
- // accept only zip files
- uploader.setValidExtensions("zip");
- // You can add customized parameters to servlet call
- uploader.setServletPath(UPLOAD_ACTION_URL + "?pc=" +
getPortalContainerName());
-
- overwriteBox.setTitle("If you want to force overwriting an existing site,
check this checkbox");
- overwriteBox.addClickHandler(new ClickHandler()
- {
-
- public void onClick(ClickEvent event)
- {
- String url = UPLOAD_ACTION_URL + "?pc=" + getPortalContainerName()
+ "&overwrite=" + overwriteBox.getValue();
- uploader.setServletPath(url);
- }
- });
-
- absolutePanel.add(overwriteBox, 10, 84);
- Button closeButton = new Button("Close", new ClickHandler()
- {
-
- public void onClick(ClickEvent event)
- {
- dialogBox.hide();
- }
- });
- absolutePanel.add(closeButton, 343, 188);
-
- statusImg.setStyleName("progress-style-icon");
- statusPanel.add(statusImg, 10, 10);
- statusImg.setSize("50px", "30px");
-
- statusPanel.add(statusLabel, 60, 15);
- statusLabel.setSize("300px", "25px");
-
- importButton.addClickHandler(new ClickHandler()
- {
-
- @Override
- public void onClick(ClickEvent event)
- {
-
- uploader.submit();
- }
- });
- importButton.setEnabled(false);
- absolutePanel.add(importButton, 10, 188);
-
- return dialogBox;
- }
-
- /**
- * Create and initialize the site tree
- *
- * @param resources
- * @return
- */
- private Tree getTree(TreeImages resources)
- {
- Tree tree = new Tree(resources, true);
- tree.addSelectionHandler(selectionHandler);
- tree.addOpenHandler(openHandler);
- tree.setAnimationEnabled(true);
- tree.setSize("100%", "100%");
- //final TreeItem rootItem = tree.addItem(getItemString("Sites",
resources.treeRoot()));
- final TreeNode rootNode = new TreeNode("Sites");
- final TreeItem rootItem = createItem(rootNode);
- tree.addItem(rootItem);
-
- gtnService.getRootNodes(getPortalContainerName(), new
AsyncCallback<List<TreeNode>>()
- {
-
- public void onFailure(Throwable caught)
- {
- Window.alert("Failed to load sites available for export. See server log
for more details.");
- }
-
- public void onSuccess(List<TreeNode> result)
- {
- for (TreeNode tn : result)
- {
- TreeItem ti = createItem(tn);
- ti.addItem(new PendingItem());
- rootItem.addItem(ti);
- rootNode.addChild(tn);
- }
- }
- });
-
- rootItem.setState(true);
-
- return tree;
- }
-
- /**
- * @param text
- * @param image
- * @return
- */
- private String getItemString(String text, ImageResource image)
- {
- // Add the image and text to a horizontal panel
- HorizontalPanel hPanel = new HorizontalPanel();
- hPanel.setSpacing(0);
- hPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
- hPanel.add(new Image(image));
- HTML headerText = new HTML(text);
- hPanel.add(headerText);
- // Return the HTML string for the panel
- return hPanel.getElement().getString();
- }
-
- /**
- * Create a {@code TreeItem} and set it's user object
- *
- * @param tn The user object of the {@code TreeItem}
- * @return {@code TreeItem}
- */
- private TreeItem createItem(TreeNode tn)
- {
- TreeItem item = new TreeItem(tn.getText());
- item.setUserObject(tn);
-
- return item;
- }
-
- private OpenHandler<TreeItem> createOpenHandler()
- {
- return new OpenHandler<TreeItem>()
- {
- @Override
- public void onOpen(OpenEvent<TreeItem> event)
- {
- final TreeItem target = event.getTarget();
- final TreeNode tn = (TreeNode) target.getUserObject();
- String text = target.getText();
- target.setText("Loading items");
-
- if (target.getChildCount() > 0)
- {
- TreeItem it = target.getChild(0);
- if (it instanceof PendingItem)
- {
- target.removeItem(it);
- }
- }
-
- if (target.getChildCount() == 0)
- {
- gtnService.updateItem(getPortalContainerName(), tn, new
AsyncCallback<TreeNode>()
- {
-
- public void onFailure(Throwable caught)
- {
- Window.alert("Failed to update tree items. See server log for
more details.");
- Application.this.details.setHTML("Failed to load
sub-tree");
- }
-
- public void onSuccess(TreeNode result)
- {
-
- for (TreeNode tnChild : result.getChildren())
- {
- TreeItem it = Application.this.createItem(tnChild);
- if (!tnChild.getChildren().isEmpty())
- {
- it.addItem(new PendingItem());
- }
- target.addItem(it);
- }
- }
- });
- }
-
- target.setText(text);
- }
- };
- }
-
- private SelectionHandler<TreeItem> createSelectionHandler()
- {
- return new SelectionHandler<TreeItem>()
- {
- @Override
- public void onSelection(SelectionEvent<TreeItem> event)
- {
- final TreeItem item = event.getSelectedItem();
- TreeNode node = (TreeNode) item.getUserObject();
- Application.this.header.setHTML(node.getPath());
- Application.this.details.setHTML(node.getNodeInfo());
-
- if (node.isExportable())
- {
- Application.this.exportHref = DOWNLOAD_ACTION_URL + "?pc=" +
getPortalContainerName() +
- "&ownerType=" + node.getType() +
"&ownerId=" + node.getSiteName();
- Application.this.exportButton.setEnabled(true);
- }
- else
- {
- Application.this.exportButton.setEnabled(false);
- Application.this.exportHref = "#";
- }
- }
- };
- }
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,533 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.logical.shared.OpenEvent;
+import com.google.gwt.event.logical.shared.OpenHandler;
+import com.google.gwt.event.logical.shared.SelectionEvent;
+import com.google.gwt.event.logical.shared.SelectionHandler;
+import com.google.gwt.gadgets.client.Gadget;
+import com.google.gwt.gadgets.client.Gadget.ModulePrefs;
+import com.google.gwt.gadgets.client.UserPreferences;
+import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.ui.AbsolutePanel;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.DecoratedTabPanel;
+import com.google.gwt.user.client.ui.DecoratorPanel;
+import com.google.gwt.user.client.ui.DialogBox;
+import com.google.gwt.user.client.ui.Frame;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.NamedFrame;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.TreeItem;
+import gwtupload.client.IUploader;
+import gwtupload.client.MultiUploader;
+
+import java.util.List;
+
+/**
+ * {@code Application}
+ * <p>
+ * Creates a gadget that will show the sites tree which allows to navigate
+ * between different sites. This gadget allows the administrator of the portal
+ * to import/export sites.
+ * </p>
+ * Created on Dec 29, 2010, 8:01:18 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
+ * @version 1.0
+ */
+@ModulePrefs(title = "Export/Import Tool", author = "Nabil
Benothman", author_email = "nbenothm(a)redhat.com",
+ description = "This gadget allows the administrator to export/import
sites")
+(a)Gadget.AllowHtmlQuirksMode(false)
+(a)Gadget.UseLongManifestName(false)
+public class Application extends Gadget<UserPreferences>
+{
+ private static final String EXPORT_IMPORT_SERVLET_BASE =
ServletPath.path("/exportimport");
+
+ // asycn services to get requests from the server through ajax.
+ private final GateInServiceAsync gtnService = GWT.create(GateInService.class);
+ private static final String UPLOAD_ACTION_URL = EXPORT_IMPORT_SERVLET_BASE +
"/upload";
+ private static final String DOWNLOAD_ACTION_URL = EXPORT_IMPORT_SERVLET_BASE +
"/download";
+ // gui elements
+ private HTML header;
+ private HTML details;
+ private Button exportButton;
+ private Frame frame;
+ private String exportHref = "";
+
+ private SelectionHandler<TreeItem> selectionHandler;
+ private OpenHandler<TreeItem> openHandler;
+
+ @Override
+ protected void init(UserPreferences preferences)
+ {
+ ((ServiceDefTarget) gtnService).setServiceEntryPoint(EXPORT_IMPORT_SERVLET_BASE +
"/GateInService");
+
+ selectionHandler = createSelectionHandler();
+ openHandler = createOpenHandler();
+
+ TreeImages images = GWT.create(TreeImages.class);
+
+ RootPanel rootPanel = RootPanel.get();
+ rootPanel.setSize("885px", "490px");
+ rootPanel.addStyleName("rootpanelstyle");
+
+ DecoratedTabPanel decoratedTabPanel = new DecoratedTabPanel();
+ decoratedTabPanel.setAnimationEnabled(true);
+ rootPanel.add(decoratedTabPanel, 10, 10);
+ decoratedTabPanel.setSize("870px", "480px");
+
+ AbsolutePanel absolutePanel = new AbsolutePanel();
+ absolutePanel.setSize("847px", "425px");
+
+ DecoratorPanel decoratorPanelWest = new DecoratorPanel();
+ absolutePanel.add(decoratorPanelWest, 10, 10);
+ decoratorPanelWest.setSize("240px", "400px");
+
+ AbsolutePanel treePanel = new AbsolutePanel();
+ treePanel.setSize("230px", "395px");
+ decoratorPanelWest.setWidget(treePanel);
+
+ ScrollPanel treeScrollPanel = new ScrollPanel();
+ treePanel.add(treeScrollPanel, 10, 10);
+ treeScrollPanel.setSize("210px", "375px");
+
+ final Tree tree = getTree(images);
+ treeScrollPanel.setWidget(tree);
+
+ final DecoratorPanel decoratorPanelCenter = new DecoratorPanel();
+
+ absolutePanel.add(decoratorPanelCenter, 256, 10);
+ decoratorPanelCenter.setSize("400px", "402px");
+
+ AbsolutePanel centerAbsolutePanel = new AbsolutePanel();
+ centerAbsolutePanel.setSize("97%", "100%");
+
+ this.header = new HTML("Select an item");
+ this.header.setDirectionEstimator(true);
+ centerAbsolutePanel.add(this.header, 10, 10);
+ this.header.setSize("450px", "50px");
+ this.header.setStyleName("header-style");
+
+ this.details = new HTML("No item selected");
+ centerAbsolutePanel.add(this.details, 10, 76);
+ this.details.setSize("450px", "156px");
+
+ HTML html = new HTML("<hr />", true);
+ centerAbsolutePanel.add(html, 10, 43);
+ html.setSize("380px", "15px");
+
+ this.frame = new NamedFrame("download-frame");
+ frame.setStyleName("download-frame");
+ rootPanel.add(frame);
+
+ this.exportButton = new Button("Export site", new ClickHandler()
+ {
+
+ public void onClick(ClickEvent event)
+ {
+ frame.setUrl(exportHref);
+ }
+ });
+ this.exportButton.setEnabled(false);
+ centerAbsolutePanel.add(this.exportButton, 10, 359);
+ decoratorPanelCenter.setWidget(centerAbsolutePanel);
+ centerAbsolutePanel.setSize("400px", "393px");
+
+ DecoratorPanel decoratorPanelEast = new DecoratorPanel();
+ absolutePanel.add(decoratorPanelEast, 672, 10);
+ decoratorPanelEast.setSize("165px", "405px");
+ AbsolutePanel absolutePanelImportLink = new AbsolutePanel();
+ absolutePanelImportLink.setSize("162px", "395px");
+
+ final Anchor importAnchor = new Anchor("Import site");
+ absolutePanelImportLink.add(importAnchor, 10, 10);
+ importAnchor.setWidth("90%");
+
+ decoratorPanelEast.setWidget(absolutePanelImportLink);
+
+ decoratedTabPanel.add(absolutePanel, "Export/Import sites", false);
+ importAnchor.addClickHandler(new ClickHandler()
+ {
+
+ public void onClick(ClickEvent event)
+ {
+ DialogBox dialogBox = createDialogBox();
+ dialogBox.setPopupPosition(267, 60);
+ dialogBox.show();
+ }
+ });
+
+ decoratedTabPanel.selectTab(0);
+ }
+
+ public native String getPortalContainerName()/*-{
+ return parent.eXo.env.portal.context.substring(1); // remove leading '/'
+ }-*/;
+
+ /**
+ * Create and return the dialog box for the site upload.
+ *
+ * @return a {@code DialogBox}
+ */
+ private DialogBox createDialogBox()
+ {
+
+ // Create a dialog box
+ final DialogBox dialogBox = new DialogBox();
+ dialogBox.setText("Import site");
+ dialogBox.setAnimationEnabled(true);
+ dialogBox.setModal(true);
+ dialogBox.setGlassEnabled(true);
+
+ final AbsolutePanel absolutePanel = new AbsolutePanel();
+ dialogBox.setWidget(absolutePanel);
+ absolutePanel.setStyleName("status-panel");
+ absolutePanel.setSize("400px", "220px");
+
+ final Button importButton = new Button("Import");
+ final CheckBox overwriteBox = new CheckBox("Overwrite the existing
site");
+ final HTML statusImg = new
HTML(" ", true);
+ final Label statusLabel = new Label("status label");
+ final Label headerLabel = new Label("Select file to import :");
+ final AbsolutePanel statusPanel = new AbsolutePanel();
+ headerLabel.setSize("380px", "39px");
+ headerLabel.setStyleName("header-style");
+ absolutePanel.add(headerLabel, 10, 10);
+
+ final MultiUploader uploader = new GTNMultiUploader();
+ uploader.setAvoidRepeatFiles(false);
+ absolutePanel.add(uploader, 10, 46);
+ uploader.setSize("380px", "32px");
+ uploader.addOnChangeUploadHandler(new IUploader.OnChangeUploaderHandler()
+ {
+
+ @Override
+ public void onChange(IUploader uploader)
+ {
+ // Nothing to do
+ if (uploader.getFileName() != null)
+ {
+ importButton.setEnabled(true);
+ }
+ }
+ });
+
+ // Add a finish handler which will notify user once the upload finishes
+ uploader.addOnFinishUploadHandler(new IUploader.OnFinishUploaderHandler()
+ {
+
+ public void onFinish(IUploader uploader)
+ {
+
+ switch (uploader.getStatus())
+ {
+ case SUCCESS:
+ statusLabel.setText("File uploaded with success");
+ statusLabel.setStyleName("success-style");
+ statusImg.setStyleName("success-style-icon");
+ break;
+ case ERROR:
+ statusLabel.setText("File upload error");
+ statusLabel.setStyleName("error-style");
+ statusImg.setStyleName("error-style-icon");
+ break;
+ case CANCELED:
+ statusLabel.setText("File upload canceled");
+ statusLabel.setStyleName("warn-style");
+ statusImg.setStyleName("warn-style-icon");
+ break;
+ default:
+ statusLabel.setText("");
+ statusLabel.setStyleName("blank-style");
+ statusImg.setStyleName("blank-style");
+ break;
+ }
+
+ overwriteBox.setEnabled(true);
+ importButton.setEnabled(true);
+ }
+ });
+ // Add a start handler which will disable the UI until the upload finishes
+ uploader.addOnStartUploadHandler(new IUploader.OnStartUploaderHandler()
+ {
+
+ boolean isShwon = false;
+
+ public void onStart(IUploader uploader)
+ {
+ statusLabel.setText("Process in progress...");
+ statusLabel.setStyleName("progress-style");
+ statusImg.setStyleName("progress-style-icon");
+ overwriteBox.setEnabled(false);
+ importButton.setEnabled(false);
+ if (!isShwon)
+ {
+ statusPanel.setStyleName("status-panel");
+ statusPanel.setSize("380px", "0px");
+ absolutePanel.add(statusPanel, 10, 120);
+
+ Timer t = new Timer()
+ {
+
+ int dx = 5;
+ int height = 0;
+
+ public void run()
+ {
+ height += dx;
+ statusPanel.setHeight(height + "px");
+ if (height >= 45)
+ {
+ cancel(); // Stop the timer
+ }
+ }
+ };
+
+ // Schedule the timer to run once in 100 milliseconds.
+ t.scheduleRepeating(100);
+ isShwon = true;
+ }
+ }
+ });
+ // accept only zip files
+ uploader.setValidExtensions("zip");
+ // You can add customized parameters to servlet call
+ uploader.setServletPath(UPLOAD_ACTION_URL + "?pc=" +
getPortalContainerName());
+
+ overwriteBox.setTitle("If you want to force overwriting an existing site,
check this checkbox");
+ overwriteBox.addClickHandler(new ClickHandler()
+ {
+
+ public void onClick(ClickEvent event)
+ {
+ String url = UPLOAD_ACTION_URL + "?pc=" + getPortalContainerName()
+ "&overwrite=" + overwriteBox.getValue();
+ uploader.setServletPath(url);
+ }
+ });
+
+ absolutePanel.add(overwriteBox, 10, 84);
+ Button closeButton = new Button("Close", new ClickHandler()
+ {
+
+ public void onClick(ClickEvent event)
+ {
+ dialogBox.hide();
+ }
+ });
+ absolutePanel.add(closeButton, 343, 188);
+
+ statusImg.setStyleName("progress-style-icon");
+ statusPanel.add(statusImg, 10, 10);
+ statusImg.setSize("50px", "30px");
+
+ statusPanel.add(statusLabel, 60, 15);
+ statusLabel.setSize("300px", "25px");
+
+ importButton.addClickHandler(new ClickHandler()
+ {
+
+ @Override
+ public void onClick(ClickEvent event)
+ {
+
+ uploader.submit();
+ }
+ });
+ importButton.setEnabled(false);
+ absolutePanel.add(importButton, 10, 188);
+
+ return dialogBox;
+ }
+
+ /**
+ * Create and initialize the site tree
+ *
+ * @param resources
+ * @return
+ */
+ private Tree getTree(TreeImages resources)
+ {
+ Tree tree = new Tree(resources, true);
+ tree.addSelectionHandler(selectionHandler);
+ tree.addOpenHandler(openHandler);
+ tree.setAnimationEnabled(true);
+ tree.setSize("100%", "100%");
+ //final TreeItem rootItem = tree.addItem(getItemString("Sites",
resources.treeRoot()));
+ final TreeNode rootNode = new TreeNode("Sites");
+ final TreeItem rootItem = createItem(rootNode);
+ tree.addItem(rootItem);
+
+ gtnService.getRootNodes(getPortalContainerName(), new
AsyncCallback<List<TreeNode>>()
+ {
+
+ public void onFailure(Throwable caught)
+ {
+ Window.alert("Failed to load sites available for export. See server log
for more details.");
+ }
+
+ public void onSuccess(List<TreeNode> result)
+ {
+ for (TreeNode tn : result)
+ {
+ TreeItem ti = createItem(tn);
+ ti.addItem(new PendingItem());
+ rootItem.addItem(ti);
+ rootNode.addChild(tn);
+ }
+ }
+ });
+
+ rootItem.setState(true);
+
+ return tree;
+ }
+
+ /**
+ * @param text
+ * @param image
+ * @return
+ */
+ private String getItemString(String text, ImageResource image)
+ {
+ // Add the image and text to a horizontal panel
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(0);
+ hPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
+ hPanel.add(new Image(image));
+ HTML headerText = new HTML(text);
+ hPanel.add(headerText);
+ // Return the HTML string for the panel
+ return hPanel.getElement().getString();
+ }
+
+ /**
+ * Create a {@code TreeItem} and set it's user object
+ *
+ * @param tn The user object of the {@code TreeItem}
+ * @return {@code TreeItem}
+ */
+ private TreeItem createItem(TreeNode tn)
+ {
+ TreeItem item = new TreeItem(tn.getText());
+ item.setUserObject(tn);
+
+ return item;
+ }
+
+ private OpenHandler<TreeItem> createOpenHandler()
+ {
+ return new OpenHandler<TreeItem>()
+ {
+ @Override
+ public void onOpen(OpenEvent<TreeItem> event)
+ {
+ final TreeItem target = event.getTarget();
+ final TreeNode tn = (TreeNode) target.getUserObject();
+ String text = target.getText();
+ target.setText("Loading items");
+
+ if (target.getChildCount() > 0)
+ {
+ TreeItem it = target.getChild(0);
+ if (it instanceof PendingItem)
+ {
+ target.removeItem(it);
+ }
+ }
+
+ if (target.getChildCount() == 0)
+ {
+ gtnService.updateItem(getPortalContainerName(), tn, new
AsyncCallback<TreeNode>()
+ {
+
+ public void onFailure(Throwable caught)
+ {
+ Window.alert("Failed to update tree items. See server log for
more details.");
+ Application.this.details.setHTML("Failed to load
sub-tree");
+ }
+
+ public void onSuccess(TreeNode result)
+ {
+
+ for (TreeNode tnChild : result.getChildren())
+ {
+ TreeItem it = Application.this.createItem(tnChild);
+ if (!tnChild.getChildren().isEmpty())
+ {
+ it.addItem(new PendingItem());
+ }
+ target.addItem(it);
+ }
+ }
+ });
+ }
+
+ target.setText(text);
+ }
+ };
+ }
+
+ private SelectionHandler<TreeItem> createSelectionHandler()
+ {
+ return new SelectionHandler<TreeItem>()
+ {
+ @Override
+ public void onSelection(SelectionEvent<TreeItem> event)
+ {
+ final TreeItem item = event.getSelectedItem();
+ TreeNode node = (TreeNode) item.getUserObject();
+ Application.this.header.setHTML(node.getPath());
+ Application.this.details.setHTML(node.getNodeInfo());
+
+ if (node.isExportable())
+ {
+ Application.this.exportHref = DOWNLOAD_ACTION_URL + "?pc=" +
getPortalContainerName() +
+ "&ownerType=" + node.getType() +
"&ownerId=" + node.getSiteName();
+ Application.this.exportButton.setEnabled(true);
+ }
+ else
+ {
+ Application.this.exportButton.setEnabled(false);
+ Application.this.exportHref = "#";
+ }
+ }
+ };
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.client;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class DisplayableException extends Exception
-{
- public DisplayableException(String message)
- {
- super(message);
- }
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.client;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class DisplayableException extends Exception
+{
+ public DisplayableException(String message)
+ {
+ super(message);
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,139 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.uibinder.client.UiConstructor;
-import gwtupload.client.IFileInput;
-import gwtupload.client.IFileInput.FileInputType;
-import gwtupload.client.IUploadStatus;
-import gwtupload.client.IUploader;
-import gwtupload.client.MultiUploader;
-import gwtupload.client.Uploader;
-
-/**
- * {@code GTNMultiUploader}
- * <p>
- * Implementation of an uploader panel that is able to handle several uploads.
- * This uploader allows to upload multiple files asynchronously using
<i>Ajax</i>
- * This version of multi file uploader allows to enable/disable the automatic upload,
i.e
- * the upload starts right after selecting file. The default version does not allow
- * this feature and upload is automatic by default.
- * </p>
- * Created on Feb 17, 2011, 6:47:18 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
- * @version 1.0
- */
-public class GTNMultiUploader extends MultiUploader
-{
-
- private boolean automaticUpload;
-
- /**
- * Create a new instance of {@code GTNMultiUploader}
- * Initialize widget components and layout elements.
- * Uses the default status widget and the standard input file.
- */
- public GTNMultiUploader()
- {
- super();
- }
-
- /**
- * Create a new instance of {@code GTNMultiUploader}
- * Initialize widget components and layout elements.
- * Uses the default status widget.
- *
- * @param type
- * file input to use
- */
- @UiConstructor
- public GTNMultiUploader(FileInputType type)
- {
- super(type);
- }
-
- /**
- * Create a new instance of {@code GTNMultiUploader}
- * Initialize widget components and layout elements.
- *
- * @param type
- * file input to use
- * @param status
- * Customized status widget to use
- */
- public GTNMultiUploader(FileInputType type, IUploadStatus status)
- {
- super(type, status);
- }
-
- /**
- * Create a new instance of {@code GTNMultiUploader}
- * Initialize widget components and layout elements.
- *
- * @param status
- * Customized status widget to use
- */
- public GTNMultiUploader(IUploadStatus status)
- {
- super(status);
- }
-
- /**
- * Create a new instance of {@code GTNMultiUploader}
- * This is the constructor for customized multi-uploaders.
- *
- * @param status
- * Customized status widget to use
- * @param fileInput
- * Customized file input
- */
- public GTNMultiUploader(IUploadStatus status, IFileInput fileInput)
- {
- super(status, fileInput);
- }
-
- @Override
- protected IUploader getUploaderInstance()
- {
- Uploader uploader = (Uploader) super.getUploaderInstance();
- uploader.setAutoSubmit(automaticUpload);
- return uploader;
- }
-
- /**
- * @return the automaticUpload
- */
- public boolean isAutomaticUpload()
- {
- return automaticUpload;
- }
-
- /**
- * @param automaticUpload the automaticUpload to set
- */
- public void setAutomaticUpload(boolean automaticUpload)
- {
- this.automaticUpload = automaticUpload;
- }
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.uibinder.client.UiConstructor;
+import gwtupload.client.IFileInput;
+import gwtupload.client.IFileInput.FileInputType;
+import gwtupload.client.IUploadStatus;
+import gwtupload.client.IUploader;
+import gwtupload.client.MultiUploader;
+import gwtupload.client.Uploader;
+
+/**
+ * {@code GTNMultiUploader}
+ * <p>
+ * Implementation of an uploader panel that is able to handle several uploads.
+ * This uploader allows to upload multiple files asynchronously using
<i>Ajax</i>
+ * This version of multi file uploader allows to enable/disable the automatic upload,
i.e
+ * the upload starts right after selecting file. The default version does not allow
+ * this feature and upload is automatic by default.
+ * </p>
+ * Created on Feb 17, 2011, 6:47:18 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
+ * @version 1.0
+ */
+public class GTNMultiUploader extends MultiUploader
+{
+
+ private boolean automaticUpload;
+
+ /**
+ * Create a new instance of {@code GTNMultiUploader}
+ * Initialize widget components and layout elements.
+ * Uses the default status widget and the standard input file.
+ */
+ public GTNMultiUploader()
+ {
+ super();
+ }
+
+ /**
+ * Create a new instance of {@code GTNMultiUploader}
+ * Initialize widget components and layout elements.
+ * Uses the default status widget.
+ *
+ * @param type
+ * file input to use
+ */
+ @UiConstructor
+ public GTNMultiUploader(FileInputType type)
+ {
+ super(type);
+ }
+
+ /**
+ * Create a new instance of {@code GTNMultiUploader}
+ * Initialize widget components and layout elements.
+ *
+ * @param type
+ * file input to use
+ * @param status
+ * Customized status widget to use
+ */
+ public GTNMultiUploader(FileInputType type, IUploadStatus status)
+ {
+ super(type, status);
+ }
+
+ /**
+ * Create a new instance of {@code GTNMultiUploader}
+ * Initialize widget components and layout elements.
+ *
+ * @param status
+ * Customized status widget to use
+ */
+ public GTNMultiUploader(IUploadStatus status)
+ {
+ super(status);
+ }
+
+ /**
+ * Create a new instance of {@code GTNMultiUploader}
+ * This is the constructor for customized multi-uploaders.
+ *
+ * @param status
+ * Customized status widget to use
+ * @param fileInput
+ * Customized file input
+ */
+ public GTNMultiUploader(IUploadStatus status, IFileInput fileInput)
+ {
+ super(status, fileInput);
+ }
+
+ @Override
+ protected IUploader getUploaderInstance()
+ {
+ Uploader uploader = (Uploader) super.getUploaderInstance();
+ uploader.setAutoSubmit(automaticUpload);
+ return uploader;
+ }
+
+ /**
+ * @return the automaticUpload
+ */
+ public boolean isAutomaticUpload()
+ {
+ return automaticUpload;
+ }
+
+ /**
+ * @param automaticUpload the automaticUpload to set
+ */
+ public void setAutomaticUpload(boolean automaticUpload)
+ {
+ this.automaticUpload = automaticUpload;
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.user.client.rpc.RemoteService;
-
-import java.util.List;
-
-/**
- * {@code GateInService}
- * <p/>
- * Created on Jan 3, 2011, 12:28:43 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
- * @version 1.0
- */
-public interface GateInService extends RemoteService
-{
-
- /**
- * Update the Tree item asynchronously
- *
- * @param containerName name of portal container
- * @param item The item to be updated
- * @return the updated tree node
- * @throws DisplayableException
- */
- public TreeNode updateItem(String containerName, TreeNode item) throws Exception;
-
- /**
- * Retrieve asynchronously the list of root nodes
- *
- * @param containerName The portal container name
- * @return The list of the root nodes
- * @throws DisplayableException
- */
- public List<TreeNode> getRootNodes(String containerName) throws Exception;
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+import java.util.List;
+
+/**
+ * {@code GateInService}
+ * <p/>
+ * Created on Jan 3, 2011, 12:28:43 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
+ * @version 1.0
+ */
+public interface GateInService extends RemoteService
+{
+
+ /**
+ * Update the Tree item asynchronously
+ *
+ * @param containerName name of portal container
+ * @param item The item to be updated
+ * @return the updated tree node
+ * @throws DisplayableException
+ */
+ public TreeNode updateItem(String containerName, TreeNode item) throws Exception;
+
+ /**
+ * Retrieve asynchronously the list of root nodes
+ *
+ * @param containerName The portal container name
+ * @return The list of the root nodes
+ * @throws DisplayableException
+ */
+ public List<TreeNode> getRootNodes(String containerName) throws Exception;
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-import java.util.List;
-
-/**
- * {@code GateInServiceAsync}
- * <p/>
- * Created on Jan 3, 2011, 12:29:53 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
- * @version 1.0
- */
-public interface GateInServiceAsync
-{
-
- /**
- * Update the Tree item asynchronously
- *
- * @param portalContainerName name of portal container
- * @param item The item to be updated
- * @param asyncCallback asynchronous callback
- */
- public void updateItem(String portalContainerName, TreeNode item,
AsyncCallback<TreeNode> asyncCallback);
-
- /**
- * Retrieve asynchronously the list of root nodes
- *
- * @param portalContainerName The portal container name
- * @param asyncCallback asynchronous callback
- */
- public void getRootNodes(String portalContainerName,
AsyncCallback<List<TreeNode>> asyncCallback);
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+import java.util.List;
+
+/**
+ * {@code GateInServiceAsync}
+ * <p/>
+ * Created on Jan 3, 2011, 12:29:53 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
+ * @version 1.0
+ */
+public interface GateInServiceAsync
+{
+
+ /**
+ * Update the Tree item asynchronously
+ *
+ * @param portalContainerName name of portal container
+ * @param item The item to be updated
+ * @param asyncCallback asynchronous callback
+ */
+ public void updateItem(String portalContainerName, TreeNode item,
AsyncCallback<TreeNode> asyncCallback);
+
+ /**
+ * Retrieve asynchronously the list of root nodes
+ *
+ * @param portalContainerName The portal container name
+ * @param asyncCallback asynchronous callback
+ */
+ public void getRootNodes(String portalContainerName,
AsyncCallback<List<TreeNode>> asyncCallback);
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,89 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.safehtml.shared.SafeHtml;
-import com.google.gwt.user.client.ui.TreeItem;
-import com.google.gwt.user.client.ui.Widget;
-
-import java.io.Serializable;
-
-/**
- * {@code PendingItem}
- * <p>
- * Tree item representing a pending item (loading in progress)
- * </p>
- * Created on Dec 29, 2010, 1:25:04 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
- * @version 1.0
- */
-public class PendingItem extends TreeItem implements Serializable
-{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * Create a new instance of {@code PendingItem}
- */
- public PendingItem()
- {
- super("Loading sub-tree...");
- this.setStyleName("gwt-TreeItem-pending");
- }
-
- /**
- * Constructs a tree item with the given HTML.
- *
- * @param html the item's HTML
- */
- public PendingItem(String html)
- {
- this();
- }
-
- /**
- * Constructs a tree item with the given HTML.
- *
- * @param html the item's HTML
- */
- public PendingItem(SafeHtml html)
- {
- super(html);
- this.setText("Loading sub-tree...");
- }
-
- /**
- * Constructs a tree item with the given <code>Widget</code>.
- *
- * @param widget the item's widget
- */
- public PendingItem(Widget widget)
- {
- super(widget);
- this.setText("Loading sub-tree...");
- }
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.safehtml.shared.SafeHtml;
+import com.google.gwt.user.client.ui.TreeItem;
+import com.google.gwt.user.client.ui.Widget;
+
+import java.io.Serializable;
+
+/**
+ * {@code PendingItem}
+ * <p>
+ * Tree item representing a pending item (loading in progress)
+ * </p>
+ * Created on Dec 29, 2010, 1:25:04 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
+ * @version 1.0
+ */
+public class PendingItem extends TreeItem implements Serializable
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create a new instance of {@code PendingItem}
+ */
+ public PendingItem()
+ {
+ super("Loading sub-tree...");
+ this.setStyleName("gwt-TreeItem-pending");
+ }
+
+ /**
+ * Constructs a tree item with the given HTML.
+ *
+ * @param html the item's HTML
+ */
+ public PendingItem(String html)
+ {
+ this();
+ }
+
+ /**
+ * Constructs a tree item with the given HTML.
+ *
+ * @param html the item's HTML
+ */
+ public PendingItem(SafeHtml html)
+ {
+ super(html);
+ this.setText("Loading sub-tree...");
+ }
+
+ /**
+ * Constructs a tree item with the given <code>Widget</code>.
+ *
+ * @param widget the item's widget
+ */
+ public PendingItem(Widget widget)
+ {
+ super(widget);
+ this.setText("Loading sub-tree...");
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.client;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-class ServletPath
-{
- private static final String SERVLET_CONTEXT = "/gwtGadgets";
-
- private ServletPath(){}
-
- static String path(String path)
- {
- return SERVLET_CONTEXT + path;
- }
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.client;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+class ServletPath
+{
+ private static final String SERVLET_CONTEXT = "/gwtGadgets";
+
+ private ServletPath(){}
+
+ static String path(String path)
+ {
+ return SERVLET_CONTEXT + path;
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.resources.client.ImageResource;
-import com.google.gwt.user.client.ui.Tree;
-
-/**
- * {@code TreeImages}
- * <p/>
- * Created on Jan 6, 2011, 10:45:39 AM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
- * @version 1.0
- */
-public interface TreeImages extends Tree.Resources
-{
-
- /**
- * Use noimage.png, which is a blank 1x1 image.
- */
- @Source("../public/images/cogwheel.png")
- ImageResource treeLeaf();
-
- @Source("../public/images/home-icon.jpg")
- ImageResource treeRoot();
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.user.client.ui.Tree;
+
+/**
+ * {@code TreeImages}
+ * <p/>
+ * Created on Jan 6, 2011, 10:45:39 AM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
+ * @version 1.0
+ */
+public interface TreeImages extends Tree.Resources
+{
+
+ /**
+ * Use noimage.png, which is a blank 1x1 image.
+ */
+ @Source("../public/images/cogwheel.png")
+ ImageResource treeLeaf();
+
+ @Source("../public/images/home-icon.jpg")
+ ImageResource treeRoot();
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,250 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.client;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * {@code TreeNode}
- * <p/>
- * Created on Dec 29, 2010, 1:25:55 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
- * @version 1.0
- */
-public class TreeNode implements Serializable
-{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private TreeNode parent;
- private List<TreeNode> children;
- private String text;
- private String type;
- private String siteName;
- private String nodeInfo;
- private boolean updated = false;
- private boolean exportable;
-
- /**
- * Create a new instance of {@code TreeNode}
- */
- public TreeNode()
- {
- this("");
- }
-
- /**
- * Create a new instance of {@code TreeNode}
- *
- * @param text The tree node text
- */
- public TreeNode(String text)
- {
- this.text = text;
- this.children = new ArrayList<TreeNode>();
- }
-
- /**
- * Create a new instance of {@code TreeNode}
- *
- * @param text The tree node text
- * @param children The tree node children
- */
- public TreeNode(String text, List<TreeNode> children)
- {
- this.text = text;
- this.children = children;
- }
-
- /**
- * Return the node informations
- *
- * @return The node informations
- */
- public String getNodeInfo()
- {
- return this.nodeInfo;
- }
-
- /**
- * Setter for the node info
- *
- * @param info the info to set
- */
- public void setNodeInfo(String info)
- {
- this.nodeInfo = info;
- }
-
- /**
- * Add a {@code TreeNode} child to the list of children
- *
- * @param child The child to add
- * @return {@code true} if the child is added successfully else {@code false}
- */
- public boolean addChild(TreeNode child)
- {
- child.setParent(this);
- return this.children.add(child);
- }
-
- /**
- * Remove the child, if exists, from the list of children
- *
- * @param tn The child to be removed
- * @return {@code true} if the child is removed successfully else {@code false}
- */
- public boolean removeChild(TreeNode tn)
- {
- return this.children.remove(tn);
- }
-
- /**
- * @return the children
- */
- public List<TreeNode> getChildren()
- {
- return this.children;
- }
-
- /**
- * Setter for the children
- *
- * @param children the children to set
- */
- public void setChildren(List<TreeNode> children)
- {
- this.children = children;
- }
-
- /**
- * @return the text
- */
- public String getText()
- {
- return text;
- }
-
- /**
- * Setter for the text
- *
- * @param text the text to set
- */
- public void setText(String text)
- {
- this.text = text;
- }
-
- /**
- * @return the type
- */
- public String getType()
- {
- return type;
- }
-
- /**
- * @param type the type to set
- */
- public void setType(String type)
- {
- this.type = type;
- }
-
- /**
- * @return the path
- */
- public String getPath()
- {
- return (this.parent != null ? this.parent.getPath() : "") + "
» " + this.text;
- }
-
- /**
- * @return the updated
- */
- public boolean isUpdated()
- {
- return updated;
- }
-
- /**
- * @param updated the updated to set
- */
- public void setUpdated(boolean updated)
- {
- this.updated = updated;
- }
-
- /**
- * @return the siteName
- */
- public String getSiteName()
- {
- return siteName;
- }
-
- /**
- * @param siteName the siteName to set
- */
- public void setSiteName(String siteName)
- {
- this.siteName = siteName;
- }
-
- /**
- * @return the exportable
- */
- public boolean isExportable()
- {
- return exportable;
- }
-
- /**
- * @param exportable the exportable to set
- */
- public void setExportable(boolean exportable)
- {
- this.exportable = exportable;
- }
-
- /**
- * @return the parent
- */
- public TreeNode getParent()
- {
- return parent;
- }
-
- /**
- * @param parent the parent to set
- */
- public void setParent(TreeNode parent)
- {
- this.parent = parent;
- }
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,250 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.client;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * {@code TreeNode}
+ * <p/>
+ * Created on Dec 29, 2010, 1:25:55 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
+ * @version 1.0
+ */
+public class TreeNode implements Serializable
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ private TreeNode parent;
+ private List<TreeNode> children;
+ private String text;
+ private String type;
+ private String siteName;
+ private String nodeInfo;
+ private boolean updated = false;
+ private boolean exportable;
+
+ /**
+ * Create a new instance of {@code TreeNode}
+ */
+ public TreeNode()
+ {
+ this("");
+ }
+
+ /**
+ * Create a new instance of {@code TreeNode}
+ *
+ * @param text The tree node text
+ */
+ public TreeNode(String text)
+ {
+ this.text = text;
+ this.children = new ArrayList<TreeNode>();
+ }
+
+ /**
+ * Create a new instance of {@code TreeNode}
+ *
+ * @param text The tree node text
+ * @param children The tree node children
+ */
+ public TreeNode(String text, List<TreeNode> children)
+ {
+ this.text = text;
+ this.children = children;
+ }
+
+ /**
+ * Return the node informations
+ *
+ * @return The node informations
+ */
+ public String getNodeInfo()
+ {
+ return this.nodeInfo;
+ }
+
+ /**
+ * Setter for the node info
+ *
+ * @param info the info to set
+ */
+ public void setNodeInfo(String info)
+ {
+ this.nodeInfo = info;
+ }
+
+ /**
+ * Add a {@code TreeNode} child to the list of children
+ *
+ * @param child The child to add
+ * @return {@code true} if the child is added successfully else {@code false}
+ */
+ public boolean addChild(TreeNode child)
+ {
+ child.setParent(this);
+ return this.children.add(child);
+ }
+
+ /**
+ * Remove the child, if exists, from the list of children
+ *
+ * @param tn The child to be removed
+ * @return {@code true} if the child is removed successfully else {@code false}
+ */
+ public boolean removeChild(TreeNode tn)
+ {
+ return this.children.remove(tn);
+ }
+
+ /**
+ * @return the children
+ */
+ public List<TreeNode> getChildren()
+ {
+ return this.children;
+ }
+
+ /**
+ * Setter for the children
+ *
+ * @param children the children to set
+ */
+ public void setChildren(List<TreeNode> children)
+ {
+ this.children = children;
+ }
+
+ /**
+ * @return the text
+ */
+ public String getText()
+ {
+ return text;
+ }
+
+ /**
+ * Setter for the text
+ *
+ * @param text the text to set
+ */
+ public void setText(String text)
+ {
+ this.text = text;
+ }
+
+ /**
+ * @return the type
+ */
+ public String getType()
+ {
+ return type;
+ }
+
+ /**
+ * @param type the type to set
+ */
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ /**
+ * @return the path
+ */
+ public String getPath()
+ {
+ return (this.parent != null ? this.parent.getPath() : "") + "
» " + this.text;
+ }
+
+ /**
+ * @return the updated
+ */
+ public boolean isUpdated()
+ {
+ return updated;
+ }
+
+ /**
+ * @param updated the updated to set
+ */
+ public void setUpdated(boolean updated)
+ {
+ this.updated = updated;
+ }
+
+ /**
+ * @return the siteName
+ */
+ public String getSiteName()
+ {
+ return siteName;
+ }
+
+ /**
+ * @param siteName the siteName to set
+ */
+ public void setSiteName(String siteName)
+ {
+ this.siteName = siteName;
+ }
+
+ /**
+ * @return the exportable
+ */
+ public boolean isExportable()
+ {
+ return exportable;
+ }
+
+ /**
+ * @param exportable the exportable to set
+ */
+ public void setExportable(boolean exportable)
+ {
+ this.exportable = exportable;
+ }
+
+ /**
+ * @return the parent
+ */
+ public TreeNode getParent()
+ {
+ return parent;
+ }
+
+ /**
+ * @param parent the parent to set
+ */
+ public void setParent(TreeNode parent)
+ {
+ this.parent = parent;
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,460 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-/** Add css rules here for your application. */
-
-/*
-button {
- display: block;
- font-size: 16pt
-}
-
-.widePanel {
- width: 100%
-}
-
-img {
- margin-top: 20px;
-}
-
-.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent {
- overflow: hidden;
- padding: 5px 5px 5px 5px;
- border-style: solid;
- border-width: 2px 2px 2px;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- -khtml-border-radius: 4px;
- border-radius: 4px;
-}
-
-.gwt-StackPanel {
- cursor:default;
-}
-
-.gwt-StackPanel .gwt-StackPanelItem {
- cursor:default;
-}
-
-body {
- background-color: white;
- color: black;
- font-family: Arial, sans-serif;
- font-size: small;
- margin: 5px;
-}
-*/
-
-.rootpanelstyle {
- border: #AAAAAA solid 2px;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- -khtml-border-radius: 4px;
- border-radius: 4px;
- padding: 5px;
-}
-
-.download-frame {
- border: 0px;
- visibility: hidden;
-}
-
-.header-style {
- text-decoration: none;
- color: #ff8800;
- font: bold;
-}
-
-.success-style {
- text-decoration: none;
- color: #00ff00;
- font-weight: bold;
- height: 35px;
- padding-left: 10px;
-}
-
-.success-style-icon {
- text-decoration: none;
- background-image: url('images/success-icon.png');
- background-repeat: no-repeat;
- background-position: left top;
- padding-right: 5px;
- height: 35px;
-}
-
-.error-style {
- text-decoration: none;
- color: #ff0000;
- height: 35px;
- font-weight: bold;
- padding-left: 10px;
-}
-
-.error-style-icon {
- background-image: url('images/error-icon.png');
- background-repeat: no-repeat;
- background-position: left top;
- text-decoration: none;
- height: 35px;
- padding-right: 5px;
-}
-
-.warn-style {
- text-decoration: none;
- color: #ff8800;
- height: 35px;
- font-weight: bold;
- padding-left: 10px;
-}
-
-.warn-style-icon {
- background-image: url('images/warning-icon.png');
- background-repeat: no-repeat;
- background-position: left top;
- text-decoration: none;
- height: 35px;
- padding-right: 5px;
-}
-
-.progress-style{
- text-decoration: none;
- color: #0000ff;
- height: 35px;
- font-weight: bold;
- padding-left: 10px;
-}
-
-.progress-style-icon{
- background-image: url('images/loading.gif');
- background-repeat: no-repeat;
- background-position: left top;
- text-decoration: none;
- padding-right: 5px;
- height: 35px;
-}
-
-.blank-style {
- background-image: url("images/blank.png");
- background-repeat: no-repeat;
-}
-
-.status-panel {
- border: #AAAAAA solid 1px;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- -khtml-border-radius: 4px;
- border-radius: 4px;
-}
-
-status-panel-no-border {
- border: #AAAAAA solid 0px;
-}
-
-a {
- color: darkblue;
-}
-
-a:visited {
- color: darkblue;
-}
-
-.gwt-DialogBox {
- /*
- border: 2px solid #AAAAAA;
- background-color: white;
- */
-}
-
-.gwt-DialogBox .Caption {
- background-image: url(gray_gradient.gif);
- background-repeat: repeat-x;
- padding: 4px;
- padding-bottom: 8px;
- font-weight: bold;
- cursor: default;
-}
-
-.gwt-MenuBar {
- background-color: #C3D9FF;
- cursor: default;
-}
-
-.gwt-MenuItem {
- font-size: 80%;
- margin: 1px;
- cursor: default;
-}
-
-.gwt-MenuItem-selected {
- background-color: #E8EEF7;
-}
-
-.gwt-Tree {
-}
-
-.gwt-Tree .gwt-TreeItem {
- font-size: 80%;
- cursor: default;
-}
-
-.gwt-Tree .gwt-TreeItem-selected {
- background-color: #C3D9FF;
-}
-
-.gwt-StackPanel {
- background-color: white;
- border: 1px solid #AAAAAA;
- width: 15em;
-}
-
-.gwt-StackPanel .gwt-StackPanelItem {
- background-image: url(blue_gradient.gif);
- background-repeat: repeat-x;
- background-color: #EEEEEE;
-
-}
-
-.gwt-StackPanel .gwt-StackPanelItem-selected {
-}
-
-.gwt-TabPanel {
-
-}
-
-.gwt-TabPanelBottom {
- border-left: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- border-bottom: 1px solid #87b3ff;
-}
-
-.gwt-TabBar {
- font-size: smaller;
-}
-
-.gwt-TabBar .gwt-TabBarFirst {
- height: 100%;
- border-bottom: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- padding-left: 3px;
-}
-
-.gwt-TabBar .gwt-TabBarRest {
- border-bottom: 1px solid #87b3ff;
- padding-right: 3px;
-}
-
-.gwt-TabBar .gwt-TabBarItem {
- border-top: 1px solid #87b3ff;
- border-bottom: 1px solid #87b3ff;
- padding: 2px;
- cursor: hand;
- white-space: nowrap;
- border-right: 1px solid #87b3ff;
-}
-
-.gwt-TabBar .gwt-TabBarItem-selected {
- font-weight: bold;
- background-color: #e8eef7;
- border-top: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- border-bottom: 1px solid #e8eef7;
- padding: 2px;
- cursor: default;
- white-space: nowrap;
-}
-
-.gwt-PushButton-up {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-PushButton-up-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-PushButton-down {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-PushButton-down-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-up {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-up-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-down {
- background-color: #C3D9FF;
- padding: 2px;
- background-color: #E8F1FF;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-down-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- background-color: #E8F1FF;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-RichTextArea {
- border: 1px solid black;
- background-color: white;
-}
-
-.gwt-RichTextToolbar {
- background-color: #C3D9FF;
- padding: 2px;
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-up {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-down {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-up {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-down {
- margin-right: 2px;
- background-color: #E8F1FF;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
- margin-right: 2px;
- background-color: #E8F1FF;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
-}
-
-.gwt-HorizontalSplitPanel {
- border: 8px solid #C3D9FF;
-}
-
-.gwt-HorizontalSplitPanel .splitter {
- background-color: #C3D9FF;
- cursor: move;
-}
-
-.gwt-HorizontalSplitPanel .left {
- background-color: #E8EEF7;
-}
-
-.gwt-VerticalSplitPanel {
- border: 8px solid #C3D9FF;
-}
-
-.gwt-VerticalSplitPanel .splitter {
- background-color: #C3D9FF;
- height: 8px;
- cursor: move;
-}
-
-.gwt-SuggestBoxPopup {
- border: 2px solid #C3D9FF;
-}
-
-.gwt-SuggestBoxPopup .item {
- padding: 2px;
-}
-
-.gwt-SuggestBoxPopup .item-selected {
- background-color: #C3D9FF;
- padding: 2px;
-}
-
-.gwt-DisclosurePanel {
- border: 2px solid #C3D9FF;
-}
-
-.gwt-DisclosurePanel .header {
- background-color: #e8eef7;
- cursor: hand;
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,460 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+/** Add css rules here for your application. */
+
+/*
+button {
+ display: block;
+ font-size: 16pt
+}
+
+.widePanel {
+ width: 100%
+}
+
+img {
+ margin-top: 20px;
+}
+
+.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent {
+ overflow: hidden;
+ padding: 5px 5px 5px 5px;
+ border-style: solid;
+ border-width: 2px 2px 2px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.gwt-StackPanel {
+ cursor:default;
+}
+
+.gwt-StackPanel .gwt-StackPanelItem {
+ cursor:default;
+}
+
+body {
+ background-color: white;
+ color: black;
+ font-family: Arial, sans-serif;
+ font-size: small;
+ margin: 5px;
+}
+*/
+
+.rootpanelstyle {
+ border: #AAAAAA solid 2px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+ padding: 5px;
+}
+
+.download-frame {
+ border: 0px;
+ visibility: hidden;
+}
+
+.header-style {
+ text-decoration: none;
+ color: #ff8800;
+ font: bold;
+}
+
+.success-style {
+ text-decoration: none;
+ color: #00ff00;
+ font-weight: bold;
+ height: 35px;
+ padding-left: 10px;
+}
+
+.success-style-icon {
+ text-decoration: none;
+ background-image: url('images/success-icon.png');
+ background-repeat: no-repeat;
+ background-position: left top;
+ padding-right: 5px;
+ height: 35px;
+}
+
+.error-style {
+ text-decoration: none;
+ color: #ff0000;
+ height: 35px;
+ font-weight: bold;
+ padding-left: 10px;
+}
+
+.error-style-icon {
+ background-image: url('images/error-icon.png');
+ background-repeat: no-repeat;
+ background-position: left top;
+ text-decoration: none;
+ height: 35px;
+ padding-right: 5px;
+}
+
+.warn-style {
+ text-decoration: none;
+ color: #ff8800;
+ height: 35px;
+ font-weight: bold;
+ padding-left: 10px;
+}
+
+.warn-style-icon {
+ background-image: url('images/warning-icon.png');
+ background-repeat: no-repeat;
+ background-position: left top;
+ text-decoration: none;
+ height: 35px;
+ padding-right: 5px;
+}
+
+.progress-style{
+ text-decoration: none;
+ color: #0000ff;
+ height: 35px;
+ font-weight: bold;
+ padding-left: 10px;
+}
+
+.progress-style-icon{
+ background-image: url('images/loading.gif');
+ background-repeat: no-repeat;
+ background-position: left top;
+ text-decoration: none;
+ padding-right: 5px;
+ height: 35px;
+}
+
+.blank-style {
+ background-image: url("images/blank.png");
+ background-repeat: no-repeat;
+}
+
+.status-panel {
+ border: #AAAAAA solid 1px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+}
+
+status-panel-no-border {
+ border: #AAAAAA solid 0px;
+}
+
+a {
+ color: darkblue;
+}
+
+a:visited {
+ color: darkblue;
+}
+
+.gwt-DialogBox {
+ /*
+ border: 2px solid #AAAAAA;
+ background-color: white;
+ */
+}
+
+.gwt-DialogBox .Caption {
+ background-image: url(gray_gradient.gif);
+ background-repeat: repeat-x;
+ padding: 4px;
+ padding-bottom: 8px;
+ font-weight: bold;
+ cursor: default;
+}
+
+.gwt-MenuBar {
+ background-color: #C3D9FF;
+ cursor: default;
+}
+
+.gwt-MenuItem {
+ font-size: 80%;
+ margin: 1px;
+ cursor: default;
+}
+
+.gwt-MenuItem-selected {
+ background-color: #E8EEF7;
+}
+
+.gwt-Tree {
+}
+
+.gwt-Tree .gwt-TreeItem {
+ font-size: 80%;
+ cursor: default;
+}
+
+.gwt-Tree .gwt-TreeItem-selected {
+ background-color: #C3D9FF;
+}
+
+.gwt-StackPanel {
+ background-color: white;
+ border: 1px solid #AAAAAA;
+ width: 15em;
+}
+
+.gwt-StackPanel .gwt-StackPanelItem {
+ background-image: url(blue_gradient.gif);
+ background-repeat: repeat-x;
+ background-color: #EEEEEE;
+
+}
+
+.gwt-StackPanel .gwt-StackPanelItem-selected {
+}
+
+.gwt-TabPanel {
+
+}
+
+.gwt-TabPanelBottom {
+ border-left: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ border-bottom: 1px solid #87b3ff;
+}
+
+.gwt-TabBar {
+ font-size: smaller;
+}
+
+.gwt-TabBar .gwt-TabBarFirst {
+ height: 100%;
+ border-bottom: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ padding-left: 3px;
+}
+
+.gwt-TabBar .gwt-TabBarRest {
+ border-bottom: 1px solid #87b3ff;
+ padding-right: 3px;
+}
+
+.gwt-TabBar .gwt-TabBarItem {
+ border-top: 1px solid #87b3ff;
+ border-bottom: 1px solid #87b3ff;
+ padding: 2px;
+ cursor: hand;
+ white-space: nowrap;
+ border-right: 1px solid #87b3ff;
+}
+
+.gwt-TabBar .gwt-TabBarItem-selected {
+ font-weight: bold;
+ background-color: #e8eef7;
+ border-top: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ border-bottom: 1px solid #e8eef7;
+ padding: 2px;
+ cursor: default;
+ white-space: nowrap;
+}
+
+.gwt-PushButton-up {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-up-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down {
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-RichTextArea {
+ border: 1px solid black;
+ background-color: white;
+}
+
+.gwt-RichTextToolbar {
+ background-color: #C3D9FF;
+ padding: 2px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down {
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-HorizontalSplitPanel {
+ border: 8px solid #C3D9FF;
+}
+
+.gwt-HorizontalSplitPanel .splitter {
+ background-color: #C3D9FF;
+ cursor: move;
+}
+
+.gwt-HorizontalSplitPanel .left {
+ background-color: #E8EEF7;
+}
+
+.gwt-VerticalSplitPanel {
+ border: 8px solid #C3D9FF;
+}
+
+.gwt-VerticalSplitPanel .splitter {
+ background-color: #C3D9FF;
+ height: 8px;
+ cursor: move;
+}
+
+.gwt-SuggestBoxPopup {
+ border: 2px solid #C3D9FF;
+}
+
+.gwt-SuggestBoxPopup .item {
+ padding: 2px;
+}
+
+.gwt-SuggestBoxPopup .item-selected {
+ background-color: #C3D9FF;
+ padding: 2px;
+}
+
+.gwt-DisclosurePanel {
+ border: 2px solid #C3D9FF;
+}
+
+.gwt-DisclosurePanel .header {
+ background-color: #e8eef7;
+ cursor: hand;
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/blank.png
===================================================================
(Binary files differ)
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/blank.png
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/blank.png)
===================================================================
(Binary files differ)
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/cogwheel.png
===================================================================
(Binary files differ)
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/cogwheel.png
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/cogwheel.png)
===================================================================
(Binary files differ)
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/error-icon.png
===================================================================
(Binary files differ)
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/error-icon.png
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/error-icon.png)
===================================================================
(Binary files differ)
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/home-icon.jpg
===================================================================
(Binary files differ)
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/home-icon.jpg
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/home-icon.jpg)
===================================================================
(Binary files differ)
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/loading.gif
===================================================================
(Binary files differ)
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/loading.gif
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/loading.gif)
===================================================================
(Binary files differ)
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/success-icon.png
===================================================================
(Binary files differ)
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/success-icon.png
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/success-icon.png)
===================================================================
(Binary files differ)
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/warning-icon.png
===================================================================
(Binary files differ)
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/warning-icon.png
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/warning-icon.png)
===================================================================
(Binary files differ)
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.server;
-
-import org.exoplatform.container.ExoContainer;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class ContainerCallback<T>
-{
-
- public abstract T doInContainer(ExoContainer container) throws Exception;
-
- public <C> C getComponent(ExoContainer container, Class<C>
componentClass)
- {
- return componentClass.cast(container.getComponentInstanceOfType(componentClass));
- }
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.server;
+
+import org.exoplatform.container.ExoContainer;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class ContainerCallback<T>
+{
+
+ public abstract T doInContainer(ExoContainer container) throws Exception;
+
+ public <C> C getComponent(ExoContainer container, Class<C>
componentClass)
+ {
+ return componentClass.cast(container.getComponentInstanceOfType(componentClass));
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.server;
-
-import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.container.RootContainer;
-import org.exoplatform.container.component.RequestLifeCycle;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class ContainerRequestHandler
-{
-
- private static final Logger log =
LoggerFactory.getLogger(ContainerRequestHandler.class);
-
- public static <T> T doInRequest(String containerName, ContainerCallback<T>
containerCallback) throws Exception
- {
- RootContainer rootContainer = RootContainer.getInstance();
- PortalContainer container = rootContainer.getPortalContainer(containerName);
- if (container == null)
- {
- throw new RuntimeException("Invalid container name " +
containerName);
- }
- ExoContainerContext.setCurrentContainer(container);
- RequestLifeCycle.begin(container, true);
- try
- {
- return containerCallback.doInContainer(container);
- }
- finally
- {
- try
- {
- RequestLifeCycle.end();
- }
- catch (IllegalStateException e)
- {
- log.warn("Illegal state exception ending RequestLifeCycle", e);
- }
- }
- }
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.server;
+
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.component.RequestLifeCycle;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class ContainerRequestHandler
+{
+
+ private static final Logger log =
LoggerFactory.getLogger(ContainerRequestHandler.class);
+
+ public static <T> T doInRequest(String containerName, ContainerCallback<T>
containerCallback) throws Exception
+ {
+ RootContainer rootContainer = RootContainer.getInstance();
+ PortalContainer container = rootContainer.getPortalContainer(containerName);
+ if (container == null)
+ {
+ throw new RuntimeException("Invalid container name " +
containerName);
+ }
+ ExoContainerContext.setCurrentContainer(container);
+ RequestLifeCycle.begin(container, true);
+ try
+ {
+ return containerCallback.doInContainer(container);
+ }
+ finally
+ {
+ try
+ {
+ RequestLifeCycle.end();
+ }
+ catch (IllegalStateException e)
+ {
+ log.warn("Illegal state exception ending RequestLifeCycle", e);
+ }
+ }
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.server;
-
-import org.exoplatform.container.ExoContainer;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-import org.gatein.management.api.ContentType;
-import org.gatein.management.api.PathAddress;
-import org.gatein.management.api.controller.ManagedRequest;
-import org.gatein.management.api.controller.ManagedResponse;
-import org.gatein.management.api.controller.ManagementController;
-import org.gatein.management.api.operation.OperationNames;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import static
org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
-
-/**
- * {@code FileDownloadServlet}
- * <p>
- * The file download servlet. Used for export sites.
- * </p>
- * Created on Feb 3, 2011, 3:49:16 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
- * @version 1.0
- */
-public class FileDownloadServlet extends HttpServlet
-{
-
- private static final Logger log = LoggerFactory.getLogger(FileDownloadServlet.class);
- private static final SimpleDateFormat SDF = new
SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");
-
- @Override
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
- {
- String portalContainerName = request.getParameter("pc");
- final String type = request.getParameter("ownerType");
- final String name = request.getParameter("ownerId");
- String safeName = name.replaceAll("/", "-");
- if (safeName.startsWith("-"))
- {
- safeName = safeName.substring(1);
- }
- String filename = new
StringBuilder(type).append("_").append(safeName).append("_").append(getTimestamp()).append(".zip").toString();
-
- response.setContentType("application/octet-stream; charset=UTF-8");
- response.setHeader("Content-disposition", "attachment;
filename=\"" + filename + "\"");
-
- final OutputStream os = response.getOutputStream();
- try
- {
- doInRequest(portalContainerName, new ContainerCallback<Void>()
- {
-
- public Void doInContainer(ExoContainer container) throws Exception
- {
- ManagementController controller = getComponent(container,
ManagementController.class);
- PathAddress address = PathAddress.pathAddress("mop",
type+"sites", name);
-
- ManagedRequest request =
ManagedRequest.Factory.create(OperationNames.EXPORT_RESOURCE, address, ContentType.ZIP);
- ManagedResponse response = controller.execute(request);
- if (response.getOutcome().isSuccess())
- {
- response.writeResult(os);
- }
- else
- {
- throw new Exception(response.getOutcome().getFailureDescription());
- }
-
- return null;
- }
- });
- os.flush();
- }
- catch (Exception e)
- {
- log.error("Error during download", e);
- }
- finally
- {
- if (os != null)
- {
- os.close();
- }
- }
- }
-
- @Override
- protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
- {
- doGet(request, response);
- }
-
- private String getTimestamp()
- {
- return SDF.format(new Date());
- }
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.server;
+
+import org.exoplatform.container.ExoContainer;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.controller.ManagedRequest;
+import org.gatein.management.api.controller.ManagedResponse;
+import org.gatein.management.api.controller.ManagementController;
+import org.gatein.management.api.operation.OperationNames;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import static
org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
+
+/**
+ * {@code FileDownloadServlet}
+ * <p>
+ * The file download servlet. Used for export sites.
+ * </p>
+ * Created on Feb 3, 2011, 3:49:16 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
+ * @version 1.0
+ */
+public class FileDownloadServlet extends HttpServlet
+{
+
+ private static final Logger log = LoggerFactory.getLogger(FileDownloadServlet.class);
+ private static final SimpleDateFormat SDF = new
SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");
+
+ @Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
+ {
+ String portalContainerName = request.getParameter("pc");
+ final String type = request.getParameter("ownerType");
+ final String name = request.getParameter("ownerId");
+ String safeName = name.replaceAll("/", "-");
+ if (safeName.startsWith("-"))
+ {
+ safeName = safeName.substring(1);
+ }
+ String filename = new
StringBuilder(type).append("_").append(safeName).append("_").append(getTimestamp()).append(".zip").toString();
+
+ response.setContentType("application/octet-stream; charset=UTF-8");
+ response.setHeader("Content-disposition", "attachment;
filename=\"" + filename + "\"");
+
+ final OutputStream os = response.getOutputStream();
+ try
+ {
+ doInRequest(portalContainerName, new ContainerCallback<Void>()
+ {
+
+ public Void doInContainer(ExoContainer container) throws Exception
+ {
+ ManagementController controller = getComponent(container,
ManagementController.class);
+ PathAddress address = PathAddress.pathAddress("mop",
type+"sites", name);
+
+ ManagedRequest request =
ManagedRequest.Factory.create(OperationNames.EXPORT_RESOURCE, address, ContentType.ZIP);
+ ManagedResponse response = controller.execute(request);
+ if (response.getOutcome().isSuccess())
+ {
+ response.writeResult(os);
+ }
+ else
+ {
+ throw new Exception(response.getOutcome().getFailureDescription());
+ }
+
+ return null;
+ }
+ });
+ os.flush();
+ }
+ catch (Exception e)
+ {
+ log.error("Error during download", e);
+ }
+ finally
+ {
+ if (os != null)
+ {
+ os.close();
+ }
+ }
+ }
+
+ @Override
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
+ {
+ doGet(request, response);
+ }
+
+ private String getTimestamp()
+ {
+ return SDF.format(new Date());
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,194 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.server;
-
-import gwtupload.server.UploadAction;
-import gwtupload.server.exceptions.UploadActionException;
-import org.apache.commons.fileupload.FileItem;
-import org.exoplatform.container.ExoContainer;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-import org.gatein.management.api.ContentType;
-import org.gatein.management.api.PathAddress;
-import org.gatein.management.api.controller.ManagedRequest;
-import org.gatein.management.api.controller.ManagedResponse;
-import org.gatein.management.api.controller.ManagementController;
-import org.gatein.management.api.operation.OperationNames;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import static
org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
-
-/**
- * {@code FileUploadServlet}
- * <p>
- * The file upload servlet based on GWT upload, used for import sites.
- * </p>
- * Created on Jan 3, 2011, 3:43:36 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
- * @version 1.0
- */
-public class FileUploadServlet extends UploadAction
-{
-
- private static final Logger log = LoggerFactory.getLogger(FileUploadServlet.class);
- private static final long serialVersionUID = 1L;
- private Hashtable<String, String> receivedContentTypes = new
Hashtable<String, String>();
- /**
- * Maintain a list with received files and their content types.
- */
- private Hashtable<String, File> receivedFiles = new Hashtable<String,
File>();
-
- /**
- * Override executeAction to save the received files in a custom place
- * and delete this items from session.
- */
- @Override
- public String executeAction(HttpServletRequest request, List<FileItem>
sessionFiles) throws UploadActionException
- {
- StringBuilder response = new StringBuilder("<response>\n");
- int count = 0;
- for (FileItem item : sessionFiles)
- {
- //if (false == item.isFormField()) {
- if (!item.isFormField())
- {
- count++;
- try
- {
- // Create a new file based on the remote file name in the client
- String saveName =
item.getName().replaceAll("[\\\\/><\\|\\s\"'{}()\\[\\]]+",
"_");
- // Create a temporary file placed in the default system temp folder
- File file = File.createTempFile(saveName, ".zip");
- item.write(file);
-
- // Save a list with the received files
- receivedFiles.put(item.getFieldName(), file);
- receivedContentTypes.put(item.getFieldName(), item.getContentType());
-
- String overwriteVal = request.getParameter("overwrite");
- boolean overwrite = Boolean.parseBoolean(overwriteVal);
-
- // process the uploaded file
- processImport(request.getParameter("pc"), new
FileInputStream(file), overwrite);
-
- // Compose a xml message with the full file information which can be
parsed in client side
-
response.append("<file-").append(count).append("-field>").append(item.getFieldName()).append("</file-").append(count).append("-field>\n");
-
response.append("<file-").append(count).append("-name>").append(item.getName()).append("</file-").append(count).append("-name>\n");
-
response.append("<file-").append(count).append("-size>").append(item.getSize()).append("</file-").append(count).append("-size>\n");
-
response.append("<file-").append(count).append("-type>").append(item.getContentType()).append("</file-").append(count).append("type>\n");
- }
- catch (Exception e)
- {
- throw new UploadActionException(e);
- }
- }
- }
-
- // Remove files from session because we have a copy of them
- removeSessionFileItems(request);
-
- // Send information of the received files to the client.
- return response.append("</response>\n").toString();
- }
-
- /**
- * Get the content of an uploaded file.
- */
- @Override
- public void getUploadedFile(HttpServletRequest request, HttpServletResponse response)
throws IOException
- {
- String fieldName = request.getParameter(PARAM_SHOW);
- File f = receivedFiles.get(fieldName);
- if (f != null)
- {
- response.setContentType(receivedContentTypes.get(fieldName));
- FileInputStream is = new FileInputStream(f);
- copyFromInputStreamToOutputStream(is, response.getOutputStream());
- }
- else
- {
- renderXmlResponse(request, response, ERROR_ITEM_NOT_FOUND);
- }
- }
-
- /**
- * Remove a file when the user sends a delete request.
- */
- @Override
- public void removeItem(HttpServletRequest request, String fieldName) throws
UploadActionException
- {
- File file = receivedFiles.get(fieldName);
- receivedFiles.remove(fieldName);
- receivedContentTypes.remove(fieldName);
- if (file != null)
- {
- boolean deleted = file.delete();
- if (!deleted) log.warn("Could not delete file " + file);
- }
- }
-
- private void processImport(final String containerName, final InputStream in, final
boolean overwrite) throws Exception
- {
-
- doInRequest(containerName, new ContainerCallback<Void>()
- {
-
- @Override
- public Void doInContainer(ExoContainer container) throws Exception
- {
- ManagementController controller = getComponent(container,
ManagementController.class);
-
- Map<String, List<String>> attributes = Collections.emptyMap();
- if (overwrite)
- {
- attributes = new HashMap<String, List<String>>(1);
- attributes.put("import-strategy",
Collections.singletonList("overwrite"));
- }
- ManagedRequest request = ManagedRequest.Factory.create(
- OperationNames.IMPORT_RESOURCE, PathAddress.pathAddress("mop"),
- attributes, in, ContentType.ZIP);
-
- ManagedResponse response = controller.execute(request);
- if (!response.getOutcome().isSuccess())
- {
- throw new Exception(response.getOutcome().getFailureDescription());
- }
-
- return null;
- }
- });
-
- }
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,194 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.server;
+
+import gwtupload.server.UploadAction;
+import gwtupload.server.exceptions.UploadActionException;
+import org.apache.commons.fileupload.FileItem;
+import org.exoplatform.container.ExoContainer;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.controller.ManagedRequest;
+import org.gatein.management.api.controller.ManagedResponse;
+import org.gatein.management.api.controller.ManagementController;
+import org.gatein.management.api.operation.OperationNames;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+
+import static
org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
+
+/**
+ * {@code FileUploadServlet}
+ * <p>
+ * The file upload servlet based on GWT upload, used for import sites.
+ * </p>
+ * Created on Jan 3, 2011, 3:43:36 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
+ * @version 1.0
+ */
+public class FileUploadServlet extends UploadAction
+{
+
+ private static final Logger log = LoggerFactory.getLogger(FileUploadServlet.class);
+ private static final long serialVersionUID = 1L;
+ private Hashtable<String, String> receivedContentTypes = new
Hashtable<String, String>();
+ /**
+ * Maintain a list with received files and their content types.
+ */
+ private Hashtable<String, File> receivedFiles = new Hashtable<String,
File>();
+
+ /**
+ * Override executeAction to save the received files in a custom place
+ * and delete this items from session.
+ */
+ @Override
+ public String executeAction(HttpServletRequest request, List<FileItem>
sessionFiles) throws UploadActionException
+ {
+ StringBuilder response = new StringBuilder("<response>\n");
+ int count = 0;
+ for (FileItem item : sessionFiles)
+ {
+ //if (false == item.isFormField()) {
+ if (!item.isFormField())
+ {
+ count++;
+ try
+ {
+ // Create a new file based on the remote file name in the client
+ String saveName =
item.getName().replaceAll("[\\\\/><\\|\\s\"'{}()\\[\\]]+",
"_");
+ // Create a temporary file placed in the default system temp folder
+ File file = File.createTempFile(saveName, ".zip");
+ item.write(file);
+
+ // Save a list with the received files
+ receivedFiles.put(item.getFieldName(), file);
+ receivedContentTypes.put(item.getFieldName(), item.getContentType());
+
+ String overwriteVal = request.getParameter("overwrite");
+ boolean overwrite = Boolean.parseBoolean(overwriteVal);
+
+ // process the uploaded file
+ processImport(request.getParameter("pc"), new
FileInputStream(file), overwrite);
+
+ // Compose a xml message with the full file information which can be
parsed in client side
+
response.append("<file-").append(count).append("-field>").append(item.getFieldName()).append("</file-").append(count).append("-field>\n");
+
response.append("<file-").append(count).append("-name>").append(item.getName()).append("</file-").append(count).append("-name>\n");
+
response.append("<file-").append(count).append("-size>").append(item.getSize()).append("</file-").append(count).append("-size>\n");
+
response.append("<file-").append(count).append("-type>").append(item.getContentType()).append("</file-").append(count).append("type>\n");
+ }
+ catch (Exception e)
+ {
+ throw new UploadActionException(e);
+ }
+ }
+ }
+
+ // Remove files from session because we have a copy of them
+ removeSessionFileItems(request);
+
+ // Send information of the received files to the client.
+ return response.append("</response>\n").toString();
+ }
+
+ /**
+ * Get the content of an uploaded file.
+ */
+ @Override
+ public void getUploadedFile(HttpServletRequest request, HttpServletResponse response)
throws IOException
+ {
+ String fieldName = request.getParameter(PARAM_SHOW);
+ File f = receivedFiles.get(fieldName);
+ if (f != null)
+ {
+ response.setContentType(receivedContentTypes.get(fieldName));
+ FileInputStream is = new FileInputStream(f);
+ copyFromInputStreamToOutputStream(is, response.getOutputStream());
+ }
+ else
+ {
+ renderXmlResponse(request, response, ERROR_ITEM_NOT_FOUND);
+ }
+ }
+
+ /**
+ * Remove a file when the user sends a delete request.
+ */
+ @Override
+ public void removeItem(HttpServletRequest request, String fieldName) throws
UploadActionException
+ {
+ File file = receivedFiles.get(fieldName);
+ receivedFiles.remove(fieldName);
+ receivedContentTypes.remove(fieldName);
+ if (file != null)
+ {
+ boolean deleted = file.delete();
+ if (!deleted) log.warn("Could not delete file " + file);
+ }
+ }
+
+ private void processImport(final String containerName, final InputStream in, final
boolean overwrite) throws Exception
+ {
+
+ doInRequest(containerName, new ContainerCallback<Void>()
+ {
+
+ @Override
+ public Void doInContainer(ExoContainer container) throws Exception
+ {
+ ManagementController controller = getComponent(container,
ManagementController.class);
+
+ Map<String, List<String>> attributes = Collections.emptyMap();
+ if (overwrite)
+ {
+ attributes = new HashMap<String, List<String>>(1);
+ attributes.put("import-strategy",
Collections.singletonList("overwrite"));
+ }
+ ManagedRequest request = ManagedRequest.Factory.create(
+ OperationNames.IMPORT_RESOURCE, PathAddress.pathAddress("mop"),
+ attributes, in, ContentType.ZIP);
+
+ ManagedResponse response = controller.execute(request);
+ if (!response.getOutcome().isSuccess())
+ {
+ throw new Exception(response.getOutcome().getFailureDescription());
+ }
+
+ return null;
+ }
+ });
+
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java 2011-09-13
05:13:55 UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,193 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This 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 software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.gatein.management.gadget.mop.exportimport.server;
-
-import com.google.gwt.user.server.rpc.RemoteServiceServlet;
-import com.google.gwt.user.server.rpc.SerializationPolicy;
-import com.google.gwt.user.server.rpc.SerializationPolicyLoader;
-import org.exoplatform.container.ExoContainer;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-import org.gatein.management.api.ContentType;
-import org.gatein.management.api.PathAddress;
-import org.gatein.management.api.controller.ManagedRequest;
-import org.gatein.management.api.controller.ManagedResponse;
-import org.gatein.management.api.controller.ManagementController;
-import org.gatein.management.api.operation.OperationNames;
-import org.gatein.management.api.operation.model.ReadResourceModel;
-import org.gatein.management.gadget.mop.exportimport.client.DisplayableException;
-import org.gatein.management.gadget.mop.exportimport.client.GateInService;
-import org.gatein.management.gadget.mop.exportimport.client.TreeNode;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.List;
-
-import static
org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
-
-/**
- * {@code GateInServiceImpl}
- * <p>
- * The {@code GateInService} remote servlet implementation.
- * </p>
- * Created on Jan 3, 2011, 12:30:45 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
- * @version 1.0
- */
-public class GateInServiceImpl extends RemoteServiceServlet implements GateInService
-{
- private static final Logger log = LoggerFactory.getLogger(GateInService.class);
-
- @Override
- protected SerializationPolicy doGetSerializationPolicy(HttpServletRequest request,
String moduleBaseURL, String strongName)
- {
- // Code taken from RemoteServiceServlet
- String serializationPolicyFilePath =
SerializationPolicyLoader.getSerializationPolicyFileName("/exportimport/" +
strongName);
-
- // Open the RPC resource file and read its contents.
- InputStream is =
getServletContext().getResourceAsStream(serializationPolicyFilePath);
- try
- {
- if (is != null)
- {
- try
- {
- return SerializationPolicyLoader.loadFromStream(is, null);
- }
- catch (ParseException e)
- {
- log.error("Failed to parse the policy file '" +
serializationPolicyFilePath + "'", e);
- }
- catch (IOException e)
- {
- log.error("Could not read the policy file '" +
serializationPolicyFilePath + "'", e);
- }
- }
- else
- {
- String message = "ERROR: The serialization policy file '"
- + serializationPolicyFilePath
- + "' was not found; did you forget to include it in this
deployment?";
- log.error(message);
- }
- }
- finally
- {
- if (is != null)
- {
- try
- {
- is.close();
- }
- catch (IOException e)
- {
- // Ignore this error
- }
- }
- }
-
- return null;
- }
-
- /**
- * Update the Tree item asynchronously
- *
- * @param containerName name of portal container
- * @param tn The item to be updated
- * @return the updated tree node
- */
- public TreeNode updateItem(String containerName, TreeNode tn)
- {
- //TODO: Do we need this ?
- return tn;
- }
-
- /**
- * Retrieve asynchronously the list of root nodes
- *
- * @param containerName The portal container name
- * @return The list of the root nodes
- */
- public List<TreeNode> getRootNodes(String containerName) throws Exception
- {
- try
- {
- return doInRequest(containerName, new
ContainerCallback<List<TreeNode>>()
- {
- public List<TreeNode> doInContainer(ExoContainer container) throws
Exception
- {
- ManagementController controller = getComponent(container,
ManagementController.class);
- List<TreeNode> nodes = new ArrayList<TreeNode>();
- nodes.add(getSiteTypeNode(controller, "portal"));
- nodes.add(getSiteTypeNode(controller, "group"));
-
- return nodes;
- }
- });
- }
- catch (Exception e)
- {
- log.error("Exception obtaining portal and group site names.", e);
- throw e;
- }
- }
-
- private TreeNode getSiteTypeNode(ManagementController controller, String siteType)
throws Exception
- {
- try
- {
- ManagedRequest request = ManagedRequest.Factory.create(
- OperationNames.READ_RESOURCE,
- PathAddress.pathAddress("mop", siteType + "sites"),
- ContentType.JSON);
-
- ManagedResponse response = controller.execute(request);
- if (!response.getOutcome().isSuccess())
- {
- throw new Exception(response.getOutcome().getFailureDescription());
- }
-
- ReadResourceModel result = (ReadResourceModel) response.getResult();
- List<TreeNode> children = new
ArrayList<TreeNode>(result.getChildren().size());
- for (String siteName : result.getChildren())
- {
- TreeNode siteNode = new TreeNode(siteName);
- siteNode.setExportable(true);
- siteNode.setType(siteType);
- siteNode.setSiteName(siteName);
- children.add(siteNode);
- }
-
- return new TreeNode(siteType, children);
- }
- catch (Exception e)
- {
- log.error("Exception getting site type " + siteType + "
node.", e);
- throw e;
- }
- }
-}
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java
(from rev 7367,
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,193 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.management.gadget.mop.exportimport.server;
+
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+import com.google.gwt.user.server.rpc.SerializationPolicy;
+import com.google.gwt.user.server.rpc.SerializationPolicyLoader;
+import org.exoplatform.container.ExoContainer;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.controller.ManagedRequest;
+import org.gatein.management.api.controller.ManagedResponse;
+import org.gatein.management.api.controller.ManagementController;
+import org.gatein.management.api.operation.OperationNames;
+import org.gatein.management.api.operation.model.ReadResourceModel;
+import org.gatein.management.gadget.mop.exportimport.client.DisplayableException;
+import org.gatein.management.gadget.mop.exportimport.client.GateInService;
+import org.gatein.management.gadget.mop.exportimport.client.TreeNode;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+
+import static
org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
+
+/**
+ * {@code GateInServiceImpl}
+ * <p>
+ * The {@code GateInService} remote servlet implementation.
+ * </p>
+ * Created on Jan 3, 2011, 12:30:45 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil
Benothman</a>
+ * @version 1.0
+ */
+public class GateInServiceImpl extends RemoteServiceServlet implements GateInService
+{
+ private static final Logger log = LoggerFactory.getLogger(GateInService.class);
+
+ @Override
+ protected SerializationPolicy doGetSerializationPolicy(HttpServletRequest request,
String moduleBaseURL, String strongName)
+ {
+ // Code taken from RemoteServiceServlet
+ String serializationPolicyFilePath =
SerializationPolicyLoader.getSerializationPolicyFileName("/exportimport/" +
strongName);
+
+ // Open the RPC resource file and read its contents.
+ InputStream is =
getServletContext().getResourceAsStream(serializationPolicyFilePath);
+ try
+ {
+ if (is != null)
+ {
+ try
+ {
+ return SerializationPolicyLoader.loadFromStream(is, null);
+ }
+ catch (ParseException e)
+ {
+ log.error("Failed to parse the policy file '" +
serializationPolicyFilePath + "'", e);
+ }
+ catch (IOException e)
+ {
+ log.error("Could not read the policy file '" +
serializationPolicyFilePath + "'", e);
+ }
+ }
+ else
+ {
+ String message = "ERROR: The serialization policy file '"
+ + serializationPolicyFilePath
+ + "' was not found; did you forget to include it in this
deployment?";
+ log.error(message);
+ }
+ }
+ finally
+ {
+ if (is != null)
+ {
+ try
+ {
+ is.close();
+ }
+ catch (IOException e)
+ {
+ // Ignore this error
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Update the Tree item asynchronously
+ *
+ * @param containerName name of portal container
+ * @param tn The item to be updated
+ * @return the updated tree node
+ */
+ public TreeNode updateItem(String containerName, TreeNode tn)
+ {
+ //TODO: Do we need this ?
+ return tn;
+ }
+
+ /**
+ * Retrieve asynchronously the list of root nodes
+ *
+ * @param containerName The portal container name
+ * @return The list of the root nodes
+ */
+ public List<TreeNode> getRootNodes(String containerName) throws Exception
+ {
+ try
+ {
+ return doInRequest(containerName, new
ContainerCallback<List<TreeNode>>()
+ {
+ public List<TreeNode> doInContainer(ExoContainer container) throws
Exception
+ {
+ ManagementController controller = getComponent(container,
ManagementController.class);
+ List<TreeNode> nodes = new ArrayList<TreeNode>();
+ nodes.add(getSiteTypeNode(controller, "portal"));
+ nodes.add(getSiteTypeNode(controller, "group"));
+
+ return nodes;
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ log.error("Exception obtaining portal and group site names.", e);
+ throw e;
+ }
+ }
+
+ private TreeNode getSiteTypeNode(ManagementController controller, String siteType)
throws Exception
+ {
+ try
+ {
+ ManagedRequest request = ManagedRequest.Factory.create(
+ OperationNames.READ_RESOURCE,
+ PathAddress.pathAddress("mop", siteType + "sites"),
+ ContentType.JSON);
+
+ ManagedResponse response = controller.execute(request);
+ if (!response.getOutcome().isSuccess())
+ {
+ throw new Exception(response.getOutcome().getFailureDescription());
+ }
+
+ ReadResourceModel result = (ReadResourceModel) response.getResult();
+ List<TreeNode> children = new
ArrayList<TreeNode>(result.getChildren().size());
+ for (String siteName : result.getChildren())
+ {
+ TreeNode siteNode = new TreeNode(siteName);
+ siteNode.setExportable(true);
+ siteNode.setType(siteType);
+ siteNode.setSiteName(siteName);
+ children.add(siteNode);
+ }
+
+ return new TreeNode(siteType, children);
+ }
+ catch (Exception e)
+ {
+ log.error("Exception getting site type " + siteType + "
node.", e);
+ throw e;
+ }
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/webapp/ExportImport.html 2011-09-13 05:13:55
UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,44 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This 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 software 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 software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- -->
-
-<!doctype html>
-<html>
-<head>
- <meta http-equiv="content-type" content="text/html;
charset=UTF-8">
- <title>MOP Export Import</title>
- <script type="text/javascript" language="javascript"
src="exportimport/exportimport.nocache.js"></script>
-</head>
-<body>
-
-<h1>ExportImport</h1>
-
-<div id="rootpanelstyle"></div>
-<iframe src="javascript:''" id="__gwt_historyFrame"
tabIndex='-1'
- style="position:absolute;width:0;height:0;border:0"></iframe>
-<noscript>
- <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em;
color: red; background-color: white; border: 1px solid red; padding: 4px; font-family:
sans-serif">
- Your web browser must have JavaScript enabled
- in order for this application to display correctly.
- </div>
-</noscript>
-</body>
-</html>
\ No newline at end of file
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html
(from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/webapp/ExportImport.html)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,44 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ This 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 software 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 software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<!doctype html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;
charset=UTF-8">
+ <title>MOP Export Import</title>
+ <script type="text/javascript" language="javascript"
src="exportimport/exportimport.nocache.js"></script>
+</head>
+<body>
+
+<h1>ExportImport</h1>
+
+<div id="rootpanelstyle"></div>
+<iframe src="javascript:''" id="__gwt_historyFrame"
tabIndex='-1'
+ style="position:absolute;width:0;height:0;border:0"></iframe>
+<noscript>
+ <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em;
color: red; background-color: white; border: 1px solid red; padding: 4px; font-family:
sans-serif">
+ Your web browser must have JavaScript enabled
+ in order for this application to display correctly.
+ </div>
+</noscript>
+</body>
+</html>
\ No newline at end of file
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml 2011-09-13 05:13:55
UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,32 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This 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 software 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 software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- -->
-
-<gadgets
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_1
http://www.gatein.org/xml/ns/gadgets_1_0"
-
xmlns="http://www.gatein.org/xml/ns/gadgets_1_0">
-
- <gadget name="SiteExportImport">
- <path>/exportimport/Application.gadget.xml</path>
- </gadget>
-
-</gadgets>
\ No newline at end of file
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml
(from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,32 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ This 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 software 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 software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<gadgets
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_1
http://www.gatein.org/xml/ns/gadgets_1_0"
+
xmlns="http://www.gatein.org/xml/ns/gadgets_1_0">
+
+ <gadget name="SiteExportImport">
+ <path>/exportimport/Application.gadget.xml</path>
+ </gadget>
+
+</gadgets>
\ No newline at end of file
Deleted:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml 2011-09-13 05:13:55
UTC (rev 7367)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -1,80 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This 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 software 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 software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- -->
-
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-
-<web-app>
-
- <display-name>gwtGadgets</display-name>
-
- <!-- TODO: Determine if these parameters (maxSize and slowUploads) is what we want
for this -->
- <context-param>
- <!-- max size of the upload request -->
- <param-name>maxSize</param-name>
- <param-value>3145728</param-value>
- </context-param>
-
- <context-param>
- <!--
- Useful in development mode to slow down the uploads in fast networks.
- Put the number of milliseconds to sleep in each block received in the server.
- false or 0, means don't use slow uploads
- -->
- <param-name>slowUploads</param-name>
- <param-value>50</param-value>
- </context-param>
-
- <!-- GateIn service servlet -->
- <servlet>
- <servlet-name>gtnService</servlet-name>
-
<servlet-class>org.gatein.management.gadget.mop.exportimport.server.GateInServiceImpl</servlet-class>
- </servlet>
-
- <!-- file upload servlet-->
- <servlet>
- <servlet-name>uploadServlet</servlet-name>
-
<servlet-class>org.gatein.management.gadget.mop.exportimport.server.FileUploadServlet</servlet-class>
- </servlet>
-
- <servlet>
- <servlet-name>downloadServlet</servlet-name>
-
<servlet-class>org.gatein.management.gadget.mop.exportimport.server.FileDownloadServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>gtnService</servlet-name>
- <url-pattern>/exportimport/GateInService</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>uploadServlet</servlet-name>
- <url-pattern>/exportimport/upload</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>downloadServlet</servlet-name>
- <url-pattern>/exportimport/download</url-pattern>
- </servlet-mapping>
-
-</web-app>
Copied:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml
(from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -0,0 +1,80 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ This 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 software 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 software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+
+ <display-name>gwtGadgets</display-name>
+
+ <!-- TODO: Determine if these parameters (maxSize and slowUploads) is what we want
for this -->
+ <context-param>
+ <!-- max size of the upload request -->
+ <param-name>maxSize</param-name>
+ <param-value>3145728</param-value>
+ </context-param>
+
+ <context-param>
+ <!--
+ Useful in development mode to slow down the uploads in fast networks.
+ Put the number of milliseconds to sleep in each block received in the server.
+ false or 0, means don't use slow uploads
+ -->
+ <param-name>slowUploads</param-name>
+ <param-value>50</param-value>
+ </context-param>
+
+ <!-- GateIn service servlet -->
+ <servlet>
+ <servlet-name>gtnService</servlet-name>
+
<servlet-class>org.gatein.management.gadget.mop.exportimport.server.GateInServiceImpl</servlet-class>
+ </servlet>
+
+ <!-- file upload servlet-->
+ <servlet>
+ <servlet-name>uploadServlet</servlet-name>
+
<servlet-class>org.gatein.management.gadget.mop.exportimport.server.FileUploadServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>downloadServlet</servlet-name>
+
<servlet-class>org.gatein.management.gadget.mop.exportimport.server.FileDownloadServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>gtnService</servlet-name>
+ <url-pattern>/exportimport/GateInService</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>uploadServlet</servlet-name>
+ <url-pattern>/exportimport/upload</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>downloadServlet</servlet-name>
+ <url-pattern>/exportimport/download</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Modified: epp/portal/branches/EPP_5_2_Branch/gadgets/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/pom.xml 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/pom.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -35,5 +35,6 @@
<module>core</module>
<module>server</module>
<module>eXoGadgets</module>
+ <module>gwtGadgets</module>
</modules>
</project>
Modified: epp/portal/branches/EPP_5_2_Branch/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -50,7 +50,7 @@
<org.picketlink.idm>1.3.0.Alpha04</org.picketlink.idm>
<org.gatein.wsrp.version>2.1.0-Beta05</org.gatein.wsrp.version>
<org.gatein.mop.version>1.1.0-Beta05</org.gatein.mop.version>
- <org.gatein.mgmt.version>1.0.0-Beta02</org.gatein.mgmt.version>
+ <org.gatein.mgmt.version>1.0.0-Beta03</org.gatein.mgmt.version>
<org.slf4j.version>1.5.8</org.slf4j.version>
<commons-pool.version>1.5.5</commons-pool.version>
<rhino.version>1.6R5</rhino.version>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/navigation.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/navigation.xml 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/navigation.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -45,6 +45,12 @@
<label>#{administration.pageManagement}</label>
<page-reference>group::/platform/administrators::pageManagement</page-reference>
</node>
+
+ <node>
+ <name>siteExportImport</name>
+ <label>Site Export/Import</label>
+
<page-reference>group::/platform/administrators::siteExportImport</page-reference>
+ </node>
</node>
</page-nodes>
</node-navigation>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/pages.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/pages.xml 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/pages.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -88,4 +88,19 @@
<show-info-bar>false</show-info-bar>
</portlet-application>
</page>
+
+ <page>
+ <name>siteExportImport</name>
+ <title>Site Export/Import</title>
+
<access-permissions>manager:/platform/administrators</access-permissions>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <gadget-application>
+ <gadget>
+ <gadget-ref>SiteExportImport</gadget-ref>
+ </gadget>
+ <title>Site Export/Import</title>
+
<access-permissions>manager:/platform/administrators</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </gadget-application>
+ </page>
</page-set>
Property changes on: epp/portal/branches/EPP_5_2_Branch/wsrp-integration
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/wsrp-integration:5868
/portal/branches/branch-GTNPORTAL-1592/wsrp-integration:4894
/portal/branches/branch-GTNPORTAL-1643/wsrp-integration:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/wsrp-integration:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/wsrp-integration:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/wsrp-integration:5765
/portal/branches/branch-GTNPORTAL-1790/wsrp-integration:5871
/portal/branches/branch-GTNPORTAL-1822/wsrp-integration:5943,5952
/portal/branches/branch-GTNPORTAL-1832/wsrp-integration:6030,6063
/portal/branches/branch-GTNPORTAL-1872/wsrp-integration:6400,6551
/portal/branches/branch-GTNPORTAL-1921/wsrp-integration:6603
/portal/branches/branch-GTNPORTAL-1963/wsrp-integration:6904,6915-6916
/portal/branches/decoupled-webos/wsrp-integration:6214-6243
/portal/branches/gatein-management/wsrp-integration:6920-6958
/portal/branches/global-portlet-metadata/wsrp-integration:6298-6384
/portal/branches/site-describability/wsrp-integration:6171-6235
/portal/trunk/wsrp-integration:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7210,7262,7308,7326
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/wsrp-integration:5868
/portal/branches/branch-GTNPORTAL-1592/wsrp-integration:4894
/portal/branches/branch-GTNPORTAL-1643/wsrp-integration:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/wsrp-integration:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/wsrp-integration:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/wsrp-integration:5765
/portal/branches/branch-GTNPORTAL-1790/wsrp-integration:5871
/portal/branches/branch-GTNPORTAL-1822/wsrp-integration:5943,5952
/portal/branches/branch-GTNPORTAL-1832/wsrp-integration:6030,6063
/portal/branches/branch-GTNPORTAL-1872/wsrp-integration:6400,6551
/portal/branches/branch-GTNPORTAL-1921/wsrp-integration:6603
/portal/branches/branch-GTNPORTAL-1963/wsrp-integration:6904,6915-6916
/portal/branches/decoupled-webos/wsrp-integration:6214-6243
/portal/branches/gatein-management/wsrp-integration:6920-6958
/portal/branches/global-portlet-metadata/wsrp-integration:6298-6384
/portal/branches/site-describability/wsrp-integration:6171-6235
/portal/trunk/wsrp-integration:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7239,7262,7308,7326,7331,7359,7367
Modified:
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml 2011-09-13
11:30:58 UTC (rev 7380)
+++
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml 2011-09-13
11:54:01 UTC (rev 7381)
@@ -164,6 +164,9 @@
<name>group.configuration</name>
<description>description</description>
<object
type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="importMode">
+ <string>merge</string>
+ </field>
<field name="predefinedOwner">
<collection type="java.util.HashSet">
<value>