You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Chris Hubick (JIRA)" <ji...@apache.org> on 2012/04/27 19:42:50 UTC

[jira] [Created] (CMIS-528) AbstractCmisObject.updateProperties newObjectId handing when refresh=true

Chris Hubick created CMIS-528:
---------------------------------

             Summary: AbstractCmisObject.updateProperties newObjectId handing when refresh=true
                 Key: CMIS-528
                 URL: https://issues.apache.org/jira/browse/CMIS-528
             Project: Chemistry
          Issue Type: Bug
          Components: opencmis-client
    Affects Versions: OpenCMIS 0.7.0
            Reporter: Chris Hubick
            Priority: Minor


There is a method: public ObjectId AbstractCmisObject.updateProperties(Map<String, ?> properties, boolean refresh) for which the Javadoc (on CmisObject) says:

@param refresh indicates if the object should be refresh after the update
@return the object id of the updated object (a repository might have created a new object)

One would logically expect then, if you supply refresh=true, that when the update operation upon this object has completed, that it will then contain those property values just set.  This would imply that if a new object id *is* returned for the object containing those updated values, that the AbstractCmisObject object will be updated to point to that new id?

That does not appear to be the case within the method implementation, which appears to refresh the object with the property values from the *old* object id.

Even if it's intended that the AbstractCmisObject *not* be pointed to the updated id, it would then seem prudent to check if a new id was issued, and skip the refresh call in that case?

Thanks.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CMIS-528) AbstractCmisObject.updateProperties newObjectId handing when refresh=true

Posted by "Chris Hubick (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263898#comment-13263898 ] 

Chris Hubick commented on CMIS-528:
-----------------------------------

Ok, that's fair. Some clarifications to this effect within the Javadoc for 'refresh' might be nice ;)  Much Thanks.
                
> AbstractCmisObject.updateProperties newObjectId handing when refresh=true
> -------------------------------------------------------------------------
>
>                 Key: CMIS-528
>                 URL: https://issues.apache.org/jira/browse/CMIS-528
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.7.0
>            Reporter: Chris Hubick
>            Priority: Minor
>
> There is a method: public ObjectId AbstractCmisObject.updateProperties(Map<String, ?> properties, boolean refresh) for which the Javadoc (on CmisObject) says:
> @param refresh indicates if the object should be refresh after the update
> @return the object id of the updated object (a repository might have created a new object)
> One would logically expect then, if you supply refresh=true, that when the update operation upon this object has completed, that it will then contain those property values just set.  This would imply that if a new object id *is* returned for the object containing those updated values, that the AbstractCmisObject object will be updated to point to that new id?
> That does not appear to be the case within the method implementation, which appears to refresh the object with the property values from the *old* object id.
> Even if it's intended that the AbstractCmisObject *not* be pointed to the updated id, it would then seem prudent to check if a new id was issued, and skip the refresh call in that case?
> Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CMIS-528) AbstractCmisObject.updateProperties newObjectId handing when refresh=true

Posted by "Chris Hubick (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263867#comment-13263867 ] 

Chris Hubick commented on CMIS-528:
-----------------------------------

It would appear that this issue also exists in other methods, such as DocumentImpl.setContentStream(ContentStream contentStream, boolean overwrite, boolean refresh).
                
> AbstractCmisObject.updateProperties newObjectId handing when refresh=true
> -------------------------------------------------------------------------
>
>                 Key: CMIS-528
>                 URL: https://issues.apache.org/jira/browse/CMIS-528
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.7.0
>            Reporter: Chris Hubick
>            Priority: Minor
>
> There is a method: public ObjectId AbstractCmisObject.updateProperties(Map<String, ?> properties, boolean refresh) for which the Javadoc (on CmisObject) says:
> @param refresh indicates if the object should be refresh after the update
> @return the object id of the updated object (a repository might have created a new object)
> One would logically expect then, if you supply refresh=true, that when the update operation upon this object has completed, that it will then contain those property values just set.  This would imply that if a new object id *is* returned for the object containing those updated values, that the AbstractCmisObject object will be updated to point to that new id?
> That does not appear to be the case within the method implementation, which appears to refresh the object with the property values from the *old* object id.
> Even if it's intended that the AbstractCmisObject *not* be pointed to the updated id, it would then seem prudent to check if a new id was issued, and skip the refresh call in that case?
> Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CMIS-528) AbstractCmisObject.updateProperties newObjectId handing when refresh=true

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263901#comment-13263901 ] 

Florian Müller commented on CMIS-528:
-------------------------------------

I will rework the JavaDoc.
                
> AbstractCmisObject.updateProperties newObjectId handing when refresh=true
> -------------------------------------------------------------------------
>
>                 Key: CMIS-528
>                 URL: https://issues.apache.org/jira/browse/CMIS-528
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.7.0
>            Reporter: Chris Hubick
>            Priority: Minor
>
> There is a method: public ObjectId AbstractCmisObject.updateProperties(Map<String, ?> properties, boolean refresh) for which the Javadoc (on CmisObject) says:
> @param refresh indicates if the object should be refresh after the update
> @return the object id of the updated object (a repository might have created a new object)
> One would logically expect then, if you supply refresh=true, that when the update operation upon this object has completed, that it will then contain those property values just set.  This would imply that if a new object id *is* returned for the object containing those updated values, that the AbstractCmisObject object will be updated to point to that new id?
> That does not appear to be the case within the method implementation, which appears to refresh the object with the property values from the *old* object id.
> Even if it's intended that the AbstractCmisObject *not* be pointed to the updated id, it would then seem prudent to check if a new id was issued, and skip the refresh call in that case?
> Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CMIS-528) AbstractCmisObject.updateProperties newObjectId handing when refresh=true

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263889#comment-13263889 ] 

Florian Müller commented on CMIS-528:
-------------------------------------

In order to be consistent, the object id of a CmisObject should never change. Once you have fetched an object, you can refresh it and you always get the current data of the object you have fetched in the first place.
That's a basic principle. I don't think there is a wrong or right here.
If you like to get the updated object, use the other updateProperties() method.

If the modification of a document triggered the creation of a new version, it very likely that the versioning properties (cmis:isLatestVersion, cmis:isMajorVersion, cmis:isLatestMajorVersion) of the origin document version have been changed.
Some repositories also change the cmis:lastModifiedBy and cmis:lastModificationDate properties of the origin document.
If the modification created a PWC, also the version series properties (cmis:isVersionSeriesCheckedOut, cmis:versionSeriesCheckedOutBy, cmis:versionSeriesCheckedOutId) are changed.
It's also very likely that allowable actions changed and some repositories are modifying the ACL and maybe the policies of the origin version in this case.
Some repositories maintain relationships only on the latest version. So, those might have changed too on the origin object.

There are good reasons to update the origin document.
                
> AbstractCmisObject.updateProperties newObjectId handing when refresh=true
> -------------------------------------------------------------------------
>
>                 Key: CMIS-528
>                 URL: https://issues.apache.org/jira/browse/CMIS-528
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.7.0
>            Reporter: Chris Hubick
>            Priority: Minor
>
> There is a method: public ObjectId AbstractCmisObject.updateProperties(Map<String, ?> properties, boolean refresh) for which the Javadoc (on CmisObject) says:
> @param refresh indicates if the object should be refresh after the update
> @return the object id of the updated object (a repository might have created a new object)
> One would logically expect then, if you supply refresh=true, that when the update operation upon this object has completed, that it will then contain those property values just set.  This would imply that if a new object id *is* returned for the object containing those updated values, that the AbstractCmisObject object will be updated to point to that new id?
> That does not appear to be the case within the method implementation, which appears to refresh the object with the property values from the *old* object id.
> Even if it's intended that the AbstractCmisObject *not* be pointed to the updated id, it would then seem prudent to check if a new id was issued, and skip the refresh call in that case?
> Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (CMIS-528) AbstractCmisObject.updateProperties newObjectId handing when refresh=true

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CMIS-528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Müller resolved CMIS-528.
---------------------------------

    Resolution: Fixed
      Assignee: Florian Müller
    
> AbstractCmisObject.updateProperties newObjectId handing when refresh=true
> -------------------------------------------------------------------------
>
>                 Key: CMIS-528
>                 URL: https://issues.apache.org/jira/browse/CMIS-528
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.7.0
>            Reporter: Chris Hubick
>            Assignee: Florian Müller
>            Priority: Minor
>
> There is a method: public ObjectId AbstractCmisObject.updateProperties(Map<String, ?> properties, boolean refresh) for which the Javadoc (on CmisObject) says:
> @param refresh indicates if the object should be refresh after the update
> @return the object id of the updated object (a repository might have created a new object)
> One would logically expect then, if you supply refresh=true, that when the update operation upon this object has completed, that it will then contain those property values just set.  This would imply that if a new object id *is* returned for the object containing those updated values, that the AbstractCmisObject object will be updated to point to that new id?
> That does not appear to be the case within the method implementation, which appears to refresh the object with the property values from the *old* object id.
> Even if it's intended that the AbstractCmisObject *not* be pointed to the updated id, it would then seem prudent to check if a new id was issued, and skip the refresh call in that case?
> Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira