+1
On Wed, Aug 26, 2009 at 9:29 PM, Vincent Massol <vincent(a)massol.net> wrote:
Hi,
Right now we have an AttachmentParser in the Rendering module:
@ComponentRole
public interface AttachmentParser
{
/**
* Extract informations from attachment location string an return
an {@link Attachment}.
*
* @param attachmentLocation the location of the attachment in
string.
* @return the {@link Attachment} object.
*/
Attachment parse(String attachmentLocation);
}
and
/**
* Represents an attachment in a document.
*
* @version $Id: Attachment.java 18089 2009-03-27 15:51:39Z tmortagne $
* @since 1.7.1
*/
public interface Attachment extends Cloneable
{
/**
* @return the name of the document containing the attachment.
*/
String getDocumentName();
/**
* @return the name of the attachment.
*/
String getAttachmentName();
}
and
public class DefaultAttachement implements Attachment
...
This allows parsing attachment representations such as:
Space.Page(a)some.attachment
Since this is a generic notion I'd like to move this code to the xwiki-
bridge module.
Note 1: This is also especially relevant since we already have an
AttachmentName class in the bridge module.
Note 2: This will mean some changes in the Rendering API module too so
that it doesn't depend on the bridge module but that's normal and
technical
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs