mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Humongous merge. It is incomplete, however; faces-config-navigation.xml and ClientConfigElement
were both beyond me, and are just the raw conflict merge data. If Kev can't figure out how they should go together by tomorrow AM (for me) I'll dig back in. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4306 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -202,7 +202,7 @@ public interface ActionService
|
||||
* @param nodeRef the node reference
|
||||
* @param action the action
|
||||
*/
|
||||
@Auditable(key = Auditable.Key.ARG_1, parameters = {"nodeRef", "action" })
|
||||
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "action" })
|
||||
void saveAction(NodeRef nodeRef, Action action);
|
||||
|
||||
/**
|
||||
@@ -211,7 +211,7 @@ public interface ActionService
|
||||
* @param nodeRef the node reference
|
||||
* @return the list of actions
|
||||
*/
|
||||
@Auditable(key = Auditable.Key.ARG_1, parameters = {"nodeRef"})
|
||||
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"})
|
||||
List<Action> getActions(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
|
@@ -74,6 +74,7 @@ public interface CopyService
|
||||
* @param destinationAssocTypeQName the type of the new child assoc
|
||||
* @param destinationQName the qualified name of the child association from the
|
||||
* parent to the new node
|
||||
* @param copyChildren indicates that the children of the node should also be copied
|
||||
*
|
||||
* @return the new node reference
|
||||
*/
|
||||
@@ -85,10 +86,32 @@ public interface CopyService
|
||||
QName destinationQName,
|
||||
boolean copyChildren);
|
||||
|
||||
/**
|
||||
* @see CopyService#copy(NodeRef, NodeRef, QName, QName, boolean)
|
||||
*
|
||||
* Ensures the copy name is the same as the origional or is renamed to prevent duplicate names.
|
||||
*
|
||||
* @param sourceNodeRef the node reference used as the source of the copy
|
||||
* @param destinationParent the intended parent of the new node
|
||||
* @param destinationAssocTypeQName the type of the new child assoc
|
||||
* @param destinationQName the qualified name of the child association from the
|
||||
* parent to the new node
|
||||
* @param copyChildren indicates that the children of the node should also be copied
|
||||
*
|
||||
* @return the new node reference
|
||||
*/
|
||||
@Auditable(key = Auditable.Key.ARG_0, parameters = {"sourceNodeRef", "destinationParent", "destinationAssocTypeQName", "destinationQName", "copyChildren"})
|
||||
public NodeRef copyAndRename(
|
||||
NodeRef sourceNodeRef,
|
||||
NodeRef destinationParent,
|
||||
QName destinationAssocTypeQName,
|
||||
QName destinationQName,
|
||||
boolean copyChildren);
|
||||
|
||||
/**
|
||||
* By default children of the source node are not copied.
|
||||
*
|
||||
* @see NodeCopyService#copy(NodeRef, NodeRef, QName, QName, boolean)
|
||||
* @see CopyService#copy(NodeRef, NodeRef, QName, QName, boolean)
|
||||
*
|
||||
* @param sourceNodeRef the node reference used as the source of the copy
|
||||
* @param destinationParent the intended parent of the new node
|
||||
@@ -142,4 +165,5 @@ public interface CopyService
|
||||
*/
|
||||
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"})
|
||||
public List<NodeRef> getCopies(NodeRef nodeRef);
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.alfresco.service.cmr.repository;
|
||||
|
||||
/**
|
||||
* Interface to represent a server side script implementation
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*
|
||||
*/
|
||||
public interface ScriptImplementation
|
||||
{
|
||||
/**
|
||||
* Returns the name of the script
|
||||
*
|
||||
* @return the name of the script
|
||||
*/
|
||||
String getScriptName();
|
||||
}
|
@@ -83,4 +83,12 @@ public interface ScriptService
|
||||
@Auditable(parameters = {"script", "model"})
|
||||
public Object executeScriptString(String script, Map<String, Object> model)
|
||||
throws ScriptException;
|
||||
|
||||
/**
|
||||
* Registers a script implementation with the script service
|
||||
*
|
||||
* @param script the script implementation
|
||||
*/
|
||||
@Auditable(parameters = {"script"})
|
||||
public void registerScript(ScriptImplementation script);
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ import freemarker.ext.dom.NodeModel;
|
||||
*
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public final class TemplateNode implements Serializable
|
||||
public class TemplateNode implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1234390333739034171L;
|
||||
|
||||
@@ -78,7 +78,7 @@ public final class TemplateNode implements Serializable
|
||||
private Map<String, List<TemplateNode>> assocs = null;
|
||||
|
||||
/** Cached values */
|
||||
private NodeRef nodeRef;
|
||||
protected NodeRef nodeRef;
|
||||
private String name;
|
||||
private QName type;
|
||||
private String path;
|
||||
@@ -87,15 +87,16 @@ public final class TemplateNode implements Serializable
|
||||
private QNameMap<String, Object> properties;
|
||||
private List<String> permissions = null;
|
||||
private boolean propsRetrieved = false;
|
||||
private ServiceRegistry services = null;
|
||||
protected ServiceRegistry services = null;
|
||||
private Boolean isDocument = null;
|
||||
private Boolean isContainer = null;
|
||||
private String displayPath = null;
|
||||
private String mimetype = null;
|
||||
private Long size = null;
|
||||
private TemplateImageResolver imageResolver = null;
|
||||
protected TemplateImageResolver imageResolver = null;
|
||||
private TemplateNode parent = null;
|
||||
private ChildAssociationRef primaryParentAssoc = null;
|
||||
private Boolean isCategory = null;
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
@@ -360,6 +361,20 @@ public final class TemplateNode implements Serializable
|
||||
return locked;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the node is a Category instance
|
||||
*/
|
||||
public boolean getIsCategory()
|
||||
{
|
||||
if (isCategory == null)
|
||||
{
|
||||
DictionaryService dd = this.services.getDictionaryService();
|
||||
isCategory = Boolean.valueOf(dd.isSubClass(getType(), ContentModel.TYPE_CATEGORY));
|
||||
}
|
||||
|
||||
return isCategory.booleanValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the parent node
|
||||
*/
|
||||
@@ -482,17 +497,17 @@ public final class TemplateNode implements Serializable
|
||||
*/
|
||||
public NodeModel getXmlNodeModel()
|
||||
{
|
||||
try
|
||||
{
|
||||
return NodeModel.parse(new InputSource(new StringReader(getContent())));
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug(err.getMessage(), err);
|
||||
|
||||
return null;
|
||||
}
|
||||
try
|
||||
{
|
||||
return NodeModel.parse(new InputSource(new StringReader(getContent())));
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug(err.getMessage(), err);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -661,14 +676,18 @@ public final class TemplateNode implements Serializable
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Audit API
|
||||
|
||||
|
||||
/**
|
||||
* @return a list of AuditInfo objects describing the Audit Trail for this node instance
|
||||
*/
|
||||
public List<AuditInfo> getAuditTrail()
|
||||
{
|
||||
return this.services.getAuditService().getAuditTrail(this.nodeRef);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Misc helpers
|
||||
|
||||
|
Reference in New Issue
Block a user