public class ImportSimpleContentsAction extends ServiceableAction
Modifier and Type | Field and Description |
---|---|
private static String[] |
_ALLOWED_EXTENSIONS |
private ContentTypeExtensionPoint |
_contentTypeEP |
private ContentTypesHelper |
_contentTypeHelper |
private ContentWorkflowHelper |
_contentWorkflowHelper |
private ContentTypeExtensionPoint |
_cTypeEP |
private JSONUtils |
_jsonUtils |
manager
EMPTY_MAP
Constructor and Description |
---|
ImportSimpleContentsAction() |
Modifier and Type | Method and Description |
---|---|
private Content |
_createSimpleContent(String cTypeId,
String lang,
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,
String defaultLang) |
protected Reader |
_getReader(InputStream in)
Get a reader on the data stream that detects the charset.
|
private boolean |
_startsWithAlpha(String stringToTest) |
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 ContentWorkflowHelper _contentWorkflowHelper
private ContentTypeExtensionPoint _cTypeEP
private ContentTypesHelper _contentTypeHelper
private JSONUtils _jsonUtils
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, String defaultLang) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
AmetysRepositoryException
com.opensymphony.workflow.WorkflowException
private Content _createSimpleContent(String cTypeId, String lang, String contentTitle, String workflowName, int actionId) throws com.opensymphony.workflow.WorkflowException
com.opensymphony.workflow.WorkflowException
private boolean _startsWithAlpha(String stringToTest)