Uploaded image for project: 'Stanbol (Retired)'
  1. Stanbol (Retired)
  2. STANBOL-513

Allow removal of ContentParts from a ContentItem

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.9.0-incubating
    • Enhancer
    • None

    Description

      The Java API of the ContentItem does currently not allow to remove ContentParts.

      This issue requests the following two new methods

      void removePart(int index)
      void removePart(UriRef uri)

      Both methods throw the following RuntimeExceptions:

      • NoSuchPartException if no part with the parsed index/uri exists
      • IllegalArgumentException if <code>null</code> is parsed as uri or clazz.
      • IllegalStateException if the request tries to remove the main content part of the ContentItem.

      NOTE: the remove methods do NOT return a boolean value but rather throws one of the above RuntimeExceptions if the requested part was NOT be removed. This is consitent with the addConentPart(..) methods.

      Attachments

        Activity

          People

            rwesten Rupert Westenthaler
            rwesten Rupert Westenthaler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: