public class TextAction extends AbstractPageAction
AbstractPageAction.TerminalResource
Modifier and Type | Field and Description |
---|---|
static String |
ATTACHMENT_FILE_NAME_PATTERN |
protected static String |
BASE_USER_URL_PATTERN |
String |
CKEditor |
Integer |
CKEditorFuncNum |
String |
content |
static String |
CONTENT_ENCODING |
static String |
copyright |
String |
description |
String[] |
downloadable |
static String |
EMPTY_STRING |
String |
id |
String |
langCode |
static org.slf4j.Logger |
logger |
String |
message |
static String |
PERMISSION_EDIT |
protected static String |
PORTOFINO_ATTACHMENT_PATTERN |
protected static String |
PORTOFINO_HREF_PATTERN |
String[] |
selection |
static String |
TEXT_FILE_NAME_PATTERN |
TextConfiguration |
textConfiguration |
File |
textFile |
String |
title |
FileBean |
upload |
boolean |
uploadDownloadable |
String |
viewAttachmentUrl |
CONF_FORM_PREFIX, DEFAULT_LAYOUT_CONTAINER, PAGE_CONFIGURATION_FIELDS, PAGE_CONFIGURATION_FIELDS_NO_DETAIL, pageConfigurationForm, pageInstance, pageTemplate, PORTOFINO_PAGEACTION_EXCEPTION, portofinoConfiguration, returnUrl, script, serverInfo, templates
context
Constructor and Description |
---|
TextAction() |
acceptsPathParameter, consumePathFragment, createTemplateSelectionProvider, forwardTo, forwardToPageActionError, forwardToPageActionNotConfigured, getActionAPIPath, getActionPath, getButtons, getConfiguration, getDefaultReturnUrl, getEmbeddedPageActions, getOgnlContext, getPage, getPageConfigurationForm, getPageDescription, getPageInstance, getPages, getPageTemplate, getParent, getPortofinoConfiguration, getResourcePath, getReturnUrl, getScript, getSubResource, initEmbeddedPageActions, isMultipartRequest, prepareConfigurationForms, prepareScript, readPageConfigurationFromRequest, saveConfiguration, setPageConfigurationForm, setPageInstance, setPageTemplate, setReturnUrl, setScript, updatePageConfiguration, updateScript, updateTemplate, validatePageConfiguration
getContext, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContext
setContext
public static final String copyright
public static final String CONTENT_ENCODING
public static final String EMPTY_STRING
public static final String TEXT_FILE_NAME_PATTERN
public static final String ATTACHMENT_FILE_NAME_PATTERN
public static final String PERMISSION_EDIT
public String title
public String description
public String content
public String[] selection
public String[] downloadable
public boolean uploadDownloadable
public FileBean upload
public String CKEditor
public Integer CKEditorFuncNum
public String langCode
public String id
public String viewAttachmentUrl
public String message
public TextConfiguration textConfiguration
public File textFile
public static final org.slf4j.Logger logger
protected static final String BASE_USER_URL_PATTERN
protected static final String PORTOFINO_ATTACHMENT_PATTERN
protected static final String PORTOFINO_HREF_PATTERN
public Resolution preparePage()
PageAction
@DefaultHandler public Resolution execute() throws IOException
IOException
protected void loadContent() throws IOException
locateTextFile()
).
Assigns the content
field.IOException
- if there's a problem loading the content.protected File locateTextFile()
computeTextFileName()
.computeTextFileName()
protected String computeTextFileName()
locateTextFile()
protected void saveContent() throws IOException
locateTextFile()
).IOException
- if there's a problem saving the content.protected String processContentBeforeSave(String content)
content
- the original content.public Resolution cancel()
cancel
in class AbstractPageAction
public Resolution configure()
public Resolution configurePage()
public Resolution updateConfiguration() throws IOException
IOException
public Resolution uploadAttachment()
public Resolution uploadAttachmentFromCKEditor()
protected void commonUploadAttachment() throws IOException
IOException
public Resolution viewAttachment()
public Resolution downloadAttachment()
protected Resolution streamAttachment(boolean isAttachment)
public Resolution browse()
public Resolution browsePages()
public Resolution manageAttachments()
public Resolution updateContent()
public Resolution deleteAttachments()
public Resolution saveAttachments()
public String getTitle()
public void setTitle(String title)
public String getDescription()
public void setDescription(String title)
public String getContent()
public void setContent(String content)
public TextConfiguration getTextConfiguration()
public FileBean getUpload()
public void setUpload(FileBean upload)
public String getCKEditor()
public void setCKEditor(String CKEditor)
public Integer getCKEditorFuncNum()
public void setCKEditorFuncNum(Integer CKEditorFuncNum)
public String getLangCode()
public void setLangCode(String langCode)
public String getId()
public void setId(String id)
public String getViewAttachmentUrl()
public void setViewAttachmentUrl(String viewAttachmentUrl)
public String getMessage()
public void setMessage(String message)
public File getTextFile()
public void setTextFile(File textFile)
public List<Attachment> getDownloadableAttachments()