mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
DocList support for online edit (activated if Sharepoint amp installed) plus limited file- and folder-links support
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12672 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -26,6 +26,10 @@ package org.alfresco.repo.jscript;
|
||||
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.module.ModuleService;
|
||||
import org.alfresco.service.cmr.module.ModuleDetails;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Place for general and miscellenous utility functions not already found in generic JavaScript.
|
||||
@@ -89,4 +93,21 @@ public final class ScriptUtils extends BaseScopableProcessorExtension
|
||||
{
|
||||
return Boolean.parseBoolean(booleanString);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to check if a module is installed
|
||||
*
|
||||
* @param moduleName module name (e.g. "org.alfresco.module.foo")
|
||||
* @return boolean true if the module is currently installed
|
||||
*/
|
||||
public boolean moduleInstalled(String moduleName)
|
||||
{
|
||||
ModuleService moduleService = (ModuleService)this.services.getService(QName.createQName(NamespaceService.ALFRESCO_URI, "ModuleService"));
|
||||
if (moduleService != null)
|
||||
{
|
||||
ModuleDetails moduleDetail = (ModuleDetails)moduleService.getModule(moduleName);
|
||||
return (moduleDetail != null);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user