3 Replies Latest reply: Feb 27, 2008 6:19 PM by 478333 RSS

    Updating folder categories

      Hi all!
      is there a way to update categories values of a folder with either
      fileManager.updateDocument (currently it gives me ORACLE.FDK.OperationError:ORACLE.FDK.UnexpectedItemType)

      fileManager.updateFolder (I cant seem to find the correct Attributes configuration to pass to updateFolder to update categories like I do for a document with updateDocument.

      Is this possible with OCS Version

        • 1. Re: Updating folder categories
          Im using fileManager.getItem( ocsIdOfFolder, requestAttr); to try to obtain the instance ID
          of the category I want to update.

          The only category related Attribute Ive been able to retrieve on a folder is
          • 2. Re: Updating folder categories
            I am also trying to write metadata with no luck. I actually tried to do this 6 months ago and gave up. I have been asked to revisit this task, now that we are updated to

            FileManager.updateFolder() is the method you want to use. I have been trying to set the following five attributes:

            Attributes.ALLOWED_CATEGORIES (long[] array of category ids)
            Attributes.REQUIRED_CATEGORIES (long[] array of category ids)
            Attributes.CONFIGURATION_FINAL (Boolean)
            Attributes.CONFIGURATION_ENABLED (Boolean)
            Attributes.ALLOW_ALL_CATEGORIES (Boolean)

            I got some sample code at one point that demonstrated how to write metadata attributes to folders. I copied the methodology faithfully, but it never worked. I always get an InvalidAttribute error when calling updateFolder(). We'll see if a revisit to my code uncovers an error, of if the API is just broken. It is noteworthy that there are no updateFolder() calls in the webstarterII application, where one would hope to find an example.

            That is all I can tell you for now. If I make any progress, I'll let you know.
            • 3. Re: Updating folder categories
              Re: Create Folder with a category definition?

              The code I got from Oracle was called xmltool. Looking for it now.