public class ImportSimpleContentsAction extends ServiceableAction
Modifier and Type | Field and Description |
---|---|
private static String[] |
_ALLOWED_EXTENSIONS |
private ContentTypeExtensionPoint |
_contentTypeEP |
private ContentWorkflowHelper |
_contentWorkflowHelper |
private AmetysObjectResolver |
_resolver |
private WorkflowProvider |
_workflowProvider |
manager
EMPTY_MAP
Constructor and Description |
---|
ImportSimpleContentsAction() |
Modifier and Type | Method and Description |
---|---|
private String |
_createSimpleContent(String cType,
String lang,
String contentName,
String contentTitle,
String workflowName,
int actionId) |
private List<String> |
_createSimpleContents(String contentTypeId,
String lang,
String workflowName,
int initActionId,
int editActionId,
File uploadedFile) |
private Map<String,Object> |
_editSimpleContent(Content content,
String[] metadataNames,
List<String> values,
int actionId) |
private Map<String,Object> |
_getInputsForCreation(String cType,
String lang,
String contentName,
String contentTitle) |
protected Reader |
_getReader(InputStream in)
Get a reader on the data stream that detects the charset.
|
Map |
act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters) |
void |
service(ServiceManager smanager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private static final String[] _ALLOWED_EXTENSIONS
private ContentTypeExtensionPoint _contentTypeEP
private WorkflowProvider _workflowProvider
private AmetysObjectResolver _resolver
private ContentWorkflowHelper _contentWorkflowHelper
public ImportSimpleContentsAction()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableAction
ServiceException
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exception
private List<String> _createSimpleContents(String contentTypeId, String lang, String workflowName, int initActionId, int editActionId, File uploadedFile) throws IOException, com.opensymphony.workflow.WorkflowException
IOException
com.opensymphony.workflow.WorkflowException
protected Reader _getReader(InputStream in)
in
- the data stream.private Map<String,Object> _editSimpleContent(Content content, String[] metadataNames, List<String> values, int actionId) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
AmetysRepositoryException
com.opensymphony.workflow.WorkflowException
private String _createSimpleContent(String cType, String lang, String contentName, String contentTitle, String workflowName, int actionId) throws com.opensymphony.workflow.WorkflowException
com.opensymphony.workflow.WorkflowException