You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/08/18 13:24:15 UTC

[GitHub] [camel] cherepnalkovski opened a new pull request #4097: CAMEL-15417 Add optional fileName parameter on copyDocument function

cherepnalkovski opened a new pull request #4097:
URL: https://github.com/apache/camel/pull/4097


   [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful subject line and body.
   [ ] If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   [ ] Run `mvn clean install -Psourcecheck` in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/master/CONTRIBUTING.md


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] cherepnalkovski commented on pull request #4097: CAMEL-15417 Add optional fileName parameter on copyDocument function

Posted by GitBox <gi...@apache.org>.
cherepnalkovski commented on pull request #4097:
URL: https://github.com/apache/camel/pull/4097#issuecomment-678139010


   @oscerd formating check is failed, but at my local environment it looks okey. There was only one error, one bracket in new row. This is fixed...
   I can't see another problem. 
   Can I see the problem on git? Any help ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] oscerd commented on a change in pull request #4097: CAMEL-15417 Add optional fileName parameter on copyDocument function

Posted by GitBox <gi...@apache.org>.
oscerd commented on a change in pull request #4097:
URL: https://github.com/apache/camel/pull/4097#discussion_r473768416



##########
File path: components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java
##########
@@ -345,7 +347,12 @@ public Document copyDocument(Exchange exchange) throws Exception {
         Folder destinationFolder = (Folder) getSessionFacade().getObjectById(destinationFolderId);
 
         Document document = (Document) getSessionFacade().getObjectById(objectId);
+        String newDocumentName = message.getHeader(PropertyIds.NAME, String.class);
+        if(!StringUtils.isEmpty(newDocumentName))

Review comment:
       The class from camel-util
   
   https://github.com/apache/camel/blob/master/core/camel-util/src/main/java/org/apache/camel/util/ObjectHelper.java#L183




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] davsclaus merged pull request #4097: CAMEL-15417 Add optional fileName parameter on copyDocument function

Posted by GitBox <gi...@apache.org>.
davsclaus merged pull request #4097:
URL: https://github.com/apache/camel/pull/4097


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] oscerd commented on pull request #4097: CAMEL-15417 Add optional fileName parameter on copyDocument function

Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #4097:
URL: https://github.com/apache/camel/pull/4097#issuecomment-677520068


   I don't think so


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] cherepnalkovski commented on pull request #4097: CAMEL-15417 Add optional fileName parameter on copyDocument function

Posted by GitBox <gi...@apache.org>.
cherepnalkovski commented on pull request #4097:
URL: https://github.com/apache/camel/pull/4097#issuecomment-677516572


   @oscerd is there any other way to update document name without updateProperties method ? 
   Now I am testing this with alfresco respository, and after providing new name for the new copy, the original document is also renamed :(


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] oscerd commented on a change in pull request #4097: CAMEL-15417 Add optional fileName parameter on copyDocument function

Posted by GitBox <gi...@apache.org>.
oscerd commented on a change in pull request #4097:
URL: https://github.com/apache/camel/pull/4097#discussion_r472195087



##########
File path: components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java
##########
@@ -345,7 +347,12 @@ public Document copyDocument(Exchange exchange) throws Exception {
         Folder destinationFolder = (Folder) getSessionFacade().getObjectById(destinationFolderId);
 
         Document document = (Document) getSessionFacade().getObjectById(objectId);
+        String newDocumentName = message.getHeader(PropertyIds.NAME, String.class);
+        if(!StringUtils.isEmpty(newDocumentName))

Review comment:
       Can you please use ObjectHelper instead of StringUtils?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] cherepnalkovski commented on a change in pull request #4097: CAMEL-15417 Add optional fileName parameter on copyDocument function

Posted by GitBox <gi...@apache.org>.
cherepnalkovski commented on a change in pull request #4097:
URL: https://github.com/apache/camel/pull/4097#discussion_r473761732



##########
File path: components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java
##########
@@ -345,7 +347,12 @@ public Document copyDocument(Exchange exchange) throws Exception {
         Folder destinationFolder = (Folder) getSessionFacade().getObjectById(destinationFolderId);
 
         Document document = (Document) getSessionFacade().getObjectById(objectId);
+        String newDocumentName = message.getHeader(PropertyIds.NAME, String.class);
+        if(!StringUtils.isEmpty(newDocumentName))

Review comment:
       There is no isEmpty or notNull or some similar method in ObjectHelper class.
   Am I looking at the right class ? ObjectHelper from camel-support module.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] oscerd commented on pull request #4097: CAMEL-15417 Add optional fileName parameter on copyDocument function

Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #4097:
URL: https://github.com/apache/camel/pull/4097#issuecomment-678160470


   I think we can merge this one @davsclaus 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org