4 Replies Latest reply: Aug 24, 2011 2:34 AM by JoeriADAM RSS

    Custom properties example

    JoeriADAM Community Member



      is it possible to provide us with an example on how to use the new 'Custom Properties' functionality in Drive 3.0 ?


      We are unable to find an example in the samples, and the documentation does not help us to get started.


      We need to be able to show (and edit) custom metadata from our database. Any help on which handlers we should use, example on how to make the data visible in the custom properties UI would be very helpful.


      Thanks in advance.

        • 1. Re: Custom properties example
          Gang_Z Community Member



               To use custom properties feature, there are four capabilities specific for it, they are Capabilities.READ_METADATA, WRITE_METADATA, CREATE_METADATA and REMOVE_METADATA,  enabling READ_METADATA will leads to a new context menu item named "custom properties" in Bridge, clicking it will pop-up custom properies UI, through it,you can one asset's version properties contained in the receipes you connector provided, the properies are name-values pairs, to create, remove and modify the properties, you should implement AddPropertiesHandler, RemovePropertie/Handle and a optional GetPropertyDefinitionHandler and open other there capabilities, currently only string, boolean and integer properties are supported, multi-value properites should be provided through java List class instances.


                Custom properties can not only be viewed through custom properties UI but also through inspector in Bridge, you can enable in in Bridge preferences.


                anything unclear, please post here

          • 2. Re: Custom properties example
            JoeriADAM Community Member



            thanks for the answer. Still not very clear though.


            In our solution we must display the properties available from our database, and the can only read and edit them. It is not needed to add and remove properties using Bridge.


            In this way I think we only need the READ_METADATA and WRITE_METADATA.


            Also, to make the available database properties visible in the UI, do we need to use the AddPropertiesHandler, or is this handler only needed when properties are added by the user with the Bridge UI?

            At first sight I would think we only need to use the updateRecipe.createPropertyData() when the datatype is "ASSET_PROPERTY".

            • 3. Re: Custom properties example
              Gang_Z Community Member

              Yes. in your case. I think READ_METADATA and WRITE_METADATA is enough.


              You have to implement AddPropertiesHandler since this handler is reponsible for creating properties and writing properites.


              You need to use updateReceipe.createVersionPropertyData when the dataType is "VERSION_PROPERTY", not "ASSET_PROPERTY", none-versioning asset's properties, like folder's properties, is not supported, only applicable for file's properties

              • 4. Re: Custom properties example
                JoeriADAM Community Member



                in the meantime I was able to get things rolling..