Package org.saidone.restless.sdk
Class GrpcNodesApi
java.lang.Object
org.saidone.restless.sdk.GrpcNodesApi
- All Implemented Interfaces:
org.alfresco.core.handler.NodesApi,org.alfresco.core.handler.NodesApiClient
SDK 7.x NodesApi backed by the shared gRPC clients.
The caller owns the clients, tickets and channels.
-
Constructor Summary
ConstructorsConstructorDescriptionGrpcNodesApi(NodeServiceClient nodes, FileFolderServiceClient files) Creates a metadata-only adapter.GrpcNodesApi(NodeServiceClient nodes, FileFolderServiceClient files, ContentServiceClient contents) Uses the default Feign error mapping. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> Cancels a checkout without checking in working-copy changes.org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> Checks out a document through Alfresco's repository checkout service.org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> copyNode(String nodeId, org.alfresco.core.model.NodeBodyCopy body, List<String> include, List<String> fields) Copies a node to another folder and returns the projected copy with HTTP 201.org.springframework.http.ResponseEntity<org.alfresco.core.model.AssociationEntry> createAssociation(String argument0, org.alfresco.core.model.AssociationBody argument1, List<String> argument2) org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> createNode(String parentId, org.alfresco.core.model.NodeBodyCreate body, Boolean autoRename, Boolean majorVersion, Boolean versioningEnabled, List<String> include, List<String> fields) Creates a file or folder and returns its projected representation with HTTP 201.org.springframework.http.ResponseEntity<org.alfresco.core.model.ChildAssociationEntry> createSecondaryChildAssociation(String argument0, org.alfresco.core.model.ChildAssociationBody argument1, List<String> argument2) org.springframework.http.ResponseEntity<Void> deleteAssociation(String argument0, String argument1, String argument2) org.springframework.http.ResponseEntity<Void> deleteNode(String nodeId, Boolean permanent) Requests deletion once under the configured caller identity.org.springframework.http.ResponseEntity<Void> deleteSecondaryChildAssociation(String argument0, String argument1, String argument2) org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> Reads a node with default properties and aspects, or a requested projection.org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getNodeContent(String nodeId, Boolean attachment, OffsetDateTime ifModifiedSince, String range) Returns a single-use resource.org.springframework.http.ResponseEntity<org.alfresco.core.model.GetNodeSizeDetailsResponse> getNodeSizeDetails(String argument0, String argument1) org.springframework.http.ResponseEntity<org.alfresco.core.model.SizeDetailsRequestResultEntry> getNodeSizeDetailsRequest(String argument0) org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeChildAssociationPaging> listNodeChildren(String nodeId, Integer skipCount, Integer maxItems, List<String> orderBy, String where, List<String> include, String relativePath, Boolean includeSource, List<String> fields) Lists readable children with basic metadata and optional property or aspect expansion.org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeAssociationPaging> listParents(String argument0, String argument1, List<String> argument2, Integer argument3, Integer argument4, Boolean argument5, List<String> argument6) org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeChildAssociationPaging> listSecondaryChildren(String argument0, String argument1, List<String> argument2, Integer argument3, Integer argument4, Boolean argument5, List<String> argument6) org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeAssociationPaging> listSourceAssociations(String argument0, String argument1, List<String> argument2, Integer argument3, Integer argument4, List<String> argument5) org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeAssociationPaging> listTargetAssociations(String argument0, String argument1, List<String> argument2, Integer argument3, Integer argument4, List<String> argument5) org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> lockNode(String nodeId, org.alfresco.core.model.NodeBodyLock body, List<String> include, List<String> fields) Acquires a repository lock with the requested type, lifetime and expiration.org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> moveNode(String nodeId, org.alfresco.core.model.NodeBodyMove body, List<String> include, List<String> fields) Moves a node and optionally renames it in the same mutation.org.springframework.http.ResponseEntity<org.alfresco.core.model.DirectAccessUrlEntry> requestNodeDirectAccessUrl(String argument0, org.alfresco.core.model.DirectAccessUrlBodyCreate argument1) org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> Releases the repository lock if the caller is allowed to unlock it.org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> updateNode(String nodeId, org.alfresco.core.model.NodeBodyUpdate body, List<String> include, List<String> fields) Updates the name, type, properties or complete aspect list.org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> updateNodeContent(String nodeId, byte[] body, Boolean majorVersion, String comment, String name, List<String> include, List<String> fields) Replaces content through gRPC streaming.
-
Constructor Details
-
GrpcNodesApi
public GrpcNodesApi(NodeServiceClient nodes, FileFolderServiceClient files, ContentServiceClient contents) Uses the default Feign error mapping. -
GrpcNodesApi
Creates a metadata-only adapter. Supply the content client to enable content operations.
-
-
Method Details
-
getNode
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> getNode(String nodeId, List<String> include, String relativePath, List<String> fields) Reads a node with default properties and aspects, or a requested projection.- Specified by:
getNodein interfaceorg.alfresco.core.handler.NodesApi- Parameters:
nodeId- node ID or repository aliasinclude- optional metadata to expandrelativePath- optional path below the supplied nodefields- optional response field selection- Returns:
- the node entry with HTTP 200
-
listNodeChildren
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeChildAssociationPaging> listNodeChildren(String nodeId, Integer skipCount, Integer maxItems, List<String> orderBy, String where, List<String> include, String relativePath, Boolean includeSource, List<String> fields) Lists readable children with basic metadata and optional property or aspect expansion.- Specified by:
listNodeChildrenin interfaceorg.alfresco.core.handler.NodesApi- Parameters:
nodeId- folder ID or repository aliasskipCount- page offset, default zeromaxItems- page size, default 100orderBy- optional ascending or descending name orderwhere- optional supported file or folder predicateinclude- optional metadata to expandrelativePath- optional path below the supplied folderincludeSource- whether to include the resolved folderfields- optional response field selection- Returns:
- the child page with continuation and total metadata
-
deleteNode
Requests deletion once under the configured caller identity.- Specified by:
deleteNodein interfaceorg.alfresco.core.handler.NodesApi- Parameters:
nodeId- node ID or repository aliaspermanent- whether to bypass archiving a live node- Returns:
- HTTP 204 after deletion
-
createNode
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> createNode(String parentId, org.alfresco.core.model.NodeBodyCreate body, Boolean autoRename, Boolean majorVersion, Boolean versioningEnabled, List<String> include, List<String> fields) Creates a file or folder and returns its projected representation with HTTP 201. Versioning, association and permission options yield 501.- Specified by:
createNodein interfaceorg.alfresco.core.handler.NodesApi- Parameters:
parentId- target folder ID or repository aliasbody- node name, type, properties and aspectsautoRename- whether to choose an available name on conflictmajorVersion- unsupported when trueversioningEnabled- reserved for versioning support; pass nullinclude- optional response metadatafields- response field selection- Returns:
- the created node
-
updateNode
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> updateNode(String nodeId, org.alfresco.core.model.NodeBodyUpdate body, List<String> include, List<String> fields) Updates the name, type, properties or complete aspect list. A request without changes reads the current node.- Specified by:
updateNodein interfaceorg.alfresco.core.handler.NodesApi- Parameters:
nodeId- node ID or repository aliasbody- metadata, aspect and direct ACL changes to applyinclude- optional response metadatafields- response field selection- Returns:
- the resulting node with HTTP 200
-
copyNode
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> copyNode(String nodeId, org.alfresco.core.model.NodeBodyCopy body, List<String> include, List<String> fields) Copies a node to another folder and returns the projected copy with HTTP 201.- Specified by:
copyNodein interfaceorg.alfresco.core.handler.NodesApi- Parameters:
nodeId- source node ID or repository aliasbody- destination folder and optional copy nameinclude- optional response metadatafields- response field selection- Returns:
- the copied node
-
moveNode
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> moveNode(String nodeId, org.alfresco.core.model.NodeBodyMove body, List<String> include, List<String> fields) Moves a node and optionally renames it in the same mutation.- Specified by:
moveNodein interfaceorg.alfresco.core.handler.NodesApi- Parameters:
nodeId- source node ID or repository aliasbody- destination folder and optional new nameinclude- optional response metadatafields- response field selection- Returns:
- the moved node with HTTP 200
-
lockNode
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> lockNode(String nodeId, org.alfresco.core.model.NodeBodyLock body, List<String> include, List<String> fields) Acquires a repository lock with the requested type, lifetime and expiration.- Specified by:
lockNodein interfaceorg.alfresco.core.handler.NodesApi- Parameters:
nodeId- node to lockbody- lock optionsinclude- optional response metadatafields- response field selection- Returns:
- the resulting node with HTTP 200
-
unlockNode
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> unlockNode(String nodeId, List<String> include, List<String> fields) Releases the repository lock if the caller is allowed to unlock it.- Specified by:
unlockNodein interfaceorg.alfresco.core.handler.NodesApi- Parameters:
nodeId- node to unlockinclude- optional response metadatafields- response field selection- Returns:
- the unlocked node with HTTP 200
-
checkoutNode
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> checkoutNode(String nodeId, List<String> include, List<String> fields) Checks out a document through Alfresco's repository checkout service.- Specified by:
checkoutNodein interfaceorg.alfresco.core.handler.NodesApi- Parameters:
nodeId- document to check outinclude- optional working-copy metadatafields- response field selection- Returns:
- the working copy with HTTP 200
-
cancelCheckoutNode
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> cancelCheckoutNode(String nodeId, List<String> include, List<String> fields) Cancels a checkout without checking in working-copy changes.- Specified by:
cancelCheckoutNodein interfaceorg.alfresco.core.handler.NodesApi- Parameters:
nodeId- working-copy IDinclude- optional response metadatafields- response field selection- Returns:
- the original document with HTTP 200
-
getNodeContent
public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getNodeContent(String nodeId, Boolean attachment, OffsetDateTime ifModifiedSince, String range) Returns a single-use resource. The caller must close its input stream.- Specified by:
getNodeContentin interfaceorg.alfresco.core.handler.NodesApi
-
updateNodeContent
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeEntry> updateNodeContent(String nodeId, byte[] body, Boolean majorVersion, String comment, String name, List<String> include, List<String> fields) Replaces content through gRPC streaming. The SDK signature supplies an existing byte array.- Specified by:
updateNodeContentin interfaceorg.alfresco.core.handler.NodesApi
-
createAssociation
public org.springframework.http.ResponseEntity<org.alfresco.core.model.AssociationEntry> createAssociation(String argument0, org.alfresco.core.model.AssociationBody argument1, List<String> argument2) - Specified by:
createAssociationin interfaceorg.alfresco.core.handler.NodesApi- Throws:
feign.FeignException- with HTTP 501 when this operation is unavailable
-
createSecondaryChildAssociation
public org.springframework.http.ResponseEntity<org.alfresco.core.model.ChildAssociationEntry> createSecondaryChildAssociation(String argument0, org.alfresco.core.model.ChildAssociationBody argument1, List<String> argument2) - Specified by:
createSecondaryChildAssociationin interfaceorg.alfresco.core.handler.NodesApi- Throws:
feign.FeignException- with HTTP 501 when this operation is unavailable
-
deleteAssociation
public org.springframework.http.ResponseEntity<Void> deleteAssociation(String argument0, String argument1, String argument2) - Specified by:
deleteAssociationin interfaceorg.alfresco.core.handler.NodesApi- Throws:
feign.FeignException- with HTTP 501 when this operation is unavailable
-
deleteSecondaryChildAssociation
public org.springframework.http.ResponseEntity<Void> deleteSecondaryChildAssociation(String argument0, String argument1, String argument2) - Specified by:
deleteSecondaryChildAssociationin interfaceorg.alfresco.core.handler.NodesApi- Throws:
feign.FeignException- with HTTP 501 when this operation is unavailable
-
getNodeSizeDetails
public org.springframework.http.ResponseEntity<org.alfresco.core.model.GetNodeSizeDetailsResponse> getNodeSizeDetails(String argument0, String argument1) - Specified by:
getNodeSizeDetailsin interfaceorg.alfresco.core.handler.NodesApi- Throws:
feign.FeignException- with HTTP 501 when this operation is unavailable
-
getNodeSizeDetailsRequest
public org.springframework.http.ResponseEntity<org.alfresco.core.model.SizeDetailsRequestResultEntry> getNodeSizeDetailsRequest(String argument0) - Specified by:
getNodeSizeDetailsRequestin interfaceorg.alfresco.core.handler.NodesApi- Throws:
feign.FeignException- with HTTP 501 when this operation is unavailable
-
listParents
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeAssociationPaging> listParents(String argument0, String argument1, List<String> argument2, Integer argument3, Integer argument4, Boolean argument5, List<String> argument6) - Specified by:
listParentsin interfaceorg.alfresco.core.handler.NodesApi- Throws:
feign.FeignException- with HTTP 501 when this operation is unavailable
-
listSecondaryChildren
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeChildAssociationPaging> listSecondaryChildren(String argument0, String argument1, List<String> argument2, Integer argument3, Integer argument4, Boolean argument5, List<String> argument6) - Specified by:
listSecondaryChildrenin interfaceorg.alfresco.core.handler.NodesApi- Throws:
feign.FeignException- with HTTP 501 when this operation is unavailable
-
listSourceAssociations
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeAssociationPaging> listSourceAssociations(String argument0, String argument1, List<String> argument2, Integer argument3, Integer argument4, List<String> argument5) - Specified by:
listSourceAssociationsin interfaceorg.alfresco.core.handler.NodesApi- Throws:
feign.FeignException- with HTTP 501 when this operation is unavailable
-
listTargetAssociations
public org.springframework.http.ResponseEntity<org.alfresco.core.model.NodeAssociationPaging> listTargetAssociations(String argument0, String argument1, List<String> argument2, Integer argument3, Integer argument4, List<String> argument5) - Specified by:
listTargetAssociationsin interfaceorg.alfresco.core.handler.NodesApi- Throws:
feign.FeignException- with HTTP 501 when this operation is unavailable
-
requestNodeDirectAccessUrl
public org.springframework.http.ResponseEntity<org.alfresco.core.model.DirectAccessUrlEntry> requestNodeDirectAccessUrl(String argument0, org.alfresco.core.model.DirectAccessUrlBodyCreate argument1) - Specified by:
requestNodeDirectAccessUrlin interfaceorg.alfresco.core.handler.NodesApi- Throws:
feign.FeignException- with HTTP 501 when this operation is unavailable
-