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
This commit is contained in:
Jon Cox
2007-02-01 23:44:49 +00:00
parent 6c0e1b3014
commit 74a20a88f3

View File

@@ -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