Support for sub-types of folder in site.getContainer() - to allow for specialised types of component folder and backwards compatibility with existing models such as forum.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9306 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2008-05-29 11:37:42 +00:00
parent e09ae51c1d
commit 14660ea397
5 changed files with 56 additions and 10 deletions

View File

@@ -465,7 +465,7 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
/* (non-Javadoc)
* @see org.alfresco.repo.site.SiteService#getContainer(java.lang.String)
*/
public NodeRef getContainer(String shortName, String componentId)
public NodeRef getContainer(String shortName, String componentId, QName folderType)
{
if (componentId == null || componentId.length() ==0)
{
@@ -489,7 +489,7 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
catch(FileNotFoundException e)
{
// create component folder
FileInfo fileInfo = fileFolderService.create(siteNodeRef, componentId, ContentModel.TYPE_FOLDER);
FileInfo fileInfo = fileFolderService.create(siteNodeRef, componentId, folderType == null ? ContentModel.TYPE_FOLDER : folderType);
containerNodeRef = fileInfo.getNodeRef();
}