org.nuiton.scmwebeditor
Class ScmWebEditorBaseAction
java.lang.Object
com.opensymphony.xwork2.ActionSupport
org.nuiton.scmwebeditor.ScmWebEditorBaseAction
- All Implemented Interfaces:
- com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, Serializable
- Direct Known Subclasses:
- PreviewAction, ResetAction, ScmWebEditorCommitAction, ScmWebEditorMainAction, SearchAction, UploadAction
public class ScmWebEditorBaseAction
- extends com.opensymphony.xwork2.ActionSupport
User: chemit
Date: 24 nov. 2009
Time: 21:24:39
- See Also:
- Serialized Form
| Fields inherited from class com.opensymphony.xwork2.ActionSupport |
LOG |
| Fields inherited from interface com.opensymphony.xwork2.Action |
ERROR, INPUT, LOGIN, NONE, SUCCESS |
|
Method Summary |
void |
checkout(SvnConnection svnSess,
File checkoutdir)
|
void |
checkout(SvnConnection svnSess,
File checkoutdir,
String numVersion)
|
protected void |
convertToUnicode(File... files)
Convert all files to UTF-8. |
void |
delTempDirectory(File checkoutdir)
Use to delete the checkout temp directory |
protected info.monitorenter.cpdetector.io.CodepageDetectorProxy |
getCodepageDetector()
|
String |
getHeadcommiter(String address,
String login,
String password)
|
String |
getHeadNumberRevision(String address,
String login,
String password)
|
String |
getHeadRevision(String address,
String login,
String password)
|
protected String |
getMimeType(File file)
|
protected String |
getMimeType(String content,
String filename)
|
protected String[] |
getMimeTypes(String content,
String filename)
|
String |
getPassword(String url)
|
ScmSession |
getScmSession()
|
protected SvnConnection |
getSvnSession(javax.servlet.http.HttpSession httpSession)
|
protected File |
getTempDir(javax.servlet.http.HttpSession httpSession)
|
String |
getUsername(String url)
|
static Properties |
loadProperties(String file)
Recuperation des propriétés dans un fichier properties |
protected void |
setSvnSession(javax.servlet.http.HttpSession httpSession,
SvnConnection svnSess)
|
| Methods inherited from class com.opensymphony.xwork2.ActionSupport |
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate |
session
protected Map<String,Object> session
CONTEXT_ACTION_KEY
protected static final String CONTEXT_ACTION_KEY
- See Also:
- Constant Field Values
PARAMETER_ADDRESS
protected static final String PARAMETER_ADDRESS
- See Also:
- Constant Field Values
PARAMETER_SCM_EDITOR_URL
protected static final String PARAMETER_SCM_EDITOR_URL
- See Also:
- Constant Field Values
PARAMETER_PROJECT_URL
protected static final String PARAMETER_PROJECT_URL
- See Also:
- Constant Field Values
PARAMETER_FILE_NAME
protected static final String PARAMETER_FILE_NAME
- See Also:
- Constant Field Values
PARAMETER_LANG
protected static final String PARAMETER_LANG
- See Also:
- Constant Field Values
PARAMETER_DEFAULT_LANG
protected static final String PARAMETER_DEFAULT_LANG
- See Also:
- Constant Field Values
PARAMETER_FORMAT
protected static final String PARAMETER_FORMAT
- See Also:
- Constant Field Values
PARAMETER_USERNAME
protected static final String PARAMETER_USERNAME
- See Also:
- Constant Field Values
PARAMETER_PW
protected static final String PARAMETER_PW
- See Also:
- Constant Field Values
PARAMETER_MYTEXT
protected static final String PARAMETER_MYTEXT
- See Also:
- Constant Field Values
PARAMETER_ORIG_TEXT
protected static final String PARAMETER_ORIG_TEXT
- See Also:
- Constant Field Values
PARAMETER_COMMIT_MESSAGE
protected static final String PARAMETER_COMMIT_MESSAGE
- See Also:
- Constant Field Values
PARAMETER_TEXT
protected static final String PARAMETER_TEXT
- See Also:
- Constant Field Values
ATTRIBUTE_REDIRECTION_URL
protected static final String ATTRIBUTE_REDIRECTION_URL
- See Also:
- Constant Field Values
ATTRIBUTE_ORIG_TEXT
protected static final String ATTRIBUTE_ORIG_TEXT
- See Also:
- Constant Field Values
ATTRIBUTE_INVALIDATE_MAX_TIME
protected static final String ATTRIBUTE_INVALIDATE_MAX_TIME
- See Also:
- Constant Field Values
ATTRIBUTE_LOGIN
protected static final String ATTRIBUTE_LOGIN
- See Also:
- Constant Field Values
ATTRIBUTE_IS_LOGIN
protected static final String ATTRIBUTE_IS_LOGIN
- See Also:
- Constant Field Values
ATTRIBUTE_BAD_LOGIN
protected static final String ATTRIBUTE_BAD_LOGIN
- See Also:
- Constant Field Values
ATTRIBUTE_PROJECT_URL
protected static final String ATTRIBUTE_PROJECT_URL
- See Also:
- Constant Field Values
ATTRIBUTE_SCM_EDITOR_URI
protected static final String ATTRIBUTE_SCM_EDITOR_URI
- See Also:
- Constant Field Values
ATTRIBUTE_PREVIEW_SERVLET_URL
protected static final String ATTRIBUTE_PREVIEW_SERVLET_URL
- See Also:
- Constant Field Values
ATTRIBUTE_FILESEARCH_SERVLET_URL
protected static final String ATTRIBUTE_FILESEARCH_SERVLET_URL
- See Also:
- Constant Field Values
ATTRIBUTE_REDIRECT_URL
protected static final String ATTRIBUTE_REDIRECT_URL
- See Also:
- Constant Field Values
ATTRIBUTE_PRIVATE_SERVLET_URI
protected static final String ATTRIBUTE_PRIVATE_SERVLET_URI
- See Also:
- Constant Field Values
detector
protected static info.monitorenter.cpdetector.io.CodepageDetectorProxy detector
ScmWebEditorBaseAction
public ScmWebEditorBaseAction()
getCodepageDetector
protected info.monitorenter.cpdetector.io.CodepageDetectorProxy getCodepageDetector()
convertToUnicode
protected void convertToUnicode(File... files)
- Convert all files to UTF-8.
- Parameters:
files - fiels to convert
checkout
public void checkout(SvnConnection svnSess,
File checkoutdir,
String numVersion)
throws org.tmatesoft.svn.core.SVNException
- Parameters:
svnSess - checkoutdir -
- Throws:
org.tmatesoft.svn.core.SVNException
checkout
public void checkout(SvnConnection svnSess,
File checkoutdir)
throws org.tmatesoft.svn.core.SVNException
- Parameters:
svnSess - checkoutdir -
- Throws:
org.tmatesoft.svn.core.SVNException
getHeadRevision
public String getHeadRevision(String address,
String login,
String password)
throws org.tmatesoft.svn.core.SVNException,
IllegalArgumentException
- Parameters:
svnFile - username - password -
- Returns:
-
- Throws:
org.tmatesoft.svn.core.SVNException
IOException
IllegalArgumentException
getHeadNumberRevision
public String getHeadNumberRevision(String address,
String login,
String password)
throws org.tmatesoft.svn.core.SVNException
- Throws:
org.tmatesoft.svn.core.SVNException
getHeadcommiter
public String getHeadcommiter(String address,
String login,
String password)
throws org.tmatesoft.svn.core.SVNException
- Throws:
org.tmatesoft.svn.core.SVNException
delTempDirectory
public void delTempDirectory(File checkoutdir)
- Use to delete the checkout temp directory
- Parameters:
checkoutdir - The dir temp directory
getSvnSession
protected SvnConnection getSvnSession(javax.servlet.http.HttpSession httpSession)
setSvnSession
protected void setSvnSession(javax.servlet.http.HttpSession httpSession,
SvnConnection svnSess)
getTempDir
protected File getTempDir(javax.servlet.http.HttpSession httpSession)
getMimeType
protected String getMimeType(File file)
throws IOException,
SAXException,
org.apache.tika.exception.TikaException
- Throws:
IOException
SAXException
org.apache.tika.exception.TikaException
getMimeType
protected String getMimeType(String content,
String filename)
throws IOException
- Throws:
IOException
getMimeTypes
protected String[] getMimeTypes(String content,
String filename)
throws IOException,
SAXException,
org.apache.tika.exception.TikaException
- Throws:
IOException
SAXException
org.apache.tika.exception.TikaException
loadProperties
public static Properties loadProperties(String file)
throws IOException
- Recuperation des propriétés dans un fichier properties
- Parameters:
file - le fichier contenant les propriétés
- Returns:
- un objet Properties contenant les propriétés du fichier
- Throws:
IOException
getScmSession
public ScmSession getScmSession()
getUsername
public String getUsername(String url)
getPassword
public String getPassword(String url)
Copyright © 2009-2011 CodeLutin. All Rights Reserved.