public abstract class AbstractScmWebEditorAction
extends org.nuiton.web.struts2.BaseAction
implements org.apache.struts2.interceptor.ServletRequestAware
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ATTRIBUTE_BAD_LOGIN |
protected static String |
ATTRIBUTE_FILESEARCH_SERVLET_URL |
protected static String |
ATTRIBUTE_INVALIDATE_MAX_TIME |
protected static String |
ATTRIBUTE_IS_LOGIN |
protected static String |
ATTRIBUTE_LOGIN |
protected static String |
ATTRIBUTE_ORIG_TEXT |
protected static String |
ATTRIBUTE_PREVIEW_SERVLET_URL |
protected static String |
ATTRIBUTE_PRIVATE_SERVLET_URI |
protected static String |
ATTRIBUTE_PROJECT_URL |
protected static String |
ATTRIBUTE_REDIRECT_URL |
protected static String |
ATTRIBUTE_REDIRECTION_URL |
protected static String |
ATTRIBUTE_SCM_EDITOR_URI |
static String |
AUTH_ERROR |
protected static String |
CONTEXT_ACTION_KEY |
protected static info.monitorenter.cpdetector.io.CodepageDetectorProxy |
detector |
protected static String |
EDITABLESFILES |
protected static String |
ENCODING |
static String |
ERROR_PATH |
protected static String |
PARAMETER_ADDRESS |
protected static String |
PARAMETER_COMMIT_MESSAGE |
protected static String |
PARAMETER_DEFAULT_LANG |
protected static String |
PARAMETER_FILE_NAME |
protected static String |
PARAMETER_FORMAT |
protected static String |
PARAMETER_LANG |
protected static String |
PARAMETER_MYTEXT |
protected static String |
PARAMETER_ORIG_TEXT |
protected static String |
PARAMETER_PROJECT_URL |
protected static String |
PARAMETER_PW |
protected static String |
PARAMETER_SCM_EDITOR_URL |
protected static String |
PARAMETER_TEXT |
protected static String |
PARAMETER_USERNAME |
protected static String |
PROPERTIESFILES |
protected javax.servlet.http.HttpServletRequest |
request
the HTTP request received by the server
|
protected String |
scmType
the name of the SCM to use for the given repository
|
protected Map<String,Object> |
session
the session which stores all the users' authentication information
|
| Constructor and Description |
|---|
AbstractScmWebEditorAction() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
convertToUnicode(File... files)
Convert all files to UTF-8.
|
protected info.monitorenter.cpdetector.io.CodepageDetectorProxy |
getCodepageDetector() |
protected String |
getMimeType(File file) |
protected String |
getMimeType(String content,
String filename) |
protected String[] |
getMimeTypes(String content,
String filename) |
String |
getPassword(String url) |
javax.servlet.http.HttpServletRequest |
getRequest() |
ScmSession |
getScmSession() |
String |
getScmType() |
String |
getSweVersion() |
String |
getUsername(String url) |
protected String[] |
getUsernamePwFromSession(String repositoryUUID,
String username,
String pw)
Reads the information in the session to give the username and the password for a given repository if necessary
|
static Properties |
loadProperties(InputStream inStream)
Getting the properties from a properties file
|
static Properties |
loadProperties(String file)
Getting the properties from a properties file
|
void |
setScmType(String scmType) |
void |
setServletRequest(javax.servlet.http.HttpServletRequest request) |
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getFormatted, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validatepublic static final String AUTH_ERROR
public static final String ERROR_PATH
protected static final String ENCODING
protected Map<String,Object> session
protected transient javax.servlet.http.HttpServletRequest request
protected String scmType
protected static final String CONTEXT_ACTION_KEY
protected static final String PARAMETER_ADDRESS
protected static final String PARAMETER_SCM_EDITOR_URL
protected static final String PARAMETER_PROJECT_URL
protected static final String PARAMETER_FILE_NAME
protected static final String PARAMETER_LANG
protected static final String PARAMETER_DEFAULT_LANG
protected static final String PARAMETER_FORMAT
protected static final String PARAMETER_USERNAME
protected static final String PARAMETER_PW
protected static final String PARAMETER_MYTEXT
protected static final String PARAMETER_ORIG_TEXT
protected static final String PARAMETER_COMMIT_MESSAGE
protected static final String PARAMETER_TEXT
protected static final String ATTRIBUTE_REDIRECTION_URL
protected static final String ATTRIBUTE_ORIG_TEXT
protected static final String ATTRIBUTE_INVALIDATE_MAX_TIME
protected static final String ATTRIBUTE_LOGIN
protected static final String ATTRIBUTE_IS_LOGIN
protected static final String ATTRIBUTE_BAD_LOGIN
protected static final String ATTRIBUTE_PROJECT_URL
protected static final String ATTRIBUTE_SCM_EDITOR_URI
protected static final String ATTRIBUTE_PREVIEW_SERVLET_URL
protected static final String ATTRIBUTE_FILESEARCH_SERVLET_URL
protected static final String ATTRIBUTE_REDIRECT_URL
protected static final String ATTRIBUTE_PRIVATE_SERVLET_URI
protected static final String PROPERTIESFILES
protected static final String EDITABLESFILES
protected static info.monitorenter.cpdetector.io.CodepageDetectorProxy detector
public String getScmType()
public void setScmType(String scmType)
public javax.servlet.http.HttpServletRequest getRequest()
protected info.monitorenter.cpdetector.io.CodepageDetectorProxy getCodepageDetector()
protected void convertToUnicode(File... files)
files - files to convertprotected String getMimeType(File file) throws IOException
IOExceptionprotected String getMimeType(String content, String filename) throws IOException
IOExceptionprotected String[] getMimeTypes(String content, String filename) throws IOException, SAXException, org.apache.tika.exception.TikaException
IOExceptionSAXExceptionorg.apache.tika.exception.TikaExceptionpublic static Properties loadProperties(String file) throws IOException
file - the file containing the propertiesIOExceptionpublic static Properties loadProperties(InputStream inStream) throws IOException, NullPointerException
inStream - the file containing the propertiesIOExceptionNullPointerExceptionpublic ScmSession getScmSession()
protected String[] getUsernamePwFromSession(String repositoryUUID, String username, String pw)
repositoryUUID - the ID of the repository to connect tousername - the currently known username: the session won't be read if it is has a valuepw - the currently known password: the session won't be read if it is has a valuepublic String getSweVersion()
public void setServletRequest(javax.servlet.http.HttpServletRequest request)
setServletRequest in interface org.apache.struts2.interceptor.ServletRequestAwareCopyright © 2009–2016 CodeLutin. All rights reserved.