-
Notifications
You must be signed in to change notification settings - Fork 90
MNT-24883 sourcefile name added in transform options #3379
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
base: master
Are you sure you want to change the base?
Conversation
repository/src/main/java/org/alfresco/repo/rendition2/RenditionDefinition2.java
Fixed
Show fixed
Hide fixed
repository/src/main/java/org/alfresco/repo/content/transform/LocalTransformImpl.java
Fixed
Show fixed
Hide fixed
repository/src/main/java/org/alfresco/repo/content/transform/LocalTransformImpl.java
Outdated
Show resolved
Hide resolved
@@ -155,10 +161,13 @@ protected void transformImpl(ContentReader reader, | |||
transformOptions.put(SOURCE_NODE_REF, sourceNodeRef.toString()); | |||
} | |||
|
|||
String filename = transformUtil.getFilenameFromNodeRef(sourceNodeRef, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use just nodeSerivce
// Build an array of option names and values and extract the timeout. | ||
long timeoutMs = 0; | ||
int nonOptions = transformOptions.containsKey(RenditionDefinition2.TIMEOUT) ? 1 : 0; | ||
int size = (transformOptions.size() - nonOptions + 3) * 2; | ||
int argAdditionalSize = StringUtils.isNotEmpty(filename) ? 4 : 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we add SOURCE_FILENAME
to transformOptions
to simplify it?
repository/src/main/java/org/alfresco/repo/content/transform/LocalTransformServiceRegistry.java
Fixed
Show fixed
Hide fixed
@@ -71,6 +72,7 @@ | |||
private Map<String, LocalTransform> localTransforms = new HashMap<>(); | |||
} | |||
|
|||
private NodeService nodeService; |
Check warning
Code scanning / PMD
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. Warning
@@ -205,6 +206,9 @@ | |||
@Mock | |||
private MimetypeMap mimetypeMap; | |||
|
|||
@Mock | |||
private NodeService nodeService; |
Check warning
Code scanning / PMD
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. Warning test
Sending source file name in transform options.
core aio pr: Alfresco/alfresco-transform-core#1081
tests branch : fix/MNT-24883-transformoptions-test
test cases successful pipeline : alfresco-community-repo/actions/runs/15527733234