Class WatchedBuildsImpl
- java.lang.Object
-
- jetbrains.buildServer.notification.impl.WatchedBuildsImpl
-
- All Implemented Interfaces:
WatchedBuilds
,WatchedBuildsEx
public class WatchedBuildsImpl extends Object implements WatchedBuildsEx
-
-
Constructor Summary
Constructors Constructor Description WatchedBuildsImpl()
WatchedBuildsImpl(Collection<String> projectIds, Collection<String> buildTypesIds, Map<String,String> additionalData)
WatchedBuildsImpl(WatchedBuilds watchedBuilds)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBuildTypeToWatch(String buildTypeId)
void
addProjectToWatch(String projectId)
static WatchedBuildsImpl
createForSystemWide(Map<String,String> additionalData)
boolean
equals(Object o)
Map<String,String>
getAdditionalData()
Returns map of additional filter values like branch filter, user changes filter, ...String
getBranchFilter()
String
getBranchFilterWithDefault()
Set<String>
getBuildTypeIds()
Returns watched configurations ids.Set<String>
getProjectIds()
Returns watched project internal ids Is not affected by watched build configurations (configuration parent is not added)Long
getUserId()
If builds with changes are watched returns id of the watcherWatchType
getWatchType()
Returns type of this watchint
hashCode()
boolean
hasSelectedBuildTypes()
boolean
hasSelectedProjects()
boolean
isLocalRule()
boolean
isUnsubscribeRule()
boolean
isWatchAllBranches()
boolean
isWatchAllProjects()
boolean
isWatchCommittedBuilds()
boolean
isWatchFavoriteBuilds()
void
removeBuildTypesFromWatch(Set<String> buildTypeIds)
void
removeProjectsFromWatch(Set<String> projectIds)
void
setAdditionalData(Map<String,String> additionalData)
void
setBuildTypesToWatch(Set<String> buildTypeIds)
void
setProjectsToWatch(Set<String> projectIds)
void
setUserId(long id)
Sets the watcher idvoid
setWatchCommittedBuilds(boolean watchCommittedBuilds)
String
toString()
-
-
-
Constructor Detail
-
WatchedBuildsImpl
public WatchedBuildsImpl()
-
WatchedBuildsImpl
public WatchedBuildsImpl(@NotNull Collection<String> projectIds, @NotNull Collection<String> buildTypesIds, @NotNull Map<String,String> additionalData)
-
WatchedBuildsImpl
public WatchedBuildsImpl(@NotNull WatchedBuilds watchedBuilds)
-
-
Method Detail
-
createForSystemWide
public static WatchedBuildsImpl createForSystemWide(Map<String,String> additionalData)
-
getAdditionalData
@NotNull public Map<String,String> getAdditionalData()
Description copied from interface:WatchedBuildsEx
Returns map of additional filter values like branch filter, user changes filter, ... See UserRulesAwareNotificationListener for keys- Specified by:
getAdditionalData
in interfaceWatchedBuildsEx
- Returns:
-
setAdditionalData
public void setAdditionalData(@NotNull Map<String,String> additionalData)
- Specified by:
setAdditionalData
in interfaceWatchedBuildsEx
-
isWatchCommittedBuilds
public boolean isWatchCommittedBuilds()
- Specified by:
isWatchCommittedBuilds
in interfaceWatchedBuildsEx
-
isWatchFavoriteBuilds
public boolean isWatchFavoriteBuilds()
- Specified by:
isWatchFavoriteBuilds
in interfaceWatchedBuildsEx
-
isWatchAllBranches
public boolean isWatchAllBranches()
-
getBranchFilterWithDefault
@NotNull public String getBranchFilterWithDefault()
-
isLocalRule
public boolean isLocalRule()
-
getBranchFilter
public String getBranchFilter()
-
isUnsubscribeRule
public boolean isUnsubscribeRule()
-
setWatchCommittedBuilds
public void setWatchCommittedBuilds(boolean watchCommittedBuilds)
- Specified by:
setWatchCommittedBuilds
in interfaceWatchedBuildsEx
-
hasSelectedBuildTypes
public boolean hasSelectedBuildTypes()
- Specified by:
hasSelectedBuildTypes
in interfaceWatchedBuildsEx
- Returns:
- true if this WatchedBuilds is has at lease one watched build configuration. Is not affected by watched projects.
-
hasSelectedProjects
public boolean hasSelectedProjects()
- Specified by:
hasSelectedProjects
in interfaceWatchedBuildsEx
- Returns:
- true if this WatchedBuilds is has at lease one watched project. Is not affected by watched build configurations.
-
isWatchAllProjects
public boolean isWatchAllProjects()
- Specified by:
isWatchAllProjects
in interfaceWatchedBuildsEx
- Returns:
- true if this WatchedBuilds has Root project watched. Root project could be watched among with other projects and configurations.
-
addProjectToWatch
public void addProjectToWatch(@NotNull String projectId)
- Specified by:
addProjectToWatch
in interfaceWatchedBuildsEx
-
addBuildTypeToWatch
public void addBuildTypeToWatch(@NotNull String buildTypeId)
- Specified by:
addBuildTypeToWatch
in interfaceWatchedBuildsEx
-
getUserId
public Long getUserId()
Description copied from interface:WatchedBuilds
If builds with changes are watched returns id of the watcher- Specified by:
getUserId
in interfaceWatchedBuilds
- Returns:
- id of the watcher or null
-
setUserId
public void setUserId(long id)
Description copied from interface:WatchedBuildsEx
Sets the watcher id- Specified by:
setUserId
in interfaceWatchedBuildsEx
- Parameters:
id
- the user id
-
getProjectIds
@NotNull public Set<String> getProjectIds()
Description copied from interface:WatchedBuilds
Returns watched project internal ids Is not affected by watched build configurations (configuration parent is not added)- Specified by:
getProjectIds
in interfaceWatchedBuilds
- Returns:
- see above
-
getBuildTypeIds
@NotNull public Set<String> getBuildTypeIds()
Description copied from interface:WatchedBuilds
Returns watched configurations ids. Is not affected by watched projects (project children are not added)- Specified by:
getBuildTypeIds
in interfaceWatchedBuilds
- Returns:
- if there are watched configurations specified, returns their ids. Empty collection otherwise.
-
getWatchType
@NotNull public WatchType getWatchType()
Description copied from interface:WatchedBuilds
Returns type of this watch- Specified by:
getWatchType
in interfaceWatchedBuilds
- Returns:
- type of this watch
-
-