mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. Checkpoint of WCM ui work (nothing to see here, move along please, move along)
- "Websites" folder created under root of Company Home during bootstrap - Bootstrap properties and getter helper added to import-export-context & web-client - Beginnings of the Create Website wizard - Action definition added for Create Website action - Beginings of the model for avm webfolders and associated sub-structures git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3763 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -782,6 +782,15 @@ space_type_note=Note: If you can only see one type of space then other space typ
|
|||||||
template_space=Template Space
|
template_space=Template Space
|
||||||
select_template=Select the template you want to use.
|
select_template=Select the template you want to use.
|
||||||
|
|
||||||
|
# Create Website Wizard messages
|
||||||
|
create_website=Create Website
|
||||||
|
create_website_title=Create Website Wizard
|
||||||
|
create_website_desc=This wizard helps you create a new website space.
|
||||||
|
website_details=Website Details
|
||||||
|
create_website_step1_title=Step One - Website Details
|
||||||
|
create_website_step1_desc=Enter the information about the website.
|
||||||
|
create_website_finish_instruction=To close this wizard and create your website space click Finish. To review or change your selections click Back.
|
||||||
|
|
||||||
# New User Wizard messages
|
# New User Wizard messages
|
||||||
new_user_title=New User Wizard
|
new_user_title=New User Wizard
|
||||||
new_user_title_edit=Edit User Wizard
|
new_user_title_edit=Edit User Wizard
|
||||||
|
@@ -354,6 +354,17 @@
|
|||||||
<action>wizard:createSpace</action>
|
<action>wizard:createSpace</action>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
|
<!-- Create Website Wizard -->
|
||||||
|
<action id="create_website_wizard">
|
||||||
|
<permissions>
|
||||||
|
<permission allow="true">CreateChildren</permission>
|
||||||
|
</permissions>
|
||||||
|
<!-- TODO: check for role and in Websites folder -->
|
||||||
|
<label-id>create_website</label-id>
|
||||||
|
<image>/images/icons/create_website.gif</image>
|
||||||
|
<action>wizard:createWebsite</action>
|
||||||
|
</action>
|
||||||
|
|
||||||
<!-- Manage Space Users -->
|
<!-- Manage Space Users -->
|
||||||
<action id="manage_space_users">
|
<action id="manage_space_users">
|
||||||
<permissions>
|
<permissions>
|
||||||
@@ -571,6 +582,7 @@
|
|||||||
<action-group id="browse_create_menu">
|
<action-group id="browse_create_menu">
|
||||||
<action idref="create_content" />
|
<action idref="create_content" />
|
||||||
<action idref="create_xml_content_type" />
|
<action idref="create_xml_content_type" />
|
||||||
|
<action idref="create_website_wizard" />
|
||||||
<action idref="create_space" />
|
<action idref="create_space" />
|
||||||
<action idref="create_space_wizard" />
|
<action idref="create_space_wizard" />
|
||||||
</action-group>
|
</action-group>
|
||||||
|
@@ -5,6 +5,24 @@
|
|||||||
|
|
||||||
<wizards>
|
<wizards>
|
||||||
|
|
||||||
|
<!-- Definition of a create website wizard -->
|
||||||
|
<wizard name="createWebsite" managed-bean="CreateWebsiteWizard"
|
||||||
|
title-id="create_website_title" description-id="create_website_desc"
|
||||||
|
icon="/images/icons/create_website_large.gif">
|
||||||
|
<step name="details" title-id="website_details" description-id="create_website_step1_desc">
|
||||||
|
<page path="/jsp/wcm/create-website-wizard/details.jsp"
|
||||||
|
title-id="create_website_step1_title"
|
||||||
|
description-id="create_website_step1_desc"
|
||||||
|
instruction-id="default_instruction" />
|
||||||
|
</step>
|
||||||
|
<step name="summary" title-id="summary" description-id="summary_step_description">
|
||||||
|
<page path="/jsp/wizard/summary.jsp"
|
||||||
|
title-id="summary"
|
||||||
|
description-id="summary_desc"
|
||||||
|
instruction-id="create_website_finish_instruction" />
|
||||||
|
</step>
|
||||||
|
</wizard>
|
||||||
|
|
||||||
<!-- Definition of an advanced space wizard -->
|
<!-- Definition of an advanced space wizard -->
|
||||||
<wizard name="createSpace" managed-bean="CreateSpaceWizard"
|
<wizard name="createSpace" managed-bean="CreateSpaceWizard"
|
||||||
title-id="create_space_title" description-id="create_space_desc"
|
title-id="create_space_title" description-id="create_space_desc"
|
||||||
|
@@ -75,6 +75,7 @@ public class Application
|
|||||||
private static String savedSearchesFolderName;
|
private static String savedSearchesFolderName;
|
||||||
private static String scriptsFolderName;
|
private static String scriptsFolderName;
|
||||||
private static String guestHomeFolderName;
|
private static String guestHomeFolderName;
|
||||||
|
private static String websitesFolderName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private constructor to prevent instantiation of this class
|
* Private constructor to prevent instantiation of this class
|
||||||
@@ -441,6 +442,22 @@ public class Application
|
|||||||
return getGuestHomeFolderName(FacesContextUtils.getRequiredWebApplicationContext(context));
|
return getGuestHomeFolderName(FacesContextUtils.getRequiredWebApplicationContext(context));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the Websites folder name
|
||||||
|
*/
|
||||||
|
public static String getWebsitesFolderName(ServletContext context)
|
||||||
|
{
|
||||||
|
return getWebsitesFolderName(WebApplicationContextUtils.getRequiredWebApplicationContext(context));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the Websites folder name
|
||||||
|
*/
|
||||||
|
public static String getWebsitesFolderName(FacesContext context)
|
||||||
|
{
|
||||||
|
return getWebsitesFolderName(FacesContextUtils.getRequiredWebApplicationContext(context));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the language locale for the current user context
|
* Set the language locale for the current user context
|
||||||
*
|
*
|
||||||
@@ -827,7 +844,7 @@ public class Application
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Guest Home folder name name
|
* Returns the Guest Home folder name
|
||||||
*
|
*
|
||||||
* @param context The spring context
|
* @param context The spring context
|
||||||
* @return The Guest Home folder name
|
* @return The Guest Home folder name
|
||||||
@@ -844,10 +861,28 @@ public class Application
|
|||||||
return guestHomeFolderName;
|
return guestHomeFolderName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the Websites folder name
|
||||||
|
*
|
||||||
|
* @param context The Spring context
|
||||||
|
* @return The Websites folder name
|
||||||
|
*/
|
||||||
|
private static String getWebsitesFolderName(WebApplicationContext context)
|
||||||
|
{
|
||||||
|
if (websitesFolderName == null)
|
||||||
|
{
|
||||||
|
ImporterBootstrap bootstrap = (ImporterBootstrap)context.getBean(BEAN_IMPORTER_BOOTSTRAP);
|
||||||
|
Properties configuration = bootstrap.getConfiguration();
|
||||||
|
websitesFolderName = configuration.getProperty("spaces.wcm.childname");
|
||||||
|
}
|
||||||
|
|
||||||
|
return websitesFolderName;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the configured error page for the application
|
* Retrieves the configured error page for the application
|
||||||
*
|
*
|
||||||
* @param context The Spring contexr
|
* @param context The Spring context
|
||||||
* @return The configured error page or null if the configuration is missing
|
* @return The configured error page or null if the configuration is missing
|
||||||
*/
|
*/
|
||||||
private static String getErrorPage(WebApplicationContext context)
|
private static String getErrorPage(WebApplicationContext context)
|
||||||
|
@@ -1560,7 +1560,7 @@ public class BrowseBean implements IContextListener
|
|||||||
/**
|
/**
|
||||||
* Perform navigation to the browse screen if it is not already the current View
|
* Perform navigation to the browse screen if it is not already the current View
|
||||||
*/
|
*/
|
||||||
private void navigateBrowseScreen()
|
public void navigateBrowseScreen()
|
||||||
{
|
{
|
||||||
String outcome = null;
|
String outcome = null;
|
||||||
|
|
||||||
|
@@ -334,12 +334,12 @@ public abstract class BaseContentWizard extends BaseWizardBean
|
|||||||
protected void saveContent(File fileContent, String strContent) throws Exception
|
protected void saveContent(File fileContent, String strContent) throws Exception
|
||||||
{
|
{
|
||||||
// get the node ref of the node that will contain the content
|
// get the node ref of the node that will contain the content
|
||||||
NodeRef containerNodeRef = this.getContainerNodeRef();
|
NodeRef containerNodeRef = getContainerNodeRef();
|
||||||
|
|
||||||
FileInfo fileInfo =
|
FileInfo fileInfo = this.fileFolderService.create(
|
||||||
this.fileFolderService.create(containerNodeRef,
|
containerNodeRef,
|
||||||
this.fileName,
|
this.fileName,
|
||||||
Repository.resolveToQName(this.objectType));
|
Repository.resolveToQName(this.objectType));
|
||||||
NodeRef fileNodeRef = fileInfo.getNodeRef();
|
NodeRef fileNodeRef = fileInfo.getNodeRef();
|
||||||
|
|
||||||
// set the author aspect
|
// set the author aspect
|
||||||
|
@@ -278,13 +278,12 @@ public abstract class BaseDialogBean implements IDialogBean
|
|||||||
FacesContext.getCurrentInstance(), getErrorMessageId()),
|
FacesContext.getCurrentInstance(), getErrorMessageId()),
|
||||||
exception.getMessage());
|
exception.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected NodeRef getContainerNodeRef()
|
protected NodeRef getContainerNodeRef()
|
||||||
{
|
{
|
||||||
String nodeId = this.navigator.getCurrentNodeId();
|
String nodeId = this.navigator.getCurrentNodeId();
|
||||||
return (nodeId == null
|
return (nodeId == null
|
||||||
? this.nodeService.getRootNode(Repository.getStoreRef())
|
? this.nodeService.getRootNode(Repository.getStoreRef())
|
||||||
: new NodeRef(Repository.getStoreRef(), nodeId));
|
: new NodeRef(Repository.getStoreRef(), nodeId));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -16,41 +16,24 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.web.templating;
|
package org.alfresco.web.templating;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.io.OutputStreamWriter;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.ResourceBundle;
|
|
||||||
|
|
||||||
import javax.faces.context.FacesContext;
|
|
||||||
import javax.faces.event.ValueChangeEvent;
|
|
||||||
import javax.faces.model.SelectItem;
|
|
||||||
|
|
||||||
import org.alfresco.config.Config;
|
|
||||||
import org.alfresco.config.ConfigElement;
|
|
||||||
import org.alfresco.config.ConfigService;
|
|
||||||
import org.alfresco.repo.content.MimetypeMap;
|
|
||||||
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
|
||||||
import org.alfresco.web.app.Application;
|
|
||||||
import org.alfresco.web.bean.repository.Node;
|
|
||||||
import org.alfresco.web.data.IDataContainer;
|
|
||||||
import org.alfresco.web.data.QuickSort;
|
|
||||||
import org.alfresco.web.templating.*;
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.service.cmr.avm.*;
|
import org.alfresco.repo.avm.AVMContext;
|
||||||
import org.alfresco.service.cmr.model.FileInfo;
|
import org.alfresco.service.cmr.avm.AVMExistsException;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.avm.AVMNotFoundException;
|
||||||
import org.alfresco.service.cmr.repository.ContentReader;
|
import org.alfresco.service.cmr.avm.AVMService;
|
||||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
|
||||||
import java.io.OutputStreamWriter;
|
|
||||||
import org.alfresco.web.app.servlet.FacesHelper;
|
|
||||||
import org.alfresco.service.cmr.model.FileFolderService;
|
import org.alfresco.service.cmr.model.FileFolderService;
|
||||||
import org.alfresco.service.cmr.repository.*;
|
import org.alfresco.service.cmr.model.FileInfo;
|
||||||
|
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||||
|
import org.alfresco.service.cmr.repository.ContentReader;
|
||||||
|
import org.alfresco.service.cmr.repository.ContentService;
|
||||||
|
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.alfresco.repo.avm.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* temporary home of generate and regenerate functionality until i figure
|
* temporary home of generate and regenerate functionality until i figure
|
||||||
|
@@ -504,9 +504,10 @@
|
|||||||
<value>#{DictionaryService}</value>
|
<value>#{DictionaryService}</value>
|
||||||
</managed-property>
|
</managed-property>
|
||||||
</managed-bean>
|
</managed-bean>
|
||||||
|
|
||||||
<managed-bean>
|
<managed-bean>
|
||||||
<description>
|
<description>
|
||||||
The bean that backs up the Create Content Wizard
|
The bean that backs up the Create XML Content Type Wizard
|
||||||
</description>
|
</description>
|
||||||
<managed-bean-name>CreateXmlContentTypeWizard</managed-bean-name>
|
<managed-bean-name>CreateXmlContentTypeWizard</managed-bean-name>
|
||||||
<managed-bean-class>org.alfresco.web.bean.content.CreateXmlContentTypeWizard</managed-bean-class>
|
<managed-bean-class>org.alfresco.web.bean.content.CreateXmlContentTypeWizard</managed-bean-class>
|
||||||
@@ -519,10 +520,6 @@
|
|||||||
<property-name>fileFolderService</property-name>
|
<property-name>fileFolderService</property-name>
|
||||||
<value>#{FileFolderService}</value>
|
<value>#{FileFolderService}</value>
|
||||||
</managed-property>
|
</managed-property>
|
||||||
<managed-property>
|
|
||||||
<property-name>searchService</property-name>
|
|
||||||
<value>#{SearchService}</value>
|
|
||||||
</managed-property>
|
|
||||||
<managed-property>
|
<managed-property>
|
||||||
<property-name>navigator</property-name>
|
<property-name>navigator</property-name>
|
||||||
<value>#{NavigationBean}</value>
|
<value>#{NavigationBean}</value>
|
||||||
@@ -535,9 +532,34 @@
|
|||||||
<property-name>contentService</property-name>
|
<property-name>contentService</property-name>
|
||||||
<value>#{ContentService}</value>
|
<value>#{ContentService}</value>
|
||||||
</managed-property>
|
</managed-property>
|
||||||
|
</managed-bean>
|
||||||
|
|
||||||
|
<managed-bean>
|
||||||
|
<description>
|
||||||
|
The bean that backs up the Create Website Wizard
|
||||||
|
</description>
|
||||||
|
<managed-bean-name>CreateWebsiteWizard</managed-bean-name>
|
||||||
|
<managed-bean-class>org.alfresco.web.bean.wcm.CreateWebsiteWizard</managed-bean-class>
|
||||||
|
<managed-bean-scope>session</managed-bean-scope>
|
||||||
<managed-property>
|
<managed-property>
|
||||||
<property-name>dictionaryService</property-name>
|
<property-name>nodeService</property-name>
|
||||||
<value>#{DictionaryService}</value>
|
<value>#{NodeService}</value>
|
||||||
|
</managed-property>
|
||||||
|
<managed-property>
|
||||||
|
<property-name>fileFolderService</property-name>
|
||||||
|
<value>#{FileFolderService}</value>
|
||||||
|
</managed-property>
|
||||||
|
<managed-property>
|
||||||
|
<property-name>navigator</property-name>
|
||||||
|
<value>#{NavigationBean}</value>
|
||||||
|
</managed-property>
|
||||||
|
<managed-property>
|
||||||
|
<property-name>searchService</property-name>
|
||||||
|
<value>#{SearchService}</value>
|
||||||
|
</managed-property>
|
||||||
|
<managed-property>
|
||||||
|
<property-name>avmService</property-name>
|
||||||
|
<value>#{AVMService}</value>
|
||||||
</managed-property>
|
</managed-property>
|
||||||
</managed-bean>
|
</managed-bean>
|
||||||
|
|
||||||
|
BIN
source/web/images/icons/create_website.gif
Normal file
BIN
source/web/images/icons/create_website.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
source/web/images/icons/create_website_large.gif
Normal file
BIN
source/web/images/icons/create_website_large.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
source/web/images/icons/website.gif
Normal file
BIN
source/web/images/icons/website.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
source/web/images/icons/website_large.gif
Normal file
BIN
source/web/images/icons/website_large.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Reference in New Issue
Block a user