Class SecuredCloudProfilePersistor
- java.lang.Object
-
- jetbrains.buildServer.clouds.server.impl.profile.SecuredCloudProfilePersistor
-
- All Implemented Interfaces:
CloudProfilePersistor
public class SecuredCloudProfilePersistor extends Object implements CloudProfilePersistor
- Author:
- Eugene Petrenko Created: 11.11.2009 21:58:34
-
-
Constructor Summary
Constructors Constructor Description SecuredCloudProfilePersistor(CloudSecurity security, CloudProfilePersistor host)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloudImageParameterscreateImage(String projectId, CloudImageData imageData)Create image with given parameters in a roject with given idCloudProfilecreateProfile(String projectId, CloudProfileData data)Creates new profile and persists it Calling this method may triggerCloudEventListener#profilesUpdated(java.util.Collection, boolean)call.Collection<CloudImageParameters>getImages(String projectId)Get images based on configured project features.Collection<CloudImageParameters>getImages(SProject project)Get images based on configured project features.ProjectCloudIntegrationStatusgetIntegrationStatus(String projectId)returns project's cloud integration statusCollection<CloudProfile>getProfiles(String projectId)Get profiles based on configured project features.Collection<CloudProfile>getProfiles(SProject project)Get last loaded profiles or loads them if nothing was initially loaded.booleanhasCloudRelatedConfiguration(String projectId)Returns true if settings of the project with given id contain cloud related configurationbooleanisConfigurable(String projectId)booleanisIntegrationEnabled(String projectId)booleanremoveImage(String projectId, String profileId, String imageId)Remove image located in given project and profile and with given idbooleanremoveImageWithInternalId(String projectId, String imageInternalId)Remove image located in given project and with given internal idbooleanremoveProfile(String projectId, String profileId)Removes profile with specified idbooleansetProfileEnabled(String projectId, String profileId, boolean isEnabled)Marks certain cloud profile as enabled or disabled.CloudImageParametersupdateImage(String projectId, CloudImageData imageData)Updates currently persisted image.CloudImageParametersupdateImageWithInternalId(String projectId, String imageInternalId, CloudImageData imageData)Updates currently persisted image.CloudProfileupdateProfile(String projectId, String profileId, CloudProfileData newData)Updates currently persisted profile.voidupdateStatus(String projectId, ProjectCloudIntegrationStatus status)Marks cloud integration as enabled or disabled in this project.
-
-
-
Constructor Detail
-
SecuredCloudProfilePersistor
public SecuredCloudProfilePersistor(@NotNull CloudSecurity security, @NotNull CloudProfilePersistor host)
-
-
Method Detail
-
createProfile
@NotNull public CloudProfile createProfile(@NotNull String projectId, @NotNull CloudProfileData data)
Description copied from interface:CloudProfilePersistorCreates new profile and persists it Calling this method may triggerCloudEventListener#profilesUpdated(java.util.Collection, boolean)call.- Specified by:
createProfilein interfaceCloudProfilePersistordata- profile info to save
-
getProfiles
public Collection<CloudProfile> getProfiles(@NotNull String projectId)
Description copied from interface:CloudProfilePersistorGet profiles based on configured project features.- Specified by:
getProfilesin interfaceCloudProfilePersistor- Returns:
- profiles
-
getProfiles
@NotNull public Collection<CloudProfile> getProfiles(@NotNull SProject project)
Get last loaded profiles or loads them if nothing was initially loaded. Calling this method may triggerCloudEventListener#profilesUpdated(Collection, boolean)call.- Specified by:
getProfilesin interfaceCloudProfilePersistor- Parameters:
project-- Returns:
- loaded profiles
-
getImages
@NotNull public Collection<CloudImageParameters> getImages(@NotNull String projectId)
Description copied from interface:CloudProfilePersistorGet images based on configured project features. Both - configured in profiles and inherited from parent projects.- Specified by:
getImagesin interfaceCloudProfilePersistor- Returns:
- all cloud images (own and inherited)
-
getImages
@NotNull public Collection<CloudImageParameters> getImages(@NotNull SProject project)
Description copied from interface:CloudProfilePersistorGet images based on configured project features. Both - configured in profiles and inherited from parent projects.- Specified by:
getImagesin interfaceCloudProfilePersistor- Returns:
- all cloud images (own and inherited)
-
createImage
@NotNull public CloudImageParameters createImage(@NotNull String projectId, @NotNull CloudImageData imageData)
Description copied from interface:CloudProfilePersistorCreate image with given parameters in a roject with given id- Specified by:
createImagein interfaceCloudProfilePersistor- Returns:
- Newly created image
-
updateImage
@NotNull public CloudImageParameters updateImage(@NotNull String projectId, @NotNull CloudImageData imageData)
Description copied from interface:CloudProfilePersistorUpdates currently persisted image.- Specified by:
updateImagein interfaceCloudProfilePersistor
-
updateImageWithInternalId
@NotNull public CloudImageParameters updateImageWithInternalId(@NotNull String projectId, @NotNull String imageInternalId, @NotNull CloudImageData imageData)
Description copied from interface:CloudProfilePersistorUpdates currently persisted image.- Specified by:
updateImageWithInternalIdin interfaceCloudProfilePersistor
-
removeImage
public boolean removeImage(@NotNull String projectId, @NotNull String profileId, @NotNull String imageId)Description copied from interface:CloudProfilePersistorRemove image located in given project and profile and with given id- Specified by:
removeImagein interfaceCloudProfilePersistor- Returns:
- true if image was actually removed, False otherwise
-
removeImageWithInternalId
public boolean removeImageWithInternalId(@NotNull String projectId, @NotNull String imageInternalId)Description copied from interface:CloudProfilePersistorRemove image located in given project and with given internal id- Specified by:
removeImageWithInternalIdin interfaceCloudProfilePersistor- Returns:
- true if image was actually removed, False otherwise
-
isIntegrationEnabled
public boolean isIntegrationEnabled(@NotNull String projectId)- Specified by:
isIntegrationEnabledin interfaceCloudProfilePersistor- Returns:
- true if integration is enabled in a project considering project hierarchy
-
getIntegrationStatus
@NotNull public ProjectCloudIntegrationStatus getIntegrationStatus(@NotNull String projectId)
Description copied from interface:CloudProfilePersistorreturns project's cloud integration status- Specified by:
getIntegrationStatusin interfaceCloudProfilePersistor- Returns:
-
isConfigurable
public boolean isConfigurable(@NotNull String projectId)- Specified by:
isConfigurablein interfaceCloudProfilePersistor- Parameters:
projectId-- Returns:
- true if cloud configuration is available in a project considering project hierarchy
-
hasCloudRelatedConfiguration
public boolean hasCloudRelatedConfiguration(@NotNull String projectId)Description copied from interface:CloudProfilePersistorReturns true if settings of the project with given id contain cloud related configuration- Specified by:
hasCloudRelatedConfigurationin interfaceCloudProfilePersistor- Returns:
-
removeProfile
public boolean removeProfile(@NotNull String projectId, @NotNull String profileId)Description copied from interface:CloudProfilePersistorRemoves profile with specified id- Specified by:
removeProfilein interfaceCloudProfilePersistorprofileId- profileId to remove- Returns:
- True if profile was actually removed, False otherwise
-
updateStatus
public void updateStatus(@NotNull String projectId, ProjectCloudIntegrationStatus status)Description copied from interface:CloudProfilePersistorMarks cloud integration as enabled or disabled in this project.- Specified by:
updateStatusin interfaceCloudProfilePersistorstatus- false to disable could integration
-
setProfileEnabled
public boolean setProfileEnabled(@NotNull String projectId, String profileId, boolean isEnabled)Description copied from interface:CloudProfilePersistorMarks certain cloud profile as enabled or disabled.- Specified by:
setProfileEnabledin interfaceCloudProfilePersistorprofileId- id of profile to updateisEnabled- false to disable profile- Returns:
- is change applied successfully
-
updateProfile
@NotNull public CloudProfile updateProfile(@NotNull String projectId, @NotNull String profileId, @NotNull CloudProfileData newData)
Description copied from interface:CloudProfilePersistorUpdates currently persisted profile.- Specified by:
updateProfilein interfaceCloudProfilePersistorprofileId- profile id to updatenewData- new values
-
-