mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed ALF-3085: UI Bootstrap - No root 'Web Projects' folder exists (is WCM enabled ?)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22904 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -438,7 +438,39 @@ public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
|
||||
throw new AccessDeniedException("Only content managers may delete webapp '"+webAppName+"' (web project: "+wpNodeRef+")");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.alfresco.wcm.webproject.WebProjectService#hasWebProjectsRoot()
|
||||
*/
|
||||
public boolean hasWebProjectsRoot()
|
||||
{
|
||||
boolean hasRoot = false;
|
||||
|
||||
// Get the root 'web projects' folder
|
||||
ResultSet resultSet = null;
|
||||
try
|
||||
{
|
||||
resultSet = this.searchService.query(WEBPROJECT_STORE, SearchService.LANGUAGE_LUCENE, "PATH:\""+getWebProjectsPath()+"\"");
|
||||
if (resultSet.length() == 1)
|
||||
{
|
||||
hasRoot = true;
|
||||
}
|
||||
else if (resultSet.length() > 1 && logger.isWarnEnabled())
|
||||
{
|
||||
logger.warn("More than one root 'Web Projects' folder exists");
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (resultSet != null)
|
||||
{
|
||||
resultSet.close();
|
||||
}
|
||||
}
|
||||
|
||||
return hasRoot;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the node reference that is the web projects root
|
||||
*
|
||||
|
Reference in New Issue
Block a user