Class AbstractViewAttachmentsAction
- java.lang.Object
-
- com.opensymphony.xwork2.ActionSupport
-
- com.atlassian.confluence.core.ConfluenceActionSupport
-
- com.atlassian.confluence.pages.actions.AbstractViewAttachmentsAction
-
- All Implemented Interfaces:
BootstrapAware,WebInterface,MessageHolderAware,com.opensymphony.xwork2.Action,com.opensymphony.xwork2.interceptor.ValidationAware,com.opensymphony.xwork2.LocaleProvider,com.opensymphony.xwork2.TextProvider,com.opensymphony.xwork2.Validateable,Serializable,org.apache.struts2.interceptor.ServletRequestAware
- Direct Known Subclasses:
ViewPageAttachmentsAction
public abstract class AbstractViewAttachmentsAction extends ConfluenceActionSupport implements org.apache.struts2.interceptor.ServletRequestAware, BootstrapAware
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AttachmentManagerattachmentManagerprotected FileStorerfileStorerprotected List<String>highlight-
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
accessModeService, CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, personService, pluginAccessor, PREVIEW, settingsManager, spacePermissionManager, userAccessor, webInterfaceManager
-
-
Constructor Summary
Constructors Constructor Description AbstractViewAttachmentsAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidbootstrap()Stringexecute()List<Attachment>getAllVersions(Attachment attachment)String[]getAttachmentDetails(Attachment attachment)Used for writing the "do you want to remove?" message.abstract ContentEntityObjectgetContentEntityObject()List<String>getHighlight()StringgetHighlightParameter()StringgetLabels()List<Attachment>getLatestVersionsOfAttachments()intgetMaxAttachments()StringgetSortBy()longgetUploadLimit()booleanhasAttachFilePermissions()voidsetAttachmentManager(AttachmentManager attachmentManager)voidsetFileUploadManager(FileUploadManager fileUploadManager)voidsetHighlight(List<String> names)voidsetLabels(String labels)voidsetServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest)voidsetSortBy(String sortBy)protected voidvalidateUpload()-
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getAccessMode, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getBootstrapStatusProvider, getCancel, getCancelResult, getConfluenceAccessManager, getContext, getCurrentRequest, getCurrentSession, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDefaultTimeZone, getDocLink, getEventManager, getFriendlyDateFormatter, getFrontendServiceURL, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageJs, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermissionManager, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPersonService, getPreviousLoginDate, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUserAccessor, getUserByName, getUserFullName, getUserHasBrowseUsersPermission, getUserHasLicensedAccess, getUserInterfaceState, getUserLocaleDefaultDatePattern, getUserProfilePicUrl, getWebInterfaceContext, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermitted, isPrintableVersion, isSkipAccessCheck, isUserStatusPluginEnabled, isUsingH2, isUsingHSQL, setAccessModeService, setApiDateFormatService, setApiPersonService, setBootstrapManager, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setServletRequestSupplier, setSettingsManager, setSkipAccessCheck, setSpacePermissionManager, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManager, withServletRequestSupplier
-
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocaleProvider, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.opensymphony.xwork2.LocaleProvider
isValidLocale, isValidLocaleString
-
Methods inherited from interface com.atlassian.confluence.validation.MessageHolderAware
validate
-
-
-
-
Field Detail
-
attachmentManager
protected AttachmentManager attachmentManager
-
fileStorer
protected FileStorer fileStorer
-
-
Method Detail
-
setServletRequest
public void setServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest)
- Specified by:
setServletRequestin interfaceorg.apache.struts2.interceptor.ServletRequestAware
-
bootstrap
public void bootstrap()
- Specified by:
bootstrapin interfaceBootstrapAware
-
validateUpload
protected void validateUpload()
-
execute
public String execute() throws Exception
- Specified by:
executein interfacecom.opensymphony.xwork2.Action- Overrides:
executein classcom.opensymphony.xwork2.ActionSupport- Throws:
Exception
-
hasAttachFilePermissions
public boolean hasAttachFilePermissions()
-
getContentEntityObject
public abstract ContentEntityObject getContentEntityObject()
-
setAttachmentManager
public void setAttachmentManager(AttachmentManager attachmentManager)
-
getLatestVersionsOfAttachments
public List<Attachment> getLatestVersionsOfAttachments()
-
getAttachmentDetails
public String[] getAttachmentDetails(Attachment attachment)
Used for writing the "do you want to remove?" message.- Parameters:
attachment- the attachment to get the details of- Returns:
- an array of the attachment's name (XML-escaped) and its version number
-
getUploadLimit
public long getUploadLimit()
-
getHighlightParameter
public String getHighlightParameter()
-
getAllVersions
public List<Attachment> getAllVersions(Attachment attachment)
-
getMaxAttachments
public int getMaxAttachments()
-
setFileUploadManager
public void setFileUploadManager(FileUploadManager fileUploadManager)
-
getSortBy
public String getSortBy()
-
setSortBy
public void setSortBy(String sortBy)
-
setLabels
public void setLabels(String labels)
-
getLabels
public String getLabels()
-
-