jetbrains.buildServer.serverSide
Class ResponsibilityInfo

java.lang.Object
  extended by jetbrains.buildServer.serverSide.ResponsibilityInfo
All Implemented Interfaces:
ResponsibilityEntry
Direct Known Subclasses:
BuildTypeResponsibilityEntryImpl, TestNameResponsibilityEntryImpl

public class ResponsibilityInfo
extends java.lang.Object
implements ResponsibilityEntry

Contains information about user responsibility for a build configuration. Build configuration may have active responsible isActive(), name of current or previous responsible is returned with getUser(). User comment, entered when he has taken responsibility or gave it up is returned by getComment(). If user fixed the build and marked it as 'done', method isFixed() will return true.

5.0 UPDATE: implements ResponsibilityEntry interface, the previous API has been marked as deprecated.


Nested Class Summary
 
Nested classes/interfaces inherited from interface jetbrains.buildServer.responsibility.ResponsibilityEntry
ResponsibilityEntry.State
 
Field Summary
protected  boolean myActive
           
protected  java.lang.String myComment
           
protected  boolean myDone
           
protected  java.util.Date myUpdated
           
protected  User myUser
          DEPRECATED SECTION.
protected  User myUserWhoPerformsTheAction
           
 
Constructor Summary
protected ResponsibilityInfo(ResponsibilityEntry.State state, User responsibleUser, User reporterUser, java.util.Date timestamp, java.lang.String comment)
           
 
Method Summary
static ResponsibilityInfo createActive(User responsibleUser, java.lang.String userComment, User userWhoPerformsTheAction)
          Deprecated. since 5.0 (use ResponsibilityEntryFactory)
static ResponsibilityInfo createInactive()
          Deprecated. since 5.0 (use ResponsibilityEntryFactory)
static ResponsibilityInfo createInactive(java.lang.String comment, boolean buildWasFixed, User userWhoPerformsTheAction)
          Deprecated. since 5.0 (use ResponsibilityEntryFactory)
 java.lang.String getComment()
          A user comment of the last state change.
 User getReporterUser()
          Returns the user who assigned the responsibility.
 User getResponsibleUser()
          Returns the user who is assigned responsible.
 java.util.Date getSince()
          Deprecated. since 5.0
 ResponsibilityEntry.State getState()
          Returns the current state.
 java.util.Date getTimestamp()
          Returns the time of last change of state.
 User getUser()
          Deprecated. since 5.0
 User getUserWhoPerformsTheAction()
          Deprecated. since 5.0
 boolean isActive()
          Deprecated. since 5.0
 boolean isFixed()
          Deprecated. since 5.0
 void setUser(User user)
          Deprecated. since 5.0
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myUser

protected User myUser
DEPRECATED SECTION. USE API ABOVE.


myUserWhoPerformsTheAction

protected User myUserWhoPerformsTheAction

myComment

protected java.lang.String myComment

myUpdated

protected java.util.Date myUpdated

myActive

protected boolean myActive

myDone

protected boolean myDone
Constructor Detail

ResponsibilityInfo

protected ResponsibilityInfo(@NotNull
                             ResponsibilityEntry.State state,
                             @NotNull
                             User responsibleUser,
                             @Nullable
                             User reporterUser,
                             @NotNull
                             java.util.Date timestamp,
                             @NotNull
                             java.lang.String comment)
Method Detail

getState

@NotNull
public ResponsibilityEntry.State getState()
Description copied from interface: ResponsibilityEntry
Returns the current state.

Specified by:
getState in interface ResponsibilityEntry
Returns:
current state

getResponsibleUser

@NotNull
public User getResponsibleUser()
Description copied from interface: ResponsibilityEntry
Returns the user who is assigned responsible.

Specified by:
getResponsibleUser in interface ResponsibilityEntry
Returns:
responsible user

getReporterUser

public User getReporterUser()
Description copied from interface: ResponsibilityEntry
Returns the user who assigned the responsibility.

Specified by:
getReporterUser in interface ResponsibilityEntry
Returns:
the reporter (or null, if unknown)

getTimestamp

@NotNull
public java.util.Date getTimestamp()
Description copied from interface: ResponsibilityEntry
Returns the time of last change of state.

Specified by:
getTimestamp in interface ResponsibilityEntry
Returns:
the timestamp

getComment

@NotNull
public java.lang.String getComment()
Description copied from interface: ResponsibilityEntry
A user comment of the last state change.

Specified by:
getComment in interface ResponsibilityEntry
Returns:
the comment

createActive

@Deprecated
public static ResponsibilityInfo createActive(User responsibleUser,
                                                         java.lang.String userComment,
                                                         User userWhoPerformsTheAction)
Deprecated. since 5.0 (use ResponsibilityEntryFactory)

Creates new active responsibilty info instance

Parameters:
responsibleUser - responsible user
userComment - responsibility comment about why responsibility set.
userWhoPerformsTheAction - user who performs the action
Returns:
created responsibility instance.
Since:
4.0.2

createInactive

@Deprecated
public static ResponsibilityInfo createInactive(java.lang.String comment,
                                                           boolean buildWasFixed,
                                                           User userWhoPerformsTheAction)
Deprecated. since 5.0 (use ResponsibilityEntryFactory)

Creates new inactive (non set, given up or fixed) responsibility object.

Parameters:
comment - comment about why responsibility status is changed.
buildWasFixed - true if the configuration was fixed.
userWhoPerformsTheAction - user who performs the action
Returns:
created inactive responsibility instance.
Since:
4.0.2

createInactive

public static ResponsibilityInfo createInactive()
Deprecated. since 5.0 (use ResponsibilityEntryFactory)

Creates new inactive (non set or given up) responsibility object with null comment.

Returns:
created inactive responsibility instance.

getUser

@Deprecated
public User getUser()
Deprecated. since 5.0

Returns:
responsible user

getUserWhoPerformsTheAction

@Deprecated
public User getUserWhoPerformsTheAction()
Deprecated. since 5.0

Returns:
user who performs the action

getSince

@Deprecated
public java.util.Date getSince()
Deprecated. since 5.0

Returns:
last responsibility updated date.

setUser

@Deprecated
public void setUser(@Nullable
                               User user)
Deprecated. since 5.0

Changes current responsible person.

Parameters:
user - new responsible person.

isActive

@Deprecated
public boolean isActive()
Deprecated. since 5.0

Returns:
true if responsibility is active (there is user who got responsibility for broken configuration)

isFixed

@Deprecated
public boolean isFixed()
Deprecated. since 5.0

Returns:
true if broken configuration is fixed (possible not actual fixed, but responsible person set fixed status for the build configuration).