Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
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.