com.microsoft.tfs.core.pendingcheckin
Class StandardPendingCheckinNotes

java.lang.Object
  extended by com.microsoft.tfs.core.pendingcheckin.StandardPendingCheckinNotes
All Implemented Interfaces:
PendingCheckinNotes

public class StandardPendingCheckinNotes
extends java.lang.Object
implements PendingCheckinNotes

Standard implementation of PendingCheckinNotes.

The AffectedTeamProjects object given during construction is permitted to change during the life time of a StandardPendingCheckinNotes object, and each call to evaluate() will use the most recent data from the AffectedTeamProjects object.

Since:
TEE-SDK-10.1
Thread-safety:
thread-safe

Constructor Summary
StandardPendingCheckinNotes(CheckinNote checkinNotes, VersionControlClient client, AffectedTeamProjects affectedTeamProjects)
          Constructs a standard PendingCheckinNotes object.
 
Method Summary
 void addNotesChangedListener(NotesChangedListener listener)
          Adds a listener that's invoked whenever user's check-in notes in the user interface are changed (via PendingCheckinNotes.setCheckinNotes(CheckinNote).
 CheckinNoteFailure[] evaluate()
          Evaluates the checkin notes that have been set on this object.
 CheckinNote getCheckinNotes()
          
 CheckinNoteFieldDefinition[] getFieldDefinitions()
          Gets the field definitions that the checkin note was last evaluated against.
 void removeNotesChangedListener(NotesChangedListener listener)
          Removes a listener that was previously added by PendingCheckinNotes.addNotesChangedListener(NotesChangedListener).
 void setCheckinNotes(CheckinNote checkinNotes)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardPendingCheckinNotes

public StandardPendingCheckinNotes(CheckinNote checkinNotes,
                                   VersionControlClient client,
                                   AffectedTeamProjects affectedTeamProjects)
Constructs a standard PendingCheckinNotes object.

Parameters:
checkinNotes - the notes set for the pending checkin (must not be null)
client - the version control client in use (must not be null)
affectedTeamProjects - team projects affected by this checkin (must not be null) This object is not modified by this implementation, but it is allowed to change while this PendingCheckinNotes object is alive.
Method Detail

evaluate

public CheckinNoteFailure[] evaluate()
Evaluates the checkin notes that have been set on this object. It is up to implementations of this class to provide a means of configuring the TFS connection and other version control information required to evaluate notes.

Specified by:
evaluate in interface PendingCheckinNotes
Returns:
any failures encountered during evaluation.

getCheckinNotes

public CheckinNote getCheckinNotes()

Specified by:
getCheckinNotes in interface PendingCheckinNotes
Returns:
the checkin notes to evaluate.

setCheckinNotes

public void setCheckinNotes(CheckinNote checkinNotes)

Specified by:
setCheckinNotes in interface PendingCheckinNotes
Parameters:
checkinNotes - the checkin notes to evaluate (must not be null)

getFieldDefinitions

public CheckinNoteFieldDefinition[] getFieldDefinitions()
Gets the field definitions that the checkin note was last evaluated against. If PendingCheckinNotes.evaluate() has not yet been called, returns null.

Specified by:
getFieldDefinitions in interface PendingCheckinNotes
Returns:
the field definitions (only non-null after PendingCheckinNotes.evaluate() has been called).

addNotesChangedListener

public void addNotesChangedListener(NotesChangedListener listener)
Adds a listener that's invoked whenever user's check-in notes in the user interface are changed (via PendingCheckinNotes.setCheckinNotes(CheckinNote).

Specified by:
addNotesChangedListener in interface PendingCheckinNotes
Parameters:
listener - the listener to add (must not be null)

removeNotesChangedListener

public void removeNotesChangedListener(NotesChangedListener listener)
Removes a listener that was previously added by PendingCheckinNotes.addNotesChangedListener(NotesChangedListener).

Specified by:
removeNotesChangedListener in interface PendingCheckinNotes
Parameters:
listener - the listener to remove (must not be null)


© 2015 Microsoft. All rights reserved.