Class SiteService

java.lang.Object
fr.paris.lutece.plugins.releaser.service.SiteService

public class SiteService extends Object
SiteService.
  • Field Details

    • POM_PARENT_MIN_VERSION_TO_CREATE_DOCKET_IMAGE

      public static String POM_PARENT_MIN_VERSION_TO_CREATE_DOCKET_IMAGE
      Minimum pom parent version to create docker image.
  • Constructor Details

    • SiteService

      public SiteService()
  • Method Details

    • getSite

      public static Site getSite(int nSiteId, javax.servlet.http.HttpServletRequest request, Locale locale)
      Load a site from its id.
      Parameters:
      nSiteId - The site id
      request - the request
      locale - the locale
      Returns:
      A site object
    • isSiteCreateDockerImage

      public static boolean isSiteCreateDockerImage(Site site)
    • updateComponentAsProjectStatus

      public static void updateComponentAsProjectStatus(Site site, String strArtifactId, Boolean bIsProject)
      Update component as project status.
      Parameters:
      site - the site
      strArtifactId - the str artifact id
      bIsProject - the b is project
    • removeComponentAsProjectBySite

      public static void removeComponentAsProjectBySite(int nIdSite)
      Removes the component as project by site.
      Parameters:
      nIdSite - the n id site
    • buildComments

      public static void buildComments(Site site, Locale locale)
      Build release comments for a given site.
      Parameters:
      site - The site
      locale - The locale to use for comments
    • upgradeComponent

      public static void upgradeComponent(Site site, String strArtifactId)
      Upgrade component.
      Parameters:
      site - the site
      strArtifactId - the str artifact id
    • cancelUpgradeComponent

      public static void cancelUpgradeComponent(Site site, String strArtifactId)
      Cancel upgrade component.
      Parameters:
      site - the site
      strArtifactId - the str artifact id
    • downgradeComponent

      public static void downgradeComponent(Site site, String strArtifactId)
      Downgrade component.
      Parameters:
      site - the site
      strArtifactId - the str artifact id
    • cancelDowngradeComponent

      public static void cancelDowngradeComponent(Site site, String strArtifactId)
      Cancel downgrade component.
      Parameters:
      site - the site
      strArtifactId - the str artifact id
    • releaseComponent

      public static int releaseComponent(Site site, String strArtifactId, Locale locale, fr.paris.lutece.portal.business.user.AdminUser user, javax.servlet.http.HttpServletRequest request, boolean bForce)
      Release component.
      Parameters:
      site - the site
      strArtifactId - the str artifact id
      locale - the locale
      user - the user
      request - the request
      Returns:
      the int
    • releaseSite

      public static Map<String,Integer> releaseSite(Site site, Locale locale, fr.paris.lutece.portal.business.user.AdminUser user, javax.servlet.http.HttpServletRequest request)
      Release site.
      Parameters:
      site - the site
      locale - the locale
      user - the user
      request - the request
      Returns:
      the map
    • toggleProjectComponent

      public static void toggleProjectComponent(Site site, String strArtifactId)
      Add or Remove a component from the project's components list.
      Parameters:
      site - The site
      strArtifactId - The component artifact id
    • changeNextReleaseVersion

      public static void changeNextReleaseVersion(Site site, String strArtifactId)
      Change the next release version.
      Parameters:
      site - The site
      strArtifactId - The component artifact id
    • changeNextReleaseVersion

      public static void changeNextReleaseVersion(Site site)
      Change the next release version.
      Parameters:
      site - The site
    • generateTargetPOM

      public String generateTargetPOM(Site site)
      Generate the pom.xml file for a given site
      Parameters:
      site - The site
      Returns:
      The pom.xml content
    • getAuthorizedSites

      public static List<Site> getAuthorizedSites(int clusterId, fr.paris.lutece.portal.business.user.AdminUser adminUser)
    • IsUserAuthorized

      public static boolean IsUserAuthorized(fr.paris.lutece.portal.business.user.AdminUser adminUser, String siteId, String permission)
    • IsSiteAlreadyExist

      public static boolean IsSiteAlreadyExist(String siteName, String artifactId, String scmUrl)
    • getSiteBranchList

      public static Site getSiteBranchList(Site site, ReleaserUser user)
      Gets the branch list for a site repository.
      Parameters:
      site - the site
      user - the releaser user
      Returns:
      the site with branch list populated
    • changeSiteBranch

      public static Site changeSiteBranch(Site site, String strBranchName, ReleaserUser user, javax.servlet.http.HttpServletRequest request, Locale locale)
      Changes the site branch and reloads version information and components from the new branch POM.
      Parameters:
      site - the site
      strBranchName - the target branch name
      user - the releaser user
      request - the request
      locale - the locale
      Returns:
      the site with updated version info and components