mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4252 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4294 . svn revert root\common\common.xml svn resolved root\projects\repository\config\alfresco\script-services-context.xml git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4634 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,24 @@ import org.alfresco.service.namespace.QNamePattern;
|
||||
|
||||
/**
|
||||
* Interface for public and internal <b>node</b> and <b>store</b> operations.
|
||||
* <p>
|
||||
* Amongst other things, this service must enforce the unique name check as mandated
|
||||
* by the <b>duplicate</b> entity in the model.
|
||||
* <pre></code>
|
||||
* <type name="cm:folder">
|
||||
* ...
|
||||
* <associations>
|
||||
* <child-association name="cm:contains">
|
||||
* ...
|
||||
* <duplicate>false</duplicate>
|
||||
* </child-association>
|
||||
* </associations>
|
||||
* </type>
|
||||
* </code></pre>
|
||||
* When duplicates are not allowed, and the <b>cm:name</b> property of a node changes,
|
||||
* then the {@link org.alfresco.service.cmr.repository.DuplicateChildNodeNameException}
|
||||
* exception must be thrown. Client code can catch this exception and deal with it
|
||||
* appropriately.
|
||||
*
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
|
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.alfresco.service.cmr.repository;
|
||||
|
||||
import java.io.Reader;
|
||||
|
||||
/**
|
||||
* Interface encapsulating the location of a script and provding access to it.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*
|
||||
*/
|
||||
public interface ScriptLocation
|
||||
{
|
||||
/**
|
||||
* Returns a reader to the contents of the script
|
||||
*
|
||||
* @return the reader
|
||||
*/
|
||||
Reader getReader();
|
||||
}
|
@@ -70,6 +70,20 @@ public interface ScriptService
|
||||
public Object executeScript(NodeRef scriptRef, QName contentProp, Map<String, Object> model)
|
||||
throws ScriptException;
|
||||
|
||||
/**
|
||||
* Process a script against the supplied data model.
|
||||
*
|
||||
* @param scriptLocation object representing the script location
|
||||
* @param model Object model to process script against
|
||||
*
|
||||
* @return output of the script (may be null or any other valid wrapped JavaScript object)
|
||||
*
|
||||
* @throws ScriptException
|
||||
*/
|
||||
@Auditable(parameters = {"scriptLocation", "model"})
|
||||
public Object executeScript(ScriptLocation scriptLocation, Map<String, Object> model)
|
||||
throws ScriptException;
|
||||
|
||||
/**
|
||||
* Process a script against the supplied data model.
|
||||
*
|
||||
|
Reference in New Issue
Block a user