When I move a local folder from within explorer to Bridge, the checkinhandler is triggered. However, during that operation when I call identity.getParentId(), this returns null. I think this comes from the fact that I'me adding a new classification. Is there a way to found out which folder I'me adding, so that i can add this as a classification?
For the record, this doesn't occure when I move a folder in explorer, because than the createDirectoryHandler is called.
I have a similar problem in the IPromoteVersionHandler where I cannot retrieve the parent asset id from the RemoteVersionIdentity (because there is no getParentId method like in RemoteAssetIdentity).
"Guessing" the parent id from the local asset path may work in certain contexts like sample.basicftp where all asset ids are just simple paths.
In general however it may be non-trivial to map a local path to a remote asset id.
If you need to be able to identify a remote asset based on the local path only, then what is the use of having unique remote asset ids in the first place?
Ok, thanks for these information, we will try to find out if there is a easy way to provide the parent asset id in RemoteVersionIdentity and RemoteAssetIdentity during the handler request in the next dot release
Let me make it clear.
###In Adobe Drive 3, RemoteAssetIdentity provide getParentId methond to retrieve parent id, and Adobe Drive will try its best to provide parent id to connector handler. But sometimes, Adobe Drive can't get parent id info, such as your case -- move a local folder from within explorer to Bridge. When move a local folder(for ease of description, let give a name 'folderX', and assume that there is a file callde 'fileA' in that folder) from explorer to Bridge, CheckinHandler will be invoked. If you debug it, you will find the passed in parameter remoteAssetIdentity is about 'fileA', not about 'folderX'. But at that time, Adobe Drive don't know 'folderX' because it has not created in remote server yet. Therefore, the parent id in remoteAssetIdentity of 'fileA' is null. If you drag a file to bridge or check in a file, you will find the parent id is not null.
For RemoteVersionIdentity, Adobe Drive doesn't provide getParentId info to connector. Because version's parent may be different from asset's parent. It depends on the server implementation. If you have typical use scenario, could you share it with me? My understanding is that providing getAssetParentId will be useful for PromoteVersionHandler.
Adobe Drive don't know 'folderX' because it has not created in remote server yet.
But why isn't the ICreateDirectoryHandler called first when moving a local folder to Bridge? This handler is called when moving a local folder to Drive in Explorer but not in Bridge. Wouldn't this solve the issue?
My understanding is that providing getAssetParentId will be useful for PromoteVersionHandler.
Indeed, I think it would be really useful to have a getAssetParentId (or getAssetIdentity) in the RemoteVersionIdentity class, not only for PromoteVersionHandler but for all handlers where the request contains versions rather than assets.
In Adobe Drive 3, ICreateDirectoryHandler doesn't be invoked when moving a local folder to Bridge. Indeed, for connector handler called sequences, there are some differences between Bridge and Finder/Explorer. In future, we'll remove these differences.
For add getAssetParentId for RemoteVersionIdentity, when we decide to support it, we'll add for all handlers that use it, not just for PromoteVersionHandler.