Class ReleaserUtils


  • public class ReleaserUtils
    extends Object
    The Class ReleaserUtils.
    Author:
    merlinfe
    • Constructor Detail

      • ReleaserUtils

        public ReleaserUtils()
    • Method Detail

      • getWorklowContextDataKey

        public static String getWorklowContextDataKey​(String strArtifactId,
                                                      int nContextId)
        Gets the worklow context data key.
        Parameters:
        strArtifactId - the str artifact id
        nContextId - the n context id
        Returns:
        the worklow context data key
      • getLastReleaseVersionDataKey

        public static String getLastReleaseVersionDataKey​(String strArtifactId)
        Gets the last release version data key.
        Parameters:
        strArtifactId - the str artifact id
        Returns:
        the last release version data key
      • getLastReleaseNextSnapshotVersionDataKey

        public static String getLastReleaseNextSnapshotVersionDataKey​(String strArtifactId)
        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

        public static String getLocalPath​(WorkflowReleaseContext context)
        Gets the local path.
        Parameters:
        context - the context
        Returns:
        the local path
      • getLocalPomPath

        public static String getLocalPomPath​(WorkflowReleaseContext context)
        Gets the local pom path.
        Parameters:
        context - the context
        Returns:
        the local pom path
      • getLocalSitePath

        public static String getLocalSitePath​(Site site)
        Gets the local site path.
        Parameters:
        site - the site
        Returns:
        the local site path
      • getLocalSitePomPath

        public static String getLocalSitePomPath​(Site site)
        Gets the local site pom path.
        Parameters:
        site - the site
        Returns:
        the local site pom path
      • getComponentName

        public static String getComponentName​(String strScmDeveloperConnection,
                                              String strArtifactId)
        Gets the component name.
        Parameters:
        strScmDeveloperConnection - the str scm developer connection
        strArtifactId - the str artifact id
        Returns:
        the component name
      • getSiteTagName

        public static String getSiteTagName​(Site site)
        Gets the site tag name.
        Parameters:
        site - the site
        Returns:
        the site tag name
      • addInfoError

        public static void addInfoError​(CommandResult commandResult,
                                        String strError,
                                        Exception e)
        Adds the info error.
        Parameters:
        commandResult - the command result
        strError - the str error
        e - 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 result
        strError - the str error
        e - 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 result
        strError - the str error
        Throws:
        fr.paris.lutece.portal.service.util.AppException - the app exception
      • startCommandResult

        public static void startCommandResult​(WorkflowReleaseContext context)
        Start command result.
        Parameters:
        context - the context
      • logStartAction

        public static void logStartAction​(WorkflowReleaseContext context,
                                          String strActionName)
        Log start action.
        Parameters:
        context - the context
        strActionName - the str action name
      • logEndAction

        public static void logEndAction​(WorkflowReleaseContext context,
                                        String strActionName)
        Log end action.
        Parameters:
        context - the context
        strActionName - the str action name
      • stopCommandResult

        public static void stopCommandResult​(WorkflowReleaseContext context)
        Stop command result.
        Parameters:
        context - the context
      • convertStringToInt

        public static int convertStringToInt​(String strParameter)
        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 request
        locale - the locale
        Returns:
        the releaser user
      • populateReleaserUser

        public static void populateReleaserUser​(javax.servlet.http.HttpServletRequest request,
                                                ReleaserUser user)
        Populate releaser user.
        Parameters:
        request - the request
        user - the user
      • setReleaserUser

        public static void setReleaserUser​(javax.servlet.http.HttpServletRequest request,
                                           ReleaserUser releaserUser)
        Sets the releaser user.
        Parameters:
        request - the request
        releaserUser - the releaser user
      • isApplicationAccountEnable

        public static boolean isApplicationAccountEnable()
        Checks if is application account enable.
        Returns:
        true, if is application account enable
      • compareVersion

        public static int compareVersion​(String strVersion1,
                                         String strVersion2)
        Compare version.
        Parameters:
        strVersion1 - the str version 1
        strVersion2 - the str version 2
        Returns:
        the int
      • cleanPWDInLog

        public static String cleanPWDInLog​(String strLog)