"Create from existing Web Project" added to the Create Web Project wizard

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7004 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-10-16 10:22:26 +00:00
parent 0fc2e60e03
commit d71993e374
11 changed files with 659 additions and 386 deletions

View File

@@ -979,6 +979,12 @@ website_dnsname=DNS name
website_deployto=Deploy To website_deployto=Deploy To
validation_invalid_dns_name=Invalid website DNS name: only alpha-numeric and non-initial/final hyphen characters are allowed (max length < 64). validation_invalid_dns_name=Invalid website DNS name: only alpha-numeric and non-initial/final hyphen characters are allowed (max length < 64).
website_webapp=Default Webapp website_webapp=Default Webapp
website_createfrom=Create From Existing Web Project
create_website_step2_title=Step Two - Create From Existing Web Project
create_website_step2_desc=Optionally select an existing project to be used as the template for this website
website_create_empty=Create a new empty Web Project
website_create_existing=Create a Web Project based on an existing one. The Staging Sandbox structure, Web Forms, Workflow and Users will be copied from the selected Web Project
website_sourcewebsite=Created from Web Project
website_selected_forms=Selected Web Content Forms website_selected_forms=Selected Web Content Forms
website_web_content_forms=Web Content Forms website_web_content_forms=Web Content Forms
website_save_location=Save Location website_save_location=Save Location
@@ -996,22 +1002,22 @@ form_template_templates=Configure Templates
form_template_templates_desc=Setup the Templates you want to use for the Web Form {0} in Web Project {1}. form_template_templates_desc=Setup the Templates you want to use for the Web Form {0} in Web Project {1}.
form_template_workflow=Configure Workflow form_template_workflow=Configure Workflow
form_template_workflow_desc=Configure the workflow defaults for this Web Project form_template_workflow_desc=Configure the workflow defaults for this Web Project
create_website_step2_title=Step Two - Configure Web Content Forms create_website_step3_title=Step Three - Configure Web Content Forms
create_website_step2_desc=Select and configure web forms for generating site content. create_website_step3_desc=Select and configure web forms for generating site content.
website_select_form=Select Web Forms website_select_form=Select Web Forms
website_select_templates=Select Templates website_select_templates=Select Templates
website_selected_templates=Selected Templates website_selected_templates=Selected Templates
website_settings=Configure Workflow website_settings=Configure Workflow
create_website_step3_title=Step Three - Configure Workflow create_website_step4_title=Step Four - Configure Workflow
create_website_step3_desc=Select and configure workflow for non-form generated assets. create_website_step4_desc=Select and configure workflow for non-form generated assets.
website_select_workflows=Select Workflows website_select_workflows=Select Workflows
website_selected_workflows=Selected Workflows website_selected_workflows=Selected Workflows
website_invite=Add Users website_invite=Add Users
create_website_step4_title=Step Four - Add Users create_website_step5_title=Step Five - Add Users
create_website_step4_desc=Select users and their roles. create_website_step5_desc=Select users and their roles.
website_notify=Email Users website_notify=Email Users
create_website_step5_title=Step Five - Email Users create_website_step6_title=Step Six - Email Users
create_website_step5_desc=Notify the invited users. create_website_step6_desc=Notify the website users.
create_website_finish_instruction=To close this wizard and create your web project space click Finish. To review or change your selections click Back. create_website_finish_instruction=To close this wizard and create your web project space click Finish. To review or change your selections click Back.
create_website_summary_users=Users and Roles create_website_summary_users=Users and Roles
edit_website_title=Edit Web Project Wizard edit_website_title=Edit Web Project Wizard

View File

@@ -596,7 +596,7 @@
<property-sheet> <property-sheet>
<show-property name="wca:avmstore" read-only="true" /> <show-property name="wca:avmstore" read-only="true" />
<show-property name="wca:defaultwebapp" read-only="true" /> <show-property name="wca:defaultwebapp" read-only="true" />
<show-property name="wca:deployto" read-only="true" /> <show-property name="wca:deployto" converter="org.alfresco.faces.MultiValueConverter" read-only="true" />
<show-property name="app:icon" show-in-view-mode="false" show-in-edit-mode="false" /> <show-property name="app:icon" show-in-view-mode="false" show-in-edit-mode="false" />
</property-sheet> </property-sheet>
</config> </config>

View File

@@ -16,30 +16,36 @@
description-id="create_website_step1_desc" description-id="create_website_step1_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="forms" title-id="website_forms" description-id="create_website_step2_desc"> <step name="createfrom" title-id="website_createfrom" description-id="create_website_step2_desc">
<page path="/jsp/wcm/create-website-wizard/forms.jsp" <page path="/jsp/wcm/create-website-wizard/create-from.jsp"
title-id="create_website_step2_title" title-id="create_website_step2_title"
description-id="create_website_step2_desc" description-id="create_website_step2_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="settings" title-id="website_settings" description-id="create_website_step3_desc"> <step name="forms" title-id="website_forms" description-id="create_website_step3_desc">
<page path="/jsp/wcm/create-website-wizard/settings.jsp" <page path="/jsp/wcm/create-website-wizard/forms.jsp"
title-id="create_website_step3_title" title-id="create_website_step3_title"
description-id="create_website_step3_desc" description-id="create_website_step3_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="invite" title-id="website_invite" description-id="create_website_step4_desc"> <step name="settings" title-id="website_settings" description-id="create_website_step4_desc">
<page path="/jsp/wcm/create-website-wizard/invite.jsp" <page path="/jsp/wcm/create-website-wizard/settings.jsp"
title-id="create_website_step4_title" title-id="create_website_step4_title"
description-id="create_website_step4_desc" description-id="create_website_step4_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="notify" title-id="website_notify" description-id="create_website_step5_desc"> <step name="invite" title-id="website_invite" description-id="create_website_step5_desc">
<page path="/jsp/wcm/create-website-wizard/notify.jsp" <page path="/jsp/wcm/create-website-wizard/invite.jsp"
title-id="create_website_step5_title" title-id="create_website_step5_title"
description-id="create_website_step5_desc" description-id="create_website_step5_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="notify" title-id="website_notify" description-id="create_website_step6_desc">
<page path="/jsp/wcm/create-website-wizard/notify.jsp"
title-id="create_website_step6_title"
description-id="create_website_step6_desc"
instruction-id="default_instruction" />
</step>
<step name="summary" title-id="summary" description-id="summary_step_description"> <step name="summary" title-id="summary" description-id="summary_step_description">
<page path="/jsp/wcm/create-website-wizard/summary.jsp" <page path="/jsp/wcm/create-website-wizard/summary.jsp"
title-id="summary" title-id="summary"

View File

@@ -42,24 +42,33 @@ import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.model.WCMAppModel; import org.alfresco.model.WCMAppModel;
import org.alfresco.repo.avm.AVMNodeConverter; import org.alfresco.repo.avm.AVMNodeConverter;
import org.alfresco.repo.cache.ExpiringValueCache;
import org.alfresco.service.cmr.avm.AVMService; import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.avm.locking.AVMLockingService; import org.alfresco.service.cmr.avm.locking.AVMLockingService;
import org.alfresco.service.cmr.model.FileInfo; import org.alfresco.service.cmr.model.FileInfo;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.search.ResultSet;
import org.alfresco.service.cmr.search.ResultSetRow;
import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.security.AuthorityType; import org.alfresco.service.cmr.security.AuthorityType;
import org.alfresco.service.cmr.security.PermissionService; import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.cmr.security.PersonService; import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.service.cmr.workflow.WorkflowDefinition; import org.alfresco.service.cmr.workflow.WorkflowDefinition;
import org.alfresco.service.cmr.workflow.WorkflowService; import org.alfresco.service.cmr.workflow.WorkflowService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.util.DNSNameMangler; import org.alfresco.util.DNSNameMangler;
import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.AlfrescoNavigationHandler;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.app.servlet.FacesHelper; import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.wizard.BaseWizardBean; import org.alfresco.web.bean.wizard.BaseWizardBean;
import org.alfresco.web.bean.wizard.InviteUsersWizard.UserGroupRole; import org.alfresco.web.bean.wizard.InviteUsersWizard.UserGroupRole;
import org.alfresco.web.forms.Form; import org.alfresco.web.forms.Form;
import org.alfresco.web.forms.FormNotFoundException;
import org.alfresco.web.forms.FormsService; import org.alfresco.web.forms.FormsService;
import org.alfresco.web.forms.RenderingEngineTemplate; import org.alfresco.web.forms.RenderingEngineTemplate;
import org.alfresco.web.ui.common.component.UIListItem; import org.alfresco.web.ui.common.component.UIListItem;
@@ -75,15 +84,23 @@ import org.apache.commons.logging.LogFactory;
*/ */
public class CreateWebsiteWizard extends BaseWizardBean public class CreateWebsiteWizard extends BaseWizardBean
{ {
private static final String MSG_DEPLOY_TO_HELP = "deploy_to_help";
private static final String MSG_USERROLES = "create_website_summary_users"; private static final String MSG_USERROLES = "create_website_summary_users";
private static final String COMPONENT_FORMLIST = "form-list"; private static final String COMPONENT_FORMLIST = "form-list";
private static final String COMPONENT_WORKFLOWLIST = "workflow-list"; private static final String COMPONENT_WORKFLOWLIST = "workflow-list";
// wizard step names (that are referenced)
private static final String STEP_FORMS = "forms";
private static final String MATCH_DEFAULT = ".*"; private static final String MATCH_DEFAULT = ".*";
private static final String WEBAPP_DEFAULT = "ROOT"; private static final String WEBAPP_DEFAULT = "ROOT";
// Create From drop-down control selection values
private static final String CREATE_EMPTY = "empty";
private static final String CREATE_EXISTING = "existing";
protected final static Log logger = LogFactory.getLog(CreateWebsiteWizard.class); protected final static Log logger = LogFactory.getLog(CreateWebsiteWizard.class);
protected boolean editMode = false; protected boolean editMode = false;
@@ -94,6 +111,9 @@ public class CreateWebsiteWizard extends BaseWizardBean
protected String description; protected String description;
protected String webapp = WEBAPP_DEFAULT; protected String webapp = WEBAPP_DEFAULT;
protected List<String> deployTo; protected List<String> deployTo;
protected String createFrom = null;
protected String[] sourceWebProject = null;
protected ExpiringValueCache<List<UIListItem>> webProjectsList;
protected AVMService avmService; protected AVMService avmService;
protected WorkflowService workflowService; protected WorkflowService workflowService;
@@ -101,6 +121,10 @@ public class CreateWebsiteWizard extends BaseWizardBean
protected AVMLockingService avmLockingService; protected AVMLockingService avmLockingService;
protected FormsService formsService; protected FormsService formsService;
/** set true when an option in the Create From screen is changed - this is used as an
indicator to reload the wizard data model from the selected source web project */
private boolean createFromValueChanged;
/** datamodel for table of selected forms */ /** datamodel for table of selected forms */
protected DataModel formsDataModel = null; protected DataModel formsDataModel = null;
@@ -144,6 +168,16 @@ public class CreateWebsiteWizard extends BaseWizardBean
this.title = null; this.title = null;
this.description = null; this.description = null;
this.deployTo = null; this.deployTo = null;
clearFormsWorkflowsAndUsers();
this.createFrom = CREATE_EMPTY;
// requry existing web projects list every 10 seconds
this.webProjectsList = new ExpiringValueCache<List<UIListItem>>(1000L*10L);
this.sourceWebProject = null;
this.createFromValueChanged = false;
}
private void clearFormsWorkflowsAndUsers()
{
this.formsDataModel = null; this.formsDataModel = null;
this.forms = new ArrayList<FormWrapper>(8); this.forms = new ArrayList<FormWrapper>(8);
this.workflowsDataModel = null; this.workflowsDataModel = null;
@@ -200,15 +234,27 @@ public class CreateWebsiteWizard extends BaseWizardBean
outcome = wiz.finish(); outcome = wiz.finish();
if (outcome != null) if (outcome != null)
{ {
// if the user selected Create From existing web project we will branch from it
String branchStoreId = null;
if (CREATE_EXISTING.equals(this.createFrom) &&
(this.sourceWebProject != null && this.sourceWebProject.length != 0))
{
NodeRef sourceNodeRef = new NodeRef(this.sourceWebProject[0]);
branchStoreId = (String)this.nodeService.getProperty(sourceNodeRef, WCMAppModel.PROP_AVMSTORE);
}
// create the AVM staging store to represent the newly created location website // create the AVM staging store to represent the newly created location website
this.sandboxInfo = SandboxFactory.createStagingSandbox(avmStore, nodeRef); this.sandboxInfo = SandboxFactory.createStagingSandbox(avmStore, nodeRef, branchStoreId);
// create the default webapp folder under the hidden system folders // create the default webapp folder under the hidden system folders
final String stagingStore = AVMUtil.buildStagingStoreName(avmStore); if (branchStoreId == null)
final String stagingStoreRoot = AVMUtil.buildSandboxRootPath(stagingStore); {
this.avmService.createDirectory(stagingStoreRoot, webapp); final String stagingStore = AVMUtil.buildStagingStoreName(avmStore);
this.avmService.addAspect(AVMNodeConverter.ExtendAVMPath(stagingStoreRoot, webapp), final String stagingStoreRoot = AVMUtil.buildSandboxRootPath(stagingStore);
WCMAppModel.ASPECT_WEBAPP); this.avmService.createDirectory(stagingStoreRoot, webapp);
this.avmService.addAspect(AVMNodeConverter.ExtendAVMPath(stagingStoreRoot, webapp),
WCMAppModel.ASPECT_WEBAPP);
}
// set the property on the node to reference the root AVM store // set the property on the node to reference the root AVM store
this.nodeService.setProperty(nodeRef, WCMAppModel.PROP_AVMSTORE, avmStore); this.nodeService.setProperty(nodeRef, WCMAppModel.PROP_AVMSTORE, avmStore);
@@ -351,6 +397,132 @@ public class CreateWebsiteWizard extends BaseWizardBean
} }
} }
/**
* Restore the forms, templates and workflows from the model for a web project. Can also
* optional restore the basic node propetries and user details.
*
* @param nodeRef NodeRef to the web project to load model from
* @param loadProperties Load the basic properties such as name, title, DNS.
* @param loadUsers Load the user details.
*/
protected void loadWebProjectModel(NodeRef nodeRef, boolean loadProperties, boolean loadUsers)
{
// simple properties are optionally loaded
if (loadProperties)
{
Map<QName, Serializable> props = this.nodeService.getProperties(nodeRef);
this.name = (String)props.get(ContentModel.PROP_NAME);
this.title = (String)props.get(ContentModel.PROP_TITLE);
this.description = (String)props.get(ContentModel.PROP_DESCRIPTION);
this.dnsName = (String)props.get(WCMAppModel.PROP_AVMSTORE);
this.webapp = (String)props.get(WCMAppModel.PROP_DEFAULTWEBAPP);
this.deployTo = (List<String>)props.get(WCMAppModel.PROP_DEPLOYTO);
}
if (loadUsers)
{
InviteWebsiteUsersWizard wiz = getInviteUsersWizard();
wiz.reset();
// load the users assigned to the web project
List<ChildAssociationRef> userInfoRefs = this.nodeService.getChildAssocs(
nodeRef, WCMAppModel.ASSOC_WEBUSER, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef ref : userInfoRefs)
{
NodeRef userRef = ref.getChildRef();
String username = (String)this.nodeService.getProperty(userRef, WCMAppModel.PROP_WEBUSERNAME);
String userrole = (String)this.nodeService.getProperty(userRef, WCMAppModel.PROP_WEBUSERROLE);
wiz.addAuthorityWithRole(username, userrole);
}
}
// load the form templates
List<ChildAssociationRef> webFormRefs = this.nodeService.getChildAssocs(
nodeRef, WCMAppModel.ASSOC_WEBFORM, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef ref : webFormRefs)
{
NodeRef formRef = ref.getChildRef();
String name = (String)this.nodeService.getProperty(formRef, WCMAppModel.PROP_FORMNAME);
try
{
Form formImpl = this.formsService.getForm(name);
FormWrapper form = new FormWrapper(formImpl);
form.setTitle((String)this.nodeService.getProperty(formRef, ContentModel.PROP_TITLE));
form.setDescription((String)this.nodeService.getProperty(formRef, ContentModel.PROP_DESCRIPTION));
form.setOutputPathPattern((String)this.nodeService.getProperty(formRef, WCMAppModel.PROP_OUTPUT_PATH_PATTERN));
// the single workflow attached to the form
List<ChildAssociationRef> workflowRefs = this.nodeService.getChildAssocs(
formRef, WCMAppModel.ASSOC_WORKFLOWDEFAULTS, RegexQNamePattern.MATCH_ALL);
if (workflowRefs.size() == 1)
{
NodeRef wfRef = workflowRefs.get(0).getChildRef();
String wfName = (String)this.nodeService.getProperty(wfRef, WCMAppModel.PROP_WORKFLOW_NAME);
WorkflowDefinition wfDef = this.workflowService.getDefinitionByName(wfName);
if (wfDef != null)
{
WorkflowWrapper wfWrapper = new WorkflowWrapper(wfName, wfDef.getTitle(), wfDef.getDescription());
wfWrapper.setParams((Map<QName, Serializable>)AVMWorkflowUtil.deserializeWorkflowParams(wfRef));
if (wfDef.startTaskDefinition != null)
{
wfWrapper.setType(wfDef.startTaskDefinition.metadata.getName());
}
form.setWorkflow(wfWrapper);
}
}
// the templates attached to the form
List<ChildAssociationRef> templateRefs = this.nodeService.getChildAssocs(
formRef, WCMAppModel.ASSOC_WEBFORMTEMPLATE, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef tChildRef : templateRefs)
{
NodeRef templateRef = tChildRef.getChildRef();
String renderingEngineTemplateName = (String)this.nodeService.getProperty(
templateRef, WCMAppModel.PROP_BASE_RENDERING_ENGINE_TEMPLATE_NAME);
RenderingEngineTemplate ret = formImpl.getRenderingEngineTemplate(renderingEngineTemplateName);
if (ret != null)
{
String outputPathPattern = (String)this.nodeService.getProperty(
templateRef, WCMAppModel.PROP_OUTPUT_PATH_PATTERN);
form.addTemplate(new PresentationTemplate(ret, outputPathPattern));
}
}
this.forms.add(form);
}
catch (FormNotFoundException fnfe)
{
// ignore as we cannot do anything about a missing form
if (logger.isDebugEnabled())
logger.debug("Unable to find Web Form named '" + fnfe.getFormName() +
"' as referenced in web project: " + nodeRef.toString());
}
}
// load the workflows associated with the website
List<ChildAssociationRef> workflowRefs = this.nodeService.getChildAssocs(
nodeRef, WCMAppModel.ASSOC_WEBWORKFLOWDEFAULTS, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef wChildRef : workflowRefs)
{
NodeRef wfRef = wChildRef.getChildRef();
String wfName = (String)this.nodeService.getProperty(wfRef, WCMAppModel.PROP_WORKFLOW_NAME);
WorkflowDefinition wfDef = this.workflowService.getDefinitionByName(wfName);
if (wfDef != null)
{
WorkflowWrapper wfWrapper = new WorkflowWrapper(wfName, wfDef.getTitle(), wfDef.getDescription());
wfWrapper.setParams((Map<QName, Serializable>)AVMWorkflowUtil.deserializeWorkflowParams(wfRef));
wfWrapper.setFilenamePattern((String)this.nodeService.getProperty(wfRef,
WCMAppModel.PROP_FILENAMEPATTERN));
if (wfDef.startTaskDefinition != null)
{
wfWrapper.setType(wfDef.startTaskDefinition.metadata.getName());
}
this.workflows.add(wfWrapper);
}
}
}
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Service setters // Service setters
@@ -510,7 +682,120 @@ public class CreateWebsiteWizard extends BaseWizardBean
{ {
this.deployTo = deployTo; this.deployTo = deployTo;
} }
/**
* @return the create from selection value
*/
public String getCreateFrom()
{
return this.createFrom;
}
/**
* @param createFrom the create from selection value
*/
public void setCreateFrom(String createFrom)
{
if (createFrom != null && createFrom.equals(this.createFrom) == false)
{
this.createFromValueChanged = true;
}
this.createFrom = createFrom;
}
/**
* @return the existing Web Project to use
*/
public String[] getSourceWebProject()
{
return this.sourceWebProject;
}
/**
* @param existingWebProject the existing Web Project to set
*/
public void setSourceWebProject(String[] existingWebProject)
{
if (this.sourceWebProject != null && this.sourceWebProject.length != 0)
{
if ((existingWebProject == null || existingWebProject.length == 0) ||
(existingWebProject[0].equals(this.sourceWebProject[0]) == false))
{
this.createFromValueChanged = true;
}
}
else
{
if (existingWebProject != null || existingWebProject.length != 0)
{
this.createFromValueChanged = true;
}
}
this.sourceWebProject = existingWebProject;
}
/**
* @return name of the source web project selected - or null if none set
*/
public String getSourceWebProjectName()
{
String name = null;
if (CREATE_EXISTING.equals(this.createFrom) &&
(this.sourceWebProject != null && this.sourceWebProject.length != 0))
{
NodeRef sourceNodeRef = new NodeRef(this.sourceWebProject[0]);
name = (String)this.nodeService.getProperty(sourceNodeRef, ContentModel.PROP_NAME);
}
return name;
}
/**
* @return the existingWebProjects
*/
public List<UIListItem> getWebProjectsList()
{
List<UIListItem> webProjects = this.webProjectsList.get();
if (webProjects == null)
{
FacesContext fc = FacesContext.getCurrentInstance();
// construct the query to retrieve all web projects
String path = Application.getRootPath(fc) + "/" + Application.getWebsitesFolderName(fc) + "/*";
String query = "PATH:\"/" + path + "\" +TYPE:\"{" + NamespaceService.WCMAPP_MODEL_1_0_URI + "}webfolder\"";
ResultSet results = null;
try
{
// execute the query
results = searchService.query(Repository.getStoreRef(),
SearchService.LANGUAGE_LUCENE, query);
webProjects = new ArrayList<UIListItem>(results.length());
for (ResultSetRow row : results)
{
NodeRef ref = row.getNodeRef();
String name = (String)this.nodeService.getProperty(ref, ContentModel.PROP_NAME);
String desc = (String)this.nodeService.getProperty(ref, ContentModel.PROP_DESCRIPTION);
UIListItem item = new UIListItem();
item.setLabel(name);
item.setDescription(desc);
item.setValue(ref.toString());
item.setImage(WebResources.IMAGE_WEBPROJECT_32);
webProjects.add(item);
}
}
finally
{
if (results != null)
{
results.close();
}
}
this.webProjectsList.put(webProjects);
}
return webProjects;
}
/** /**
* @return the deploy to help text that gets displayed if the user * @return the deploy to help text that gets displayed if the user
* clicks the Help icon * clicks the Help icon
@@ -518,12 +803,44 @@ public class CreateWebsiteWizard extends BaseWizardBean
public String getDeployToHelp() public String getDeployToHelp()
{ {
String pattern = Application.getMessage(FacesContext.getCurrentInstance(), String pattern = Application.getMessage(FacesContext.getCurrentInstance(),
"deploy_to_help"); MSG_DEPLOY_TO_HELP);
String defaultAlfPort = Integer.toString(AVMUtil.getRemoteRMIRegistryPort()); String defaultAlfPort = Integer.toString(AVMUtil.getRemoteRMIRegistryPort());
String defaultReceiverPort = Integer.toString(AVMUtil.getRemoteReceiverRMIPort()); String defaultReceiverPort = Integer.toString(AVMUtil.getRemoteReceiverRMIPort());
return MessageFormat.format(pattern, new Object[] {defaultReceiverPort, defaultAlfPort}); return MessageFormat.format(pattern, new Object[] {defaultReceiverPort, defaultAlfPort});
} }
/**
* @see org.alfresco.web.bean.wizard.BaseWizardBean#next()
*/
@Override
public String next()
{
String stepName = Application.getWizardManager().getCurrentStepName();
if (STEP_FORMS.equals(stepName))
{
// if we have just entered the Forms page and the Create From page data has changed
// then we need to pre-populate the Forms etc. from the template web project
if (this.createFromValueChanged)
{
if (CREATE_EXISTING.equals(this.createFrom))
{
if (this.sourceWebProject != null && this.sourceWebProject.length != 0)
{
clearFormsWorkflowsAndUsers();
loadWebProjectModel(new NodeRef(this.sourceWebProject[0]), false, true);
}
}
else
{
clearFormsWorkflowsAndUsers();
}
this.createFromValueChanged = false;
}
}
return super.next();
}
/** /**
* @return summary text for the wizard * @return summary text for the wizard
*/ */
@@ -822,10 +1139,6 @@ public class CreateWebsiteWizard extends BaseWizardBean
} }
// ------------------------------------------------------------------------------
// Helper methods
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Inner classes // Inner classes

View File

@@ -34,14 +34,8 @@ import org.alfresco.model.ContentModel;
import org.alfresco.model.WCMAppModel; import org.alfresco.model.WCMAppModel;
import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.workflow.WorkflowDefinition;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.RegexQNamePattern; import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.AlfrescoNavigationHandler;
import org.alfresco.web.forms.Form;
import org.alfresco.web.forms.FormNotFoundException;
import org.alfresco.web.forms.FormsService;
import org.alfresco.web.forms.RenderingEngineTemplate;
/** /**
* Backing bean for the Edit Web Project wizard. * Backing bean for the Edit Web Project wizard.
@@ -69,109 +63,7 @@ public class EditWebsiteWizard extends CreateWebsiteWizard
throw new IllegalArgumentException("Edit Web Project wizard requires action node context."); throw new IllegalArgumentException("Edit Web Project wizard requires action node context.");
} }
loadWebProjectModel(websiteRef); loadWebProjectModel(websiteRef, true, false);
}
/**
* Restore the forms, templates and workflows from the model for this web project
*
* @param nodeRef NodeRef to the web project
*/
private void loadWebProjectModel(NodeRef nodeRef)
{
// simple properties
Map<QName, Serializable> props = this.nodeService.getProperties(nodeRef);
this.name = (String)props.get(ContentModel.PROP_NAME);
this.title = (String)props.get(ContentModel.PROP_TITLE);
this.description = (String)props.get(ContentModel.PROP_DESCRIPTION);
this.dnsName = (String)props.get(WCMAppModel.PROP_AVMSTORE);
this.webapp = (String)props.get(WCMAppModel.PROP_DEFAULTWEBAPP);
this.deployTo = (List<String>)props.get(WCMAppModel.PROP_DEPLOYTO);
// load the form templates
List<ChildAssociationRef> webFormRefs = this.nodeService.getChildAssocs(
nodeRef, WCMAppModel.ASSOC_WEBFORM, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef ref : webFormRefs)
{
NodeRef formRef = ref.getChildRef();
String name = (String)this.nodeService.getProperty(formRef, WCMAppModel.PROP_FORMNAME);
try
{
final Form formImpl = this.formsService.getForm(name);
FormWrapper form = new FormWrapper(formImpl);
form.setTitle((String)this.nodeService.getProperty(formRef, ContentModel.PROP_TITLE));
form.setDescription((String)this.nodeService.getProperty(formRef, ContentModel.PROP_DESCRIPTION));
form.setOutputPathPattern((String)this.nodeService.getProperty(formRef, WCMAppModel.PROP_OUTPUT_PATH_PATTERN));
// the single workflow attached to the form
List<ChildAssociationRef> workflowRefs = this.nodeService.getChildAssocs(
formRef, WCMAppModel.ASSOC_WORKFLOWDEFAULTS, RegexQNamePattern.MATCH_ALL);
if (workflowRefs.size() == 1)
{
NodeRef wfRef = workflowRefs.get(0).getChildRef();
String wfName = (String)this.nodeService.getProperty(wfRef, WCMAppModel.PROP_WORKFLOW_NAME);
WorkflowDefinition wfDef = this.workflowService.getDefinitionByName(wfName);
if (wfDef != null)
{
WorkflowWrapper wfWrapper = new WorkflowWrapper(wfName, wfDef.getTitle(), wfDef.getDescription());
wfWrapper.setParams((Map<QName, Serializable>)AVMWorkflowUtil.deserializeWorkflowParams(wfRef));
if (wfDef.startTaskDefinition != null)
{
wfWrapper.setType(wfDef.startTaskDefinition.metadata.getName());
}
form.setWorkflow(wfWrapper);
}
}
// the templates attached to the form
List<ChildAssociationRef> templateRefs = this.nodeService.getChildAssocs(
formRef, WCMAppModel.ASSOC_WEBFORMTEMPLATE, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef tChildRef : templateRefs)
{
final NodeRef templateRef = tChildRef.getChildRef();
final String renderingEngineTemplateName = (String)
this.nodeService.getProperty(templateRef,
WCMAppModel.PROP_BASE_RENDERING_ENGINE_TEMPLATE_NAME);
final RenderingEngineTemplate ret = formImpl.getRenderingEngineTemplate(renderingEngineTemplateName);
if (ret != null)
{
final String outputPathPattern = (String)
this.nodeService.getProperty(templateRef, WCMAppModel.PROP_OUTPUT_PATH_PATTERN);
form.addTemplate(new PresentationTemplate(ret, outputPathPattern));
}
}
this.forms.add(form);
}
catch (FormNotFoundException fnfe)
{
//ignore
logger.debug(fnfe.getMessage(), fnfe);
}
}
// load the workflows associated with the website
List<ChildAssociationRef> workflowRefs = this.nodeService.getChildAssocs(
nodeRef, WCMAppModel.ASSOC_WEBWORKFLOWDEFAULTS, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef wChildRef : workflowRefs)
{
NodeRef wfRef = wChildRef.getChildRef();
String wfName = (String)this.nodeService.getProperty(wfRef, WCMAppModel.PROP_WORKFLOW_NAME);
WorkflowDefinition wfDef = this.workflowService.getDefinitionByName(wfName);
if (wfDef != null)
{
WorkflowWrapper wfWrapper = new WorkflowWrapper(wfName, wfDef.getTitle(), wfDef.getDescription());
wfWrapper.setParams((Map<QName, Serializable>)AVMWorkflowUtil.deserializeWorkflowParams(wfRef));
wfWrapper.setFilenamePattern((String)this.nodeService.getProperty(wfRef,
WCMAppModel.PROP_FILENAMEPATTERN));
if (wfDef.startTaskDefinition != null)
{
wfWrapper.setType(wfDef.startTaskDefinition.metadata.getName());
}
this.workflows.add(wfWrapper);
}
}
} }
/** /**

View File

@@ -73,31 +73,44 @@ public final class SandboxFactory
* DNS: .dns.<store> = <path-to-webapps-root> * DNS: .dns.<store> = <path-to-webapps-root>
* Website Name: .website.name = website name * Website Name: .website.name = website name
* *
* @param storeId The store name to create the sandbox for * @param storeId The store name to create the sandbox for.
* @param webProjectNodeRef The noderef for the webproject. * @param webProjectNodeRef The noderef for the webproject.
* @param branchStoreId The ID of the store to branch this staging store from.
*/ */
public static SandboxInfo createStagingSandbox(final String storeId, public static SandboxInfo createStagingSandbox(String storeId,
final NodeRef webProjectNodeRef) NodeRef webProjectNodeRef,
String branchStoreId)
{ {
final ServiceRegistry services = Repository.getServiceRegistry(FacesContext.getCurrentInstance()); ServiceRegistry services = Repository.getServiceRegistry(FacesContext.getCurrentInstance());
final AVMService avmService = services.getAVMService(); AVMService avmService = services.getAVMService();
final PermissionService permissionService = services.getPermissionService(); PermissionService permissionService = services.getPermissionService();
// create the 'staging' store for the website // create the 'staging' store for the website
final String stagingStoreName = AVMUtil.buildStagingStoreName(storeId); String stagingStoreName = AVMUtil.buildStagingStoreName(storeId);
avmService.createStore(stagingStoreName); avmService.createStore(stagingStoreName);
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("Created staging sandbox store: " + stagingStoreName); logger.debug("Created staging sandbox store: " + stagingStoreName);
// create the system directories 'www' and 'avm_webapps' // we can either branch from an existing staging store or create a new structure
avmService.createDirectory(stagingStoreName + ":/", JNDIConstants.DIR_DEFAULT_WWW); if (branchStoreId != null)
{
String branchStorePath = AVMUtil.buildStagingStoreName(branchStoreId) + ":/" +
JNDIConstants.DIR_DEFAULT_WWW;
avmService.createBranch(-1, branchStorePath,
stagingStoreName + ":/", JNDIConstants.DIR_DEFAULT_WWW);
}
else
{
// create the system directories 'www' and 'avm_webapps'
avmService.createDirectory(stagingStoreName + ":/", JNDIConstants.DIR_DEFAULT_WWW);
avmService.createDirectory(AVMUtil.buildStoreRootPath(stagingStoreName),
JNDIConstants.DIR_DEFAULT_APPBASE);
}
// apply READ permissions for all users // apply READ permissions for all users
NodeRef dirRef = AVMNodeConverter.ToNodeRef(-1, AVMUtil.buildStoreRootPath(stagingStoreName)); NodeRef dirRef = AVMNodeConverter.ToNodeRef(-1, AVMUtil.buildStoreRootPath(stagingStoreName));
permissionService.setPermission(dirRef, PermissionService.ALL_AUTHORITIES, PermissionService.READ, true); permissionService.setPermission(dirRef, PermissionService.ALL_AUTHORITIES, PermissionService.READ, true);
avmService.createDirectory(AVMUtil.buildStoreRootPath(stagingStoreName),
JNDIConstants.DIR_DEFAULT_APPBASE);
// tag the store with the store type // tag the store with the store type
avmService.setStoreProperty(stagingStoreName, avmService.setStoreProperty(stagingStoreName,
SandboxConstants.PROP_SANDBOX_STAGING_MAIN, SandboxConstants.PROP_SANDBOX_STAGING_MAIN,
@@ -114,7 +127,7 @@ public final class SandboxFactory
// create the 'preview' store for the website // create the 'preview' store for the website
final String previewStoreName = AVMUtil.buildStagingPreviewStoreName(storeId); String previewStoreName = AVMUtil.buildStagingPreviewStoreName(storeId);
avmService.createStore(previewStoreName); avmService.createStore(previewStoreName);
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("Created staging preview sandbox store: " + previewStoreName + logger.debug("Created staging preview sandbox store: " + previewStoreName +
@@ -180,18 +193,18 @@ public final class SandboxFactory
* @param role Role permission for the user * @param role Role permission for the user
* @return Summary information regarding the sandbox * @return Summary information regarding the sandbox
*/ */
public static SandboxInfo createUserSandbox(final String storeId, public static SandboxInfo createUserSandbox(String storeId,
final List<String> managers, List<String> managers,
final String username, String username,
final String role) String role)
{ {
final ServiceRegistry services = Repository.getServiceRegistry(FacesContext.getCurrentInstance()); ServiceRegistry services = Repository.getServiceRegistry(FacesContext.getCurrentInstance());
final AVMService avmService = services.getAVMService(); AVMService avmService = services.getAVMService();
final PermissionService permissionService = services.getPermissionService(); PermissionService permissionService = services.getPermissionService();
// create the user 'main' store // create the user 'main' store
final String userStoreName = AVMUtil.buildUserMainStoreName(storeId, username); String userStoreName = AVMUtil.buildUserMainStoreName(storeId, username);
final String previewStoreName = AVMUtil.buildUserPreviewStoreName(storeId, username); String previewStoreName = AVMUtil.buildUserPreviewStoreName(storeId, username);
if (avmService.getStore(userStoreName) != null) if (avmService.getStore(userStoreName) != null)
{ {
@@ -203,7 +216,7 @@ public final class SandboxFactory
} }
avmService.createStore(userStoreName); avmService.createStore(userStoreName);
final String stagingStoreName = AVMUtil.buildStagingStoreName(storeId); String stagingStoreName = AVMUtil.buildStagingStoreName(storeId);
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("Created user sandbox store: " + userStoreName + logger.debug("Created user sandbox store: " + userStoreName +
" above staging store " + stagingStoreName); " above staging store " + stagingStoreName);

View File

@@ -370,52 +370,60 @@ public abstract class InviteUsersWizard extends BaseWizardBean
if (results != null) if (results != null)
{ {
String role = (String)rolePicker.getValue(); String role = (String)rolePicker.getValue();
if (role != null) if (role != null)
{ {
for (int i=0; i<results.length; i++) for (int i=0; i<results.length; i++)
{ {
String authority = results[i]; addAuthorityWithRole(results[i], role);
// only add if authority not already present in the list with same role
boolean foundExisting = false;
for (int n=0; n<this.userGroupRoles.size(); n++)
{
UserGroupRole wrapper = this.userGroupRoles.get(n);
if (authority.equals(wrapper.getAuthority()) &&
(!this.allowDuplicateAuthorities || role.equals(wrapper.getRole())))
{
foundExisting = true;
break;
}
}
if (foundExisting == false)
{
StringBuilder label = new StringBuilder(64);
// build a display label showing the user and their role for the space
AuthorityType authType = AuthorityType.getAuthorityType(authority);
if (authType == AuthorityType.GUEST || authType == AuthorityType.USER)
{
if (authType == AuthorityType.GUEST || this.personService.personExists(authority) == true)
{
// found a User authority
label.append(buildLabelForUserAuthorityRole(authority, role));
}
}
else
{
// found a group authority
label.append(buildLabelForGroupAuthorityRole(authority, role));
}
this.userGroupRoles.add(new UserGroupRole(authority, role, label.toString()));
}
} }
} }
} }
} }
/**
* Add an authority with the specified role to the list managed by this wizard.
*
* @param authority Authority to add (cannot be null)
* @param role Role for the authorities (cannot be null)
*/
public void addAuthorityWithRole(String authority, String role)
{
// only add if authority not already present in the list with same role
boolean foundExisting = false;
for (int n=0; n<this.userGroupRoles.size(); n++)
{
UserGroupRole wrapper = this.userGroupRoles.get(n);
if (authority.equals(wrapper.getAuthority()) &&
(!this.allowDuplicateAuthorities || role.equals(wrapper.getRole())))
{
foundExisting = true;
break;
}
}
if (foundExisting == false)
{
StringBuilder label = new StringBuilder(64);
// build a display label showing the user and their role for the space
AuthorityType authType = AuthorityType.getAuthorityType(authority);
if (authType == AuthorityType.GUEST || authType == AuthorityType.USER)
{
if (authType == AuthorityType.GUEST || this.personService.personExists(authority) == true)
{
// found a User authority
label.append(buildLabelForUserAuthorityRole(authority, role));
}
}
else
{
// found a group authority
label.append(buildLabelForGroupAuthorityRole(authority, role));
}
this.userGroupRoles.add(new UserGroupRole(authority, role, label.toString()));
}
}
/** /**
* Action handler called when the Remove button is pressed to remove a user+role * Action handler called when the Remove button is pressed to remove a user+role

View File

@@ -34,4 +34,5 @@ public class WebResources extends org.alfresco.web.ui.repo.WebResources
public static final String IMAGE_USERSANDBOX_32 = "/images/icons/user_sandbox_large.gif"; public static final String IMAGE_USERSANDBOX_32 = "/images/icons/user_sandbox_large.gif";
public static final String IMAGE_WEBFORM_32 = "/images/icons/webform_large.gif"; public static final String IMAGE_WEBFORM_32 = "/images/icons/webform_large.gif";
public static final String IMAGE_TEMPLATE_32 = "/images/icons/template_large.gif"; public static final String IMAGE_TEMPLATE_32 = "/images/icons/template_large.gif";
public static final String IMAGE_WEBPROJECT_32 = "/images/icons/website_large.gif";
} }

View File

@@ -0,0 +1,43 @@
<%--
* Copyright (C) 2005-2007 Alfresco Software Limited.
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program 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 General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<h:panelGrid columns="1">
<h:selectOneRadio id="create-from" value="#{WizardManager.bean.createFrom}" layout="pageDirection">
<f:selectItem itemValue="empty" itemLabel="#{msg.website_create_empty}" />
<f:selectItem itemValue="existing" itemLabel="#{msg.website_create_existing}:" />
</h:selectOneRadio>
<h:panelGroup id="grp-1">
<f:verbatim><div style="height:180px;*height:184px;margin-left:28px;width:90%;overflow:auto" class='selectListTable'></f:verbatim>
<a:selectList id="website-list" value="#{WizardManager.bean.sourceWebProject}" style="width:100%" itemStyleClass="selectListItem">
<a:listItems id="website-items" value="#{WizardManager.bean.webProjectsList}" />
</a:selectList>
<f:verbatim></div></f:verbatim>
</h:panelGroup>
</h:panelGrid>

View File

@@ -160,7 +160,7 @@
value="/images/icons/Help_icon.gif" style="cursor:help; padding-left: 4px; vertical-align: -4px;" value="/images/icons/Help_icon.gif" style="cursor:help; padding-left: 4px; vertical-align: -4px;"
onclick="javascript:toggleDeployToHelp()" /> onclick="javascript:toggleDeployToHelp()" />
<f:verbatim> <f:verbatim>
<div id="deploy-to-help" class="summary infoText statusInfoText" style="display: none; padding: 5px; width: 220px;"> <div id="deploy-to-help" class="summary infoText statusInfoText" style="display:none; padding:5px;">
</f:verbatim> </f:verbatim>
<h:outputText id="deploy-top-help-text" value="#{WizardManager.bean.deployToHelp}" escape="false" /> <h:outputText id="deploy-top-help-text" value="#{WizardManager.bean.deployToHelp}" escape="false" />
<f:verbatim> <f:verbatim>

View File

@@ -1,203 +1,194 @@
<!-- <!--
* Copyright (C) 2005-2007 Alfresco Software Limited. * Copyright (C) 2005-2007 Alfresco Software Limited.
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of * As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre * the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's * and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing * FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here: * the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing" * http://www.alfresco.com/legal/licensing"
--> -->
<jsp:root version="1.2" <jsp:root version="1.2"
xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:a="urn:jsptld:/WEB-INF/alfresco.tld" xmlns:a="urn:jsptld:/WEB-INF/alfresco.tld"
xmlns:f="http://java.sun.com/jsf/core" xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"> xmlns:h="http://java.sun.com/jsf/html">
<jsp:output doctype-root-element="html" <jsp:output doctype-root-element="html"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<jsp:directive.page language="java" buffer="32kb" contentType="text/html; charset=UTF-8"/> <jsp:directive.page language="java" buffer="32kb" contentType="text/html; charset=UTF-8"/>
<jsp:directive.page isELIgnored="false"/> <jsp:directive.page isELIgnored="false"/>
<script type="text/javascript"> <f:verbatim>
window.onload = function() { document.getElementById("wizard:finish-button").focus(); } <script type="text/javascript">
</script> window.onload = function() { document.getElementById("wizard:finish-button").focus(); }
</script>
</f:verbatim>
<h:panelGrid columns="1" cellpadding="2" style="padding-top:4px;padding-bottom:4px;" <!-- General properties -->
<h:panelGrid columns="1" cellpadding="2" style="padding-top:4px;padding-bottom:4px;"
width="100%" rowClasses="wizardSectionHeading"> width="100%" rowClasses="wizardSectionHeading">
<h:outputText value="&#160;#{msg.general_properties}" escape="false" /> <h:outputText value="&#160;#{msg.general_properties}" escape="false" />
</h:panelGrid> </h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%"> <h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%">
<a:selectList id="webproject-list" <a:selectList id="webproject-list" multiSelect="false" activeSelect="true"
multiSelect="false" style="width:100%;" itemStyle="vertical-align: top; margin-right: 5px;">
activeSelect="true" <a:listItem value="${WizardManager.bean.name}" image="/images/icons/website_large.gif">
style="width:100%;" <jsp:attribute name="label"><b>${WizardManager.bean.name}</b></jsp:attribute>
itemStyle="vertical-align: top; margin-right: 5px;"> <jsp:attribute name="description">
<a:listItem value="${WizardManager.bean.name}" <table width="100%" cellspacing="0" cellpadding="0" border="0">
image="/images/icons/website_large.gif"> <colgroup><col width="25%"/><col width="75%"/></colgroup>
<jsp:attribute name="label"><b>${WizardManager.bean.name}</b></jsp:attribute> <tbody>
<jsp:attribute name="description"> <c:if test="${!empty WizardManager.bean.sourceWebProjectName}">
<table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr><td>${msg.website_sourcewebsite}:</td><td> ${WizardManager.bean.sourceWebProjectName}</td></tr>
<colgroup><col width="25%"/><col width="75%"/></colgroup> </c:if>
<tbody> <tr><td>${msg.website_dnsname}:</td><td> ${WizardManager.bean.dnsName}</td></tr>
<tr><td>${msg.website_dnsname}:</td><td> ${WizardManager.bean.dnsName}</td></tr> <tr><td>${msg.website_webapp}:</td><td> ${WizardManager.bean.webapp}</td></tr>
<tr><td>${msg.website_webapp}:</td><td> ${WizardManager.bean.webapp}</td></tr> <tr><td>${msg.title}:</td><td> ${WizardManager.bean.title}</td></tr>
<tr><td>${msg.title}:</td><td> ${WizardManager.bean.title}</td></tr> <tr><td>${msg.description}:</td>
<tr><td>${msg.description}:</td> <td>
<td> <c:choose>
<c:choose> <c:when test="${empty WizardManager.bean.description}">
<c:when test="${empty WizardManager.bean.description}"> <span style="font-style:italic">${msg.description_not_set}</span>
<span style="font-style:italic">${msg.description_not_set}</span> </c:when>
</c:when> <c:otherwise>${WizardManager.bean.description}</c:otherwise>
<c:otherwise>${WizardManager.bean.description}</c:otherwise> </c:choose>
</c:choose> </td>
</td> </tr>
</tr> </tbody>
</tbody> </table>
</table> </jsp:attribute>
</jsp:attribute> </a:listItem>
</a:listItem> </a:selectList>
</a:selectList> </h:panelGrid>
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="2" style="padding-top:16px;padding-bottom:4px;" <!-- Web Content Forms -->
width="100%" rowClasses="wizardSectionHeading"> <h:panelGrid columns="1" cellpadding="2" style="padding-top:16px;padding-bottom:4px;"
<h:outputText value="&#160;#{msg.website_web_content_forms}" escape="false" /> width="100%" rowClasses="wizardSectionHeading">
</h:panelGrid> <h:outputText value="&#160;#{msg.website_web_content_forms}" escape="false" />
</h:panelGrid>
<h:panelGrid columns="2" cellpadding="3" cellspacing="3" border="0" width="100%"> <h:panelGrid columns="2" cellpadding="3" cellspacing="3" border="0" width="100%">
<h:outputText rendered="#{empty WizardManager.bean.forms}" <h:outputText rendered="#{empty WizardManager.bean.forms}" value="#{msg.no_selected_items}"/>
value="#{msg.no_selected_items}"/> <a:selectList id="form-list" multiSelect="false" activeSelect="true"
<a:selectList id="form-list" style="width:100%;" itemStyle="vertical-align: top; margin-right: 5px;">
multiSelect="false" <c:forEach items="${WizardManager.bean.forms}" var="r">
activeSelect="true" <a:listItem value="${r.name}" image="/images/icons/webform_large.gif">
style="width:100%;" <jsp:attribute name="label"><b>${r.name}</b></jsp:attribute>
itemStyle="vertical-align: top; margin-right: 5px;"> <jsp:attribute name="description">
<c:forEach items="${WizardManager.bean.forms}" var="r"> <table width="100%" cellspacing="0" cellpadding="0" border="0">
<a:listItem value="${r.name}" <colgroup><col width="25%"/><col width="75%"/></colgroup>
image="/images/icons/webform_large.gif"> <tbody>
<jsp:attribute name="label"><b>${r.name}</b></jsp:attribute> <tr><td>${msg.name}:</td><td> ${r.name}</td></tr>
<jsp:attribute name="description"> <tr><td>${msg.title}:</td><td> ${r.title}</td></tr>
<table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr><td>${msg.output_path_pattern}:</td><td> ${r.outputPathPattern}</td></tr>
<colgroup><col width="25%"/><col width="75%"/></colgroup> <tr><td>${msg.description}:</td>
<tbody> <td>
<tr><td>${msg.name}:</td><td> ${r.name}</td></tr> <c:choose>
<tr><td>${msg.title}:</td><td> ${r.title}</td></tr> <c:when test="${empty WizardManager.bean.description}">
<tr><td>${msg.output_path_pattern}:</td><td> ${r.outputPathPattern}</td></tr> <span style="font-style:italic">${msg.description_not_set}</span>
<tr><td>${msg.description}:</td> </c:when>
<td> <c:otherwise>${r.description}</c:otherwise>
<c:choose> </c:choose>
<c:when test="${empty WizardManager.bean.description}"> </td>
<span style="font-style:italic">${msg.description_not_set}</span> </tr>
</c:when> <tr><td>${msg.workflow}:</td>
<c:otherwise>${r.description}</c:otherwise> <td>
</c:choose> <c:choose>
</td> <c:when test="${r.workflow == null}">
</tr> <span style="font-style:italic">${msg.none}</span>
<tr><td>${msg.workflow}:</td> </c:when>
<td> <c:otherwise>${r.workflow.title}</c:otherwise>
<c:choose> </c:choose>
<c:when test="${r.workflow == null}"> </td>
<span style="font-style:italic">${msg.none}</span> </tr>
</c:when> </tbody>
<c:otherwise>${r.workflow.title}</c:otherwise> </table>
</c:choose> </jsp:attribute>
</td> </a:listItem>
</tr> </c:forEach>
</tbody> </a:selectList>
</table> </h:panelGrid>
</jsp:attribute>
</a:listItem>
</c:forEach>
</a:selectList>
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="2" style="padding-top:16px;padding-bottom:4px;" <!-- Selected Workflows -->
width="100%" rowClasses="wizardSectionHeading"> <h:panelGrid columns="1" cellpadding="2" style="padding-top:16px;padding-bottom:4px;"
<h:outputText value="&#160;#{msg.website_selected_workflows}" escape="false" /> width="100%" rowClasses="wizardSectionHeading">
</h:panelGrid> <h:outputText value="&#160;#{msg.website_selected_workflows}" escape="false" />
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%"> <h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%">
<h:outputText rendered="#{empty WizardManager.bean.workflows}" <h:outputText rendered="#{empty WizardManager.bean.workflows}"
value="#{msg.no_selected_items}"/> value="#{msg.no_selected_items}"/>
<a:selectList id="workflow-list" <a:selectList id="workflow-list" multiSelect="false" activeSelect="true"
multiSelect="false" style="width:100%;" itemStyle="vertical-align: top; margin-right: 5px;">
activeSelect="true" <c:forEach items="${WizardManager.bean.workflows}" var="r">
style="width:100%;" <a:listItem value="${r.name}" image="/images/icons/workflow_large.gif">
itemStyle="vertical-align: top; margin-right: 5px;"> <jsp:attribute name="label"><b>${r.title}</b></jsp:attribute>
<c:forEach items="${WizardManager.bean.workflows}" var="r"> <jsp:attribute name="description">
<a:listItem value="${r.name}" <table width="100%" cellspacing="0" cellpadding="0" border="0">
image="/images/icons/workflow_large.gif"> <colgroup><col width="25%"/><col width="75%"/></colgroup>
<jsp:attribute name="label"><b>${r.title}</b></jsp:attribute> <tbody>
<jsp:attribute name="description"> <tr><td>${msg.description}:</td>
<table width="100%" cellspacing="0" cellpadding="0" border="0"> <td>
<colgroup><col width="25%"/><col width="75%"/></colgroup> <c:choose>
<tbody> <c:when test="${empty r.description}">
<tr><td>${msg.description}:</td> <span style="font-style:italic">${msg.description_not_set}</span>
<td> </c:when>
<c:choose> <c:otherwise>${r.description}</c:otherwise>
<c:when test="${empty r.description}"> </c:choose>
<span style="font-style:italic">${msg.description_not_set}</span> </td>
</c:when> </tr>
<c:otherwise>${r.description}</c:otherwise> <tr><td>${msg.website_filename_pattern}:</td><td> ${r.filenamePattern}</td></tr>
</c:choose> </tbody>
</td> </table>
</tr> </jsp:attribute>
<tr><td>${msg.website_filename_pattern}:</td><td> ${r.filenamePattern}</td></tr> </a:listItem>
</tbody> </c:forEach>
</table> </a:selectList>
</jsp:attribute> </h:panelGrid>
</a:listItem>
</c:forEach>
</a:selectList>
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="2" style="padding-top:16px" <!-- Users and Roles -->
width="100%" rowClasses="wizardSectionHeading"> <h:panelGrid columns="1" cellpadding="2" style="padding-top:16px"
<h:outputText value="&#160;#{msg.create_website_summary_users}" escape="false" /> width="100%" rowClasses="wizardSectionHeading">
</h:panelGrid> <h:outputText value="&#160;#{msg.create_website_summary_users}" escape="false" />
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" <h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%" style="margin-left:12px">
width="100%" <a:selectList id="users-list" multiSelect="false" activeSelect="true"
style="margin-left:12px"> style="width:100%;" itemStyle="vertical-align: top; margin-right: 5px;">
<a:selectList id="users-list" <c:forEach items="${WizardManager.bean.invitedUsers}" var="r">
multiSelect="false" <a:listItem value="${r.name}" image="/images/icons/user_large.gif">
activeSelect="true" <jsp:attribute name="label"><b>${r.name}</b></jsp:attribute>
style="width:100%;" <jsp:attribute name="description">
itemStyle="vertical-align: top; margin-right: 5px;"> <table width="100%" cellspacing="0" cellpadding="0" border="0">
<c:forEach items="${WizardManager.bean.invitedUsers}" var="r"> <colgroup><col width="25%"/><col width="75%"/></colgroup>
<a:listItem value="${r.name}" <tbody>
image="/images/icons/user_large.gif"> <tr><td>${msg.roles}:</td><td> ${r.role}</td></tr>
<jsp:attribute name="label"><b>${r.name}</b></jsp:attribute> </tbody>
<jsp:attribute name="description"> </table>
<table width="100%" cellspacing="0" cellpadding="0" border="0"> </jsp:attribute>
<colgroup><col width="25%"/><col width="75%"/></colgroup> </a:listItem>
<tbody> </c:forEach>
<tr><td>${msg.roles}:</td><td> ${r.role}</td></tr> </a:selectList>
</tbody> </h:panelGrid>
</table>
</jsp:attribute> </jsp:root>
</a:listItem>
</c:forEach>
</a:selectList>
</h:panelGrid>
</jsp:root>