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

Allow removal of ContentParts from a ContentItem

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0-incubating
    • Component/s: Enhancer
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: