Package org.ametys.plugins.contentio.in
Class ImportFileAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.plugins.contentio.in.ImportFileAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
- Direct Known Subclasses:
ImportPostBodyAction
Import contents from an uploaded file.
-
Field Summary
Modifier and TypeFieldDescriptionprotected I18nUtils
The i18n utils.protected ContentImportManager
The content import manager.protected SourceResolver
The source resolver.Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) protected void
sendMail
(boolean success, ContentImportManager.ImportResult importResult) Send an import report as e-mail.void
service
(ServiceManager serviceManager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_importManager
The content import manager. -
_sourceResolver
The source resolver. -
_i18nUtils
The i18n utils.
-
-
Constructor Details
-
ImportFileAction
public ImportFileAction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Throws:
Exception
-
sendMail
Send an import report as e-mail.- Parameters:
success
- true if the import was successful, false otherwise.importResult
- the import result.
-