Package org.saidone.unrest.mcp
Class NodeServiceTools
java.lang.Object
org.saidone.unrest.mcp.NodeServiceTools
MCP tools backed by NodeServiceClient.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeleteNode(String nodeRef) updateNode(String nodeRef, String name, String type, Map<String, PropertyInput> properties)
-
Constructor Details
-
NodeServiceTools
public NodeServiceTools()
-
-
Method Details
-
getNode
@Tool(name="alfresco_get_node", description="Reads a node (document or folder) from the Alfresco repository: name, type, aspects and all properties. Accepts a nodeRef, a node id or an alias (-root-, -my-, -shared-).") public String getNode(@ToolParam(description="Node to read: a nodeRef (workspace://SpacesStore/<id>), a bare node id, or one of the aliases -root- (Company Home), -my- (user home folder), -shared- (Shared Files)") String nodeRef) -
updateNode
@Tool(name="alfresco_update_node", description="Renames a node, changes its type and/or updates its metadata, then returns it. Only the given properties change; properties of aspects (e.g. cm:title) add the aspect automatically. The type change is applied before the properties, so properties of the new type can be set in the same call. Use alfresco_list_models to find the types and their properties.") public String updateNode(@ToolParam(description="Node to read: a nodeRef (workspace://SpacesStore/<id>), a bare node id, or one of the aliases -root- (Company Home), -my- (user home folder), -shared- (Shared Files)") String nodeRef, @ToolParam(description="New name, omit to keep the current one",required=false) String name, @ToolParam(description="New type, e.g. a custom document type; omit to keep the current one. A document must stay a cm:content subtype and a folder a cm:folder subtype",required=false) String type, @ToolParam(description="Optional typed metadata keyed by property name, e.g. {\"cm:title\":{\"multiValued\":false,\"values\":[{\"stringValue\":\"Budget\"}]}}. For lists use multiValued:true and zero or more typed values. Empty lists clear lists; {\"multiValued\":false,\"values\":[{\"nullValue\":true}]} clears a scalar. Omitted properties are unchanged. Each value has exactly one field: stringValue, integerValue, doubleValue, booleanValue, timestampMillis (epoch milliseconds), nodeRefValue or qnameValue. Types and cardinality must match the dictionary. Set the name with \'name\', never as cm:name.",required=false) Map<String, PropertyInput> properties) -
deleteNode
@Tool(name="alfresco_delete_node", description="Deletes a document or folder (with all its content) by moving it to the Alfresco trashcan, from where an administrator can restore it. A node already in the trashcan (archive://) is deleted permanently: use alfresco_purge_trashcan_node for that. Ask the user for confirmation before deleting.") public String deleteNode(@ToolParam(description="Node to read: a nodeRef (workspace://SpacesStore/<id>), a bare node id, or one of the aliases -root- (Company Home), -my- (user home folder), -shared- (Shared Files)") String nodeRef)
-