Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Resize Action #322

Open
mfriesen opened this issue Jan 11, 2025 · 0 comments
Open

Add Resize Action #322

mfriesen opened this issue Jan 11, 2025 · 0 comments
Assignees
Milestone

Comments

@mfriesen
Copy link
Member

mfriesen commented Jan 11, 2025

  1. Add Action Type "RESIZE"
  2. Action Parameter of width, height that accept a value pixels or "auto" (missing or invalid parameter should return an error from the ActionsValidator
  3. The action is processed in the DocumentActionsProcessor and should be a new DocumentAction.

The resized image will be a new document and then a relationship between the original document and the new document is a "RENDITION" relationship type.

Similar code below can be used to generate the relationships.

String username = ApiAuthorization.getAuthorization().getUsername();

Collection documentAttributes0 =
dataDocumentIds.stream()
.flatMap(dataDocumentId -> new DocumentAttributeRecordBuilder().apply(documentId,
dataDocumentId, DocumentRelationshipType.DATASOURCE, null, username).stream())
.toList();

Collection documentAttributes1 = new DocumentAttributeRecordBuilder()
.apply(documentId, templateDocumentId, DocumentRelationshipType.TEMPLATE, null, username);

return Stream.concat(documentAttributes0.stream(), documentAttributes1.stream())
.filter(data -> !data.getDocumentId().equals(saveAsDocumentId)).toList();

@mfriesen mfriesen added this to the v1.16.1 milestone Jan 11, 2025
@mfriesen mfriesen modified the milestones: v1.16.1, v1.17.0 Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants