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 |
managerEMPTY_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, setupLoggerprivate 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 Serviceableservice in class ServiceableActionServiceExceptionpublic Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exceptionprivate List<String> _createSimpleContents(String contentTypeId, String lang, String workflowName, int initActionId, int editActionId, File uploadedFile) throws IOException, com.opensymphony.workflow.WorkflowException
IOExceptioncom.opensymphony.workflow.WorkflowExceptionprotected 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
AmetysRepositoryExceptioncom.opensymphony.workflow.WorkflowExceptionprivate Content _createSimpleContent(String cTypeId, String lang, String contentTitle, String workflowName, int actionId) throws com.opensymphony.workflow.WorkflowException
com.opensymphony.workflow.WorkflowExceptionprivate boolean _startsWithAlpha(String stringToTest)