. 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:
Kevin Roast
2006-09-11 16:57:01 +00:00
parent 55ab249512
commit 063430129e
13 changed files with 131 additions and 53 deletions

View File

@@ -75,6 +75,7 @@ public class Application
private static String savedSearchesFolderName;
private static String scriptsFolderName;
private static String guestHomeFolderName;
private static String websitesFolderName;
/**
* Private constructor to prevent instantiation of this class
@@ -441,6 +442,22 @@ public class Application
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
*
@@ -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
* @return The Guest Home folder name
@@ -844,10 +861,28 @@ public class Application
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
*
* @param context The Spring contexr
* @param context The Spring context
* @return The configured error page or null if the configuration is missing
*/
private static String getErrorPage(WebApplicationContext context)

View File

@@ -1560,7 +1560,7 @@ public class BrowseBean implements IContextListener
/**
* Perform navigation to the browse screen if it is not already the current View
*/
private void navigateBrowseScreen()
public void navigateBrowseScreen()
{
String outcome = null;

View File

@@ -334,12 +334,12 @@ public abstract class BaseContentWizard extends BaseWizardBean
protected void saveContent(File fileContent, String strContent) throws Exception
{
// get the node ref of the node that will contain the content
NodeRef containerNodeRef = this.getContainerNodeRef();
NodeRef containerNodeRef = getContainerNodeRef();
FileInfo fileInfo =
this.fileFolderService.create(containerNodeRef,
this.fileName,
Repository.resolveToQName(this.objectType));
FileInfo fileInfo = this.fileFolderService.create(
containerNodeRef,
this.fileName,
Repository.resolveToQName(this.objectType));
NodeRef fileNodeRef = fileInfo.getNodeRef();
// set the author aspect

View File

@@ -278,13 +278,12 @@ public abstract class BaseDialogBean implements IDialogBean
FacesContext.getCurrentInstance(), getErrorMessageId()),
exception.getMessage());
}
protected NodeRef getContainerNodeRef()
{
protected NodeRef getContainerNodeRef()
{
String nodeId = this.navigator.getCurrentNodeId();
return (nodeId == null
? this.nodeService.getRootNode(Repository.getStoreRef())
: new NodeRef(Repository.getStoreRef(), nodeId));
}
? this.nodeService.getRootNode(Repository.getStoreRef())
: new NodeRef(Repository.getStoreRef(), nodeId));
}
}

View File

@@ -16,41 +16,24 @@
*/
package org.alfresco.web.templating;
import java.util.ArrayList;
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 java.io.OutputStreamWriter;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.avm.*;
import org.alfresco.service.cmr.model.FileInfo;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentWriter;
import java.io.OutputStreamWriter;
import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.repo.avm.AVMContext;
import org.alfresco.service.cmr.avm.AVMExistsException;
import org.alfresco.service.cmr.avm.AVMNotFoundException;
import org.alfresco.service.cmr.avm.AVMService;
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.alfresco.repo.avm.*;
/**
* temporary home of generate and regenerate functionality until i figure