Class ReleaserUtils
java.lang.Object
fr.paris.lutece.plugins.releaser.util.ReleaserUtils
The Class ReleaserUtils.
- Author:
- merlinfe
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddInfoError(CommandResult commandResult, String strError, Exception e) Adds the info error.static voidaddTechnicalError(CommandResult commandResult, String strError) Adds the technical error.static voidaddTechnicalError(CommandResult commandResult, String strError, Exception e) Adds the technical error.static StringcleanPWDInLog(String strLog) static intcompareVersion(String strVersion1, String strVersion2) Compare version.static intconvertStringToInt(String strParameter) convert a string to int.static Stringstatic StringgetComponentName(String strScmDeveloperConnection, String strArtifactId) Gets the component name.static StringgetLastReleaseNextSnapshotVersionDataKey(String strArtifactId) Gets the last release next snapshot version data key.static StringgetLastReleaseVersionDataKey(String strArtifactId) Gets the last release version data key.static StringGets the local pom path.static StringgetLocalPath(WorkflowReleaseContext context) Gets the local path.static StringgetLocalPomPath(WorkflowReleaseContext context) Gets the local pom path.static StringgetLocalSitePath(Site site) Gets the local site path.static StringgetLocalSitePomPath(Site site) Gets the local site pom path.static ReleaserUsergetReleaserUser(javax.servlet.http.HttpServletRequest request, Locale locale) Gets the releaser user.static StringgetSiteTagName(Site site) Gets the site tag name.static StringgetWorklowContextDataKey(String strArtifactId, int nContextId) Gets the worklow context data key.static booleanChecks if is application account enable.static booleanIsVersionInRightFormat(String strVersion) static voidlogEndAction(WorkflowReleaseContext context, String strActionName) Log end action.static voidlogStartAction(WorkflowReleaseContext context, String strActionName) Log start action.static voidpopulateReleaserUser(javax.servlet.http.HttpServletRequest request, ReleaserUser user) Populate releaser user.static voidsetReleaserUser(javax.servlet.http.HttpServletRequest request, ReleaserUser releaserUser) Sets the releaser user.static voidstartCommandResult(WorkflowReleaseContext context) Start command result.static voidstopCommandResult(WorkflowReleaseContext context) Stop command result.
-
Field Details
-
REGEX_ID
The Constant REGEX_ID.- See Also:
-
-
Constructor Details
-
ReleaserUtils
public ReleaserUtils()
-
-
Method Details
-
getWorklowContextDataKey
Gets the worklow context data key.- Parameters:
strArtifactId- the str artifact idnContextId- the n context id- Returns:
- the worklow context data key
-
getLastReleaseVersionDataKey
Gets the last release version data key.- Parameters:
strArtifactId- the str artifact id- Returns:
- the last release version data key
-
getLastReleaseNextSnapshotVersionDataKey
Gets the last release next snapshot version data key.- Parameters:
strArtifactId- the str artifact id- Returns:
- the last release next snapshot version data key
-
getLocalPath
Gets the local path.- Parameters:
context- the context- Returns:
- the local path
-
getLocalPomPath
Gets the local pom path.- Parameters:
context- the context- Returns:
- the local pom path
-
getLocalEffectivePomPath
Gets the local pom path.- Parameters:
context- the context- Returns:
- the local pom path
-
getLocalSitePath
Gets the local site path.- Parameters:
site- the site- Returns:
- the local site path
-
getLocalSitePomPath
Gets the local site pom path.- Parameters:
site- the site- Returns:
- the local site pom path
-
getComponentName
Gets the component name.- Parameters:
strScmDeveloperConnection- the str scm developer connectionstrArtifactId- the str artifact id- Returns:
- the component name
-
getSiteTagName
Gets the site tag name.- Parameters:
site- the site- Returns:
- the site tag name
-
addInfoError
Adds the info error.- Parameters:
commandResult- the command resultstrError- the str errore- the e
-
addTechnicalError
public static void addTechnicalError(CommandResult commandResult, String strError, Exception e) throws fr.paris.lutece.portal.service.util.AppException Adds the technical error.- Parameters:
commandResult- the command resultstrError- the str errore- the e- Throws:
fr.paris.lutece.portal.service.util.AppException- the app exception
-
addTechnicalError
public static void addTechnicalError(CommandResult commandResult, String strError) throws fr.paris.lutece.portal.service.util.AppException Adds the technical error.- Parameters:
commandResult- the command resultstrError- the str error- Throws:
fr.paris.lutece.portal.service.util.AppException- the app exception
-
startCommandResult
Start command result.- Parameters:
context- the context
-
logStartAction
Log start action.- Parameters:
context- the contextstrActionName- the str action name
-
logEndAction
Log end action.- Parameters:
context- the contextstrActionName- the str action name
-
stopCommandResult
Stop command result.- Parameters:
context- the context
-
convertStringToInt
convert a string to int.- Parameters:
strParameter- the string parameter to convert- Returns:
- the conversion
-
getReleaserUser
public static ReleaserUser getReleaserUser(javax.servlet.http.HttpServletRequest request, Locale locale) Gets the releaser user.- Parameters:
request- the requestlocale- the locale- Returns:
- the releaser user
-
populateReleaserUser
public static void populateReleaserUser(javax.servlet.http.HttpServletRequest request, ReleaserUser user) Populate releaser user.- Parameters:
request- the requestuser- the user
-
setReleaserUser
public static void setReleaserUser(javax.servlet.http.HttpServletRequest request, ReleaserUser releaserUser) Sets the releaser user.- Parameters:
request- the requestreleaserUser- the releaser user
-
isApplicationAccountEnable
public static boolean isApplicationAccountEnable()Checks if is application account enable.- Returns:
- true, if is application account enable
-
compareVersion
Compare version.- Parameters:
strVersion1- the str version 1strVersion2- the str version 2- Returns:
- the int
-
cleanPWDInLog
-
getBranchReleaseFrom
-
IsVersionInRightFormat
-