public class UploadedLinksHTMLEditionHandler extends AbstractHTMLEditionHandler implements Initializable
| Modifier and Type | Field and Description |
|---|---|
private Context |
_cocoonContext |
private Set<String> |
_storedFileExtensions |
private boolean |
_storeFileLinks |
private boolean |
_tagToIgnore |
private CurrentUserProvider |
_userProvider |
_contentHandler, _context, _lexicalHandler, _manager| Constructor and Description |
|---|
UploadedLinksHTMLEditionHandler() |
| Modifier and Type | Method and Description |
|---|---|
private void |
_copyLinkAttributes(Attributes attrs,
AttributesImpl newAttrs) |
void |
contextualize(Context context) |
void |
endElement(String uri,
String loc,
String raw) |
void |
initialize() |
protected boolean |
processLink(String uri,
String loc,
String raw,
Attributes attrs)
Process a link tag.
|
void |
service(ServiceManager serviceManager) |
void |
startDocument() |
void |
startElement(String uri,
String loc,
String raw,
Attributes attrs) |
protected Resource |
storeAttachment(String initialFileName,
InputStream is,
String mimeType,
Date lastModified)
Store a file as attachment.
|
protected boolean |
storeExternalFile(String fileName)
Test if the external file is to be stored as a local resource.
|
characters, comment, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, setLexicalHandler, skippedEntity, startCDATA, startDTD, startEntity, startPrefixMappingenableLogging, getLogger, setupLogger, setupLogger, setupLoggerprivate CurrentUserProvider _userProvider
private Context _cocoonContext
private boolean _tagToIgnore
private boolean _storeFileLinks
private Set<String> _storedFileExtensions
public UploadedLinksHTMLEditionHandler()
public void contextualize(Context context) throws ContextException
contextualize in interface Contextualizablecontextualize in class AbstractHTMLEditionHandlerContextExceptionpublic void service(ServiceManager serviceManager) throws ServiceException
service in interface Serviceableservice in class AbstractHTMLEditionHandlerServiceExceptionpublic void initialize() throws Exception
initialize in interface InitializableExceptionpublic void startDocument() throws SAXException
startDocument in interface ContentHandlerstartDocument in class AbstractHTMLEditionHandlerSAXExceptionpublic void startElement(String uri, String loc, String raw, Attributes attrs) throws SAXException
startElement in interface ContentHandlerstartElement in class AbstractHTMLEditionHandlerSAXExceptionpublic void endElement(String uri, String loc, String raw) throws SAXException
endElement in interface ContentHandlerendElement in class AbstractHTMLEditionHandlerSAXExceptionprotected boolean processLink(String uri, String loc, String raw, Attributes attrs)
uri - the namespace URI.loc - the local name (without prefix).raw - the qualified name (with prefix).attrs - the element attributes.protected boolean storeExternalFile(String fileName)
fileName - the file name.protected Resource storeAttachment(String initialFileName, InputStream is, String mimeType, Date lastModified)
initialFileName - the initial file name.is - an input stream on the file.mimeType - the file mime type.lastModified - the last modification date.private void _copyLinkAttributes(Attributes attrs, AttributesImpl newAttrs)