. Rhino JavaScript integration checkpoint:

- Added a new action to the repository for executing JavaScript files
  - Added script action UI to rule framework, means we can execute a JavaScript file as part of a rule
  - Lucene search and Saved Search functionality added to default data-model for scripts
  - Added Scripts folder to Data Dictionary (created during bootstrap)
  - Created patch to add the Scripts folder to existing schemas
  - Added ScriptService to ServiceRegistry bean

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2740 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-05-03 12:01:21 +00:00
parent 86134ca56f
commit 0d67f51ed9
10 changed files with 309 additions and 39 deletions

View File

@@ -71,6 +71,7 @@ public class Application
private static String contentTemplatesFolderName;
private static String emailTemplatesFolderName;
private static String savedSearchesFolderName;
private static String scriptsFolderName;
/**
* Private constructor to prevent instantiation of this class
@@ -379,6 +380,23 @@ public class Application
return getSavedSearchesFolderName(FacesContextUtils.getRequiredWebApplicationContext(context));
}
/**
* @return Return the JavaScript scripts folder name
*/
public static String getScriptsFolderName(ServletContext context)
{
return getScriptsFolderName(WebApplicationContextUtils.getRequiredWebApplicationContext(context));
}
/**
* @return Return the JavaScript scripts folder name
*/
public static String getScriptsFolderName(FacesContext context)
{
return getScriptsFolderName(FacesContextUtils.getRequiredWebApplicationContext(context));
}
/**
* Set the language locale for the current user context
*
@@ -728,6 +746,24 @@ public class Application
return savedSearchesFolderName;
}
/**
* Returns the JavaScript scripts folder name
*
* @param context The spring context
* @return The scripts folder name
*/
private static String getScriptsFolderName(WebApplicationContext context)
{
if (scriptsFolderName == null)
{
ImporterBootstrap bootstrap = (ImporterBootstrap)context.getBean(BEAN_IMPORTER_BOOTSTRAP);
Properties configuration = bootstrap.getConfiguration();
scriptsFolderName = configuration.getProperty("spaces.scripts.childname");
}
return scriptsFolderName;
}
/**
* Retrieves the configured error page for the application
*