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
public class ImportFileAction extends ServiceableAction
Import contents from an uploaded file.
-
-
Field Summary
Fields Modifier and Type Field Description protected I18nUtils
_i18nUtils
The i18n utils.protected ContentImportManager
_importManager
The content import manager.protected SourceResolver
_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
Constructors Constructor Description ImportFileAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map
act(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 Detail
-
_importManager
protected ContentImportManager _importManager
The content import manager.
-
_sourceResolver
protected SourceResolver _sourceResolver
The source resolver.
-
_i18nUtils
protected I18nUtils _i18nUtils
The i18n utils.
-
-
Constructor Detail
-
ImportFileAction
public ImportFileAction()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- 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
protected void sendMail(boolean success, ContentImportManager.ImportResult importResult)
Send an import report as e-mail.- Parameters:
success
- true if the import was successful, false otherwise.importResult
- the import result.
-
-