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 (Created) (JIRA)" <ji...@apache.org> on 2012/02/27 15:30:48 UTC

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

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 removeContentPart(int index)
   void removeContentPart(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

        

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

Posted by "Rupert Westenthaler (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STANBOL-513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rupert Westenthaler updated STANBOL-513:
----------------------------------------

    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.

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

This issue requests the following two new methods

   void removeContentPart(int index)
   void removeContentPart(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.

    
> 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

        

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

Posted by "Rupert Westenthaler (Resolved) (JIRA)" <ji...@apache.org>.
     [ 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

        

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

Posted by "Rupert Westenthaler (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217207#comment-13217207 ] 

Rupert Westenthaler commented on STANBOL-513:
---------------------------------------------

NOTE: The removal of ContentParts would reduce the index of parts with higher indexes by one. 

Current usages of the contentPart API indicate that this is not a problem because index based access is currently only used to iterate over ContentParts sorted by their insertion. (see ContentItemHelper for examples). 
                
> 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