You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Rupert Westenthaler (Resolved) (JIRA)" <ji...@apache.org> on 2012/02/29 19:51:57 UTC

[jira] [Resolved] (STANBOL-513) Allow removal of ContentParts from a ContentItem

     [ https://issues.apache.org/jira/browse/STANBOL-513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rupert Westenthaler resolved STANBOL-513.
-----------------------------------------

    Resolution: Fixed

Implemented with revision #1294763
                
> Allow removal of ContentParts from a ContentItem
> ------------------------------------------------
>
>                 Key: STANBOL-513
>                 URL: https://issues.apache.org/jira/browse/STANBOL-513
>             Project: Stanbol
>          Issue Type: Improvement
>          Components: Enhancer
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>            Priority: Minor
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira