From 74a20a88f337dd5e6451248477a20535693e717b Mon Sep 17 00:00:00 2001 From: Jon Cox Date: Thu, 1 Feb 2007 23:44:49 +0000 Subject: [PATCH] Added support for virtualizing non-webapps. Now as soon as you create a web project, you can put static content into it, & preview via the virtualization server. You don't need a WEB-INF, META-INF, and so forth, but I'm leaing in the warning about the lack of web.xml for now. This means when you first create a project, you'll see a harmless warning about the lack of a web.xml file in the log per virtualized area. Later, I might add context-sensitivity (no pun intended) issue the warning about the lack of a web.xml only when it "looks" like there should be one.... but for now, it always warns (even when you first create the project). Another "todo". git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5006 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../web/bean/wcm/CreateWebsiteWizard.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java b/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java index c0eeb588a8..f96f85eeb8 100644 --- a/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java +++ b/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java @@ -119,6 +119,8 @@ public class CreateWebsiteWizard extends BaseWizardBean /** Current workflow for dialog context */ protected WorkflowConfiguration actionWorkflow = null; + /** Data for virtualization server notification */ + private SandboxInfo sandboxInfo; // ------------------------------------------------------------------------------ // Wizard implementation @@ -187,7 +189,7 @@ public class CreateWebsiteWizard extends BaseWizardBean if (outcome != null) { // create the AVM staging store to represent the newly created location website - SandboxFactory.createStagingSandbox(avmStore, nodeRef); + this.sandboxInfo = SandboxFactory.createStagingSandbox(avmStore, nodeRef); // create the default webapp folder under the hidden system folders final String stagingStore = AVMConstants.buildStagingStoreName(avmStore); @@ -209,6 +211,28 @@ public class CreateWebsiteWizard extends BaseWizardBean } return outcome; } + + @Override + protected String doPostCommitProcessing(FacesContext context, String outcome) + { + // TODO: ask about isStandalone() + // in InviteWebsiteUsersWizard + + if ( this.sandboxInfo != null ) + { + String newStoreName = + AVMConstants.buildStagingStoreName( sandboxInfo.getMainStoreName()); + + String path = AVMConstants.buildStoreWebappPath( + newStoreName, "ROOT" + ); + + AVMConstants.updateVServerWebapp(path, true); + } + return outcome; + } + + /** * Persist the forms, templates, workflows and workflow defaults to the model for this web project