Class ComponentService
- java.lang.Object
-
- fr.paris.lutece.plugins.releaser.service.ComponentService
-
- All Implemented Interfaces:
IComponentService
public class ComponentService extends java.lang.Object implements IComponentService
ComponentService
-
-
Constructor Summary
Constructors Constructor Description ComponentService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeNextReleaseVersion(Component component)Change the next release versionComponentgetComponentBranchList(Component component, RepositoryType repositoryType, ReleaserUser user)Set list of all component branchesComponentgetLastBranchVersion(Component component, java.lang.String branchName, ReleaserUser user)java.lang.StringgetLastReleaseNextSnapshotVersion(java.lang.String strArtifactId)Returns the LastAvailableVersionjava.lang.StringgetLastReleaseVersion(java.lang.String strArtifactId)Returns the LastAvailableVersionfr.paris.lutece.portal.web.util.LocalizedPaginator<Component>getSearchComponent(java.lang.String strSearch, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, java.lang.String strPaginateUrl, java.lang.String strCurrentPageIndex)Gets the search component.static IComponentServicegetService()voidinit()Inits the.booleanisErrorSnapshotComponentInformations(Component component, java.lang.String strComponentPomPath)Checks if is error snapshot component informations.booleanisGitComponent(Component component)Checks if is git component.static booleanIsSearchComponentAuthorized(fr.paris.lutece.portal.business.user.AdminUser adminUser)ComponentloadComponent(Component component, java.lang.String strPom, java.lang.String stUser, java.lang.String strPassword)Load component.intrelease(Component component, java.util.Locale locale, fr.paris.lutece.portal.business.user.AdminUser user, javax.servlet.http.HttpServletRequest request)Release.intrelease(Component component, java.util.Locale locale, fr.paris.lutece.portal.business.user.AdminUser user, javax.servlet.http.HttpServletRequest request, boolean forceRelease)Release.voidsetLastReleaseNextSnapshotVersion(java.lang.String strArtifactId, java.lang.String strVersion)set the LastAvailableVersion set The LastAvailableVersionvoidsetLastReleaseVersion(java.lang.String strArtifactId, java.lang.String strVersion)set the LastAvailableVersion set The LastAvailableVersionvoidsetRemoteInformations(Component component, boolean bCache)Sets the remote informations.voidupdateRemoteInformations(Component component)Update remote informations.
-
-
-
Method Detail
-
getService
public static IComponentService getService()
- Returns:
- get service
-
setRemoteInformations
public void setRemoteInformations(Component component, boolean bCache) throws fr.paris.lutece.util.httpaccess.HttpAccessException, java.io.IOException
Description copied from interface:IComponentServiceSets the remote informations.- Specified by:
setRemoteInformationsin interfaceIComponentService- Parameters:
component- the componentbCache- the b cache- Throws:
fr.paris.lutece.util.httpaccess.HttpAccessException- the http access exceptionjava.io.IOException- Signals that an I/O exception has occurred.
-
getLastReleaseVersion
public java.lang.String getLastReleaseVersion(java.lang.String strArtifactId)
Returns the LastAvailableVersion- Specified by:
getLastReleaseVersionin interfaceIComponentService- Parameters:
strArtifactId- the str artifact id- Returns:
- The LastAvailableVersion
-
setLastReleaseVersion
public void setLastReleaseVersion(java.lang.String strArtifactId, java.lang.String strVersion)set the LastAvailableVersion set The LastAvailableVersion- Specified by:
setLastReleaseVersionin interfaceIComponentService- Parameters:
strArtifactId- the str artifact idstrVersion- the str version
-
getLastReleaseNextSnapshotVersion
public java.lang.String getLastReleaseNextSnapshotVersion(java.lang.String strArtifactId)
Returns the LastAvailableVersion- Specified by:
getLastReleaseNextSnapshotVersionin interfaceIComponentService- Parameters:
strArtifactId- the str artifact id- Returns:
- The LastAvailableVersion
-
setLastReleaseNextSnapshotVersion
public void setLastReleaseNextSnapshotVersion(java.lang.String strArtifactId, java.lang.String strVersion)set the LastAvailableVersion set The LastAvailableVersion- Specified by:
setLastReleaseNextSnapshotVersionin interfaceIComponentService- Parameters:
strArtifactId- the str artifact idstrVersion- the str version
-
release
public int release(Component component, java.util.Locale locale, fr.paris.lutece.portal.business.user.AdminUser user, javax.servlet.http.HttpServletRequest request, boolean forceRelease)
Description copied from interface:IComponentServiceRelease.- Specified by:
releasein interfaceIComponentService- Parameters:
component- the componentlocale- the localeuser- the userrequest- the requestforceRelease- the force release- Returns:
- context id
-
release
public int release(Component component, java.util.Locale locale, fr.paris.lutece.portal.business.user.AdminUser user, javax.servlet.http.HttpServletRequest request)
Description copied from interface:IComponentServiceRelease.- Specified by:
releasein interfaceIComponentService- Parameters:
component- the componentlocale- the localeuser- the userrequest- the request- Returns:
- context id
-
isGitComponent
public boolean isGitComponent(Component component)
Description copied from interface:IComponentServiceChecks if is git component.- Specified by:
isGitComponentin interfaceIComponentService- Parameters:
component- the component- Returns:
- boolean
-
init
public void init()
Description copied from interface:IComponentServiceInits the.- Specified by:
initin interfaceIComponentService
-
updateRemoteInformations
public void updateRemoteInformations(Component component)
Description copied from interface:IComponentServiceUpdate remote informations.- Specified by:
updateRemoteInformationsin interfaceIComponentService- Parameters:
component- the component
-
getSearchComponent
public fr.paris.lutece.portal.web.util.LocalizedPaginator<Component> getSearchComponent(java.lang.String strSearch, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, java.lang.String strPaginateUrl, java.lang.String strCurrentPageIndex)
Description copied from interface:IComponentServiceGets the search component.- Specified by:
getSearchComponentin interfaceIComponentService- Parameters:
strSearch- the str searchrequest- the requestlocale- the localestrPaginateUrl- the str paginate urlstrCurrentPageIndex- the str current page index- Returns:
- local paginator
-
loadComponent
public Component loadComponent(Component component, java.lang.String strPom, java.lang.String stUser, java.lang.String strPassword)
Description copied from interface:IComponentServiceLoad component.- Specified by:
loadComponentin interfaceIComponentService- Parameters:
component- the componentstrPom- the str pomstUser- the st userstrPassword- the str password- Returns:
- component
-
isErrorSnapshotComponentInformations
public boolean isErrorSnapshotComponentInformations(Component component, java.lang.String strComponentPomPath)
Description copied from interface:IComponentServiceChecks if is error snapshot component informations.- Specified by:
isErrorSnapshotComponentInformationsin interfaceIComponentService- Parameters:
component- the componentstrComponentPomPath- the str component pom path- Returns:
- boolean
-
changeNextReleaseVersion
public void changeNextReleaseVersion(Component component)
Change the next release version- Specified by:
changeNextReleaseVersionin interfaceIComponentService- Parameters:
component- The component
-
IsSearchComponentAuthorized
public static boolean IsSearchComponentAuthorized(fr.paris.lutece.portal.business.user.AdminUser adminUser)
-
getComponentBranchList
public Component getComponentBranchList(Component component, RepositoryType repositoryType, ReleaserUser user)
Description copied from interface:IComponentServiceSet list of all component branches- Specified by:
getComponentBranchListin interfaceIComponentServiceuser- The user- Returns:
-
getLastBranchVersion
public Component getLastBranchVersion(Component component, java.lang.String branchName, ReleaserUser user)
- Specified by:
getLastBranchVersionin interfaceIComponentService
-
-