protected static class CopyContentMetadataComponent.CopyAttachmentsHandler extends ContentHandlerProxy
| Modifier and Type | Field and Description |
|---|---|
protected Content |
_baseContent
base content
|
protected CopyReport |
_copyReport
copy report
|
protected Logger |
_logger
logger
|
protected AmetysObjectResolver |
_resolver
Ametys object resolver
|
protected ModifiableContent |
_targetContent
target content
|
| Modifier | Constructor and Description |
|---|---|
protected |
CopyAttachmentsHandler(ContentHandler contentHandler,
Content baseContent,
ModifiableContent targetContent,
CopyReport copyReport,
AmetysObjectResolver resolver,
Logger logger)
Ctor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
_copyAttachment(AmetysObject baseResource,
String relPath)
Copy an attachment
|
protected void |
_copyIfAttachment(String href)
Copy the linked resource to the new content if it is an attachment.
|
void |
startElement(String uri,
String loc,
String raw,
Attributes attrs) |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startPrefixMappingprotected Content _baseContent
protected ModifiableContent _targetContent
protected CopyReport _copyReport
protected AmetysObjectResolver _resolver
protected CopyAttachmentsHandler(ContentHandler contentHandler, Content baseContent, ModifiableContent targetContent, CopyReport copyReport, AmetysObjectResolver resolver, Logger logger)
contentHandler - The content handler to delegate to.baseContent - The content to copytargetContent - The content where to copycopyReport - The report of the copyresolver - The ametys object resolverlogger - A logger to log informationspublic void startElement(String uri, String loc, String raw, Attributes attrs) throws SAXException
startElement in interface ContentHandlerstartElement in class ContentHandlerProxySAXExceptionprotected void _copyIfAttachment(String href)
href - link href attributeprotected void _copyAttachment(AmetysObject baseResource, String relPath)
baseResource - The resource to copyrelPath - The path where to copy