plugins
Interface ITrainingsManager

All Known Implementing Classes:
TrainingsManager

public interface ITrainingsManager

encapsulates Trainingscalculation and data


Field Summary
static int PLAYERSTATUS_NO_MATCHDATA
           
static int PLAYERSTATUS_NO_MATCHDETAILS
           
static int PLAYERSTATUS_NOT_IN_LINEUP
           
static int PLAYERSTATUS_OK
           
static int PLAYERSTATUS_RED_CARD
           
 
Method Summary
 java.util.Vector calculateTrainings(java.util.Vector inputTrainings)
          calculates TrainingWeeks based on given input Vector and sets actual trainingsVector to result of calcultaion
 double getBasePoints(int trainType, int position)
          Returns the base points a player gets for this training type in a full match at this position
 java.util.List getMatchesForTraining(java.util.Calendar trainingDate)
          Creates a list of matches for the specified training
 int getMatchPosition(int matchId, int playerId)
          Returns the positionId for a player in a specific match If he is not in the lineup, return the player status (PLAYERSTATUS_*)
 int getMinutesPlayed(int matchId, int playerId)
          Calculates how long the player was on the field in the specified match
 int getPlayerStatus(int matchId, int playerId)
          Returns the player status (PLAYERSTATUS_*) for a player in a specific match
 ITrainingPerPlayer getTrainingPerPlayer()
          returns an empty ITrainingPerPlayer instance
 ITrainingPerPlayer getTrainingPerPlayer(ISpieler player)
          returns a ITrainingPerPlayer instance for a specific player
 ITrainingPoint getTrainingPoint()
          get a new training point instance
 ITrainingPoint getTrainingPoint(int year, int week, int type, int intensity, int staminaTrainingPart)
          get a new training point instance initialized with a new ITrainingWeek created by the arguments
 ITrainingPoint getTrainingPoint(ITrainingWeek trainWeek)
          get a new training point instance initialized with existing ITrainingWeek
 java.util.Vector getTrainingsVector()
          returns current TrainingVector calculates new vector if current is null
 void recalcSubskills(boolean showBar)
          Method to force a recalculation of decimal subskills
 

Field Detail

PLAYERSTATUS_OK

static final int PLAYERSTATUS_OK
See Also:
Constant Field Values

PLAYERSTATUS_NO_MATCHDATA

static final int PLAYERSTATUS_NO_MATCHDATA
See Also:
Constant Field Values

PLAYERSTATUS_NO_MATCHDETAILS

static final int PLAYERSTATUS_NO_MATCHDETAILS
See Also:
Constant Field Values

PLAYERSTATUS_NOT_IN_LINEUP

static final int PLAYERSTATUS_NOT_IN_LINEUP
See Also:
Constant Field Values

PLAYERSTATUS_RED_CARD

static final int PLAYERSTATUS_RED_CARD
See Also:
Constant Field Values
Method Detail

getTrainingPerPlayer

ITrainingPerPlayer getTrainingPerPlayer()
returns an empty ITrainingPerPlayer instance


getTrainingPerPlayer

ITrainingPerPlayer getTrainingPerPlayer(ISpieler player)
returns a ITrainingPerPlayer instance for a specific player


getTrainingPoint

ITrainingPoint getTrainingPoint()
get a new training point instance

Returns:
new training point

getTrainingPoint

ITrainingPoint getTrainingPoint(ITrainingWeek trainWeek)
get a new training point instance initialized with existing ITrainingWeek

Returns:
new training point

getTrainingPoint

ITrainingPoint getTrainingPoint(int year,
                                int week,
                                int type,
                                int intensity,
                                int staminaTrainingPart)
get a new training point instance initialized with a new ITrainingWeek created by the arguments

Returns:
new training point

getTrainingsVector

java.util.Vector getTrainingsVector()
returns current TrainingVector calculates new vector if current is null

Returns:
TODO Missing Return Method Documentation

calculateTrainings

java.util.Vector calculateTrainings(java.util.Vector inputTrainings)
calculates TrainingWeeks based on given input Vector and sets actual trainingsVector to result of calcultaion

Parameters:
inputTrainings - must be != null, empty vector if no trainings are preset
Returns:
Vector of trainingweeks

recalcSubskills

void recalcSubskills(boolean showBar)
Method to force a recalculation of decimal subskills

Parameters:
showBar - TODO Missing Constructuor Parameter Documentation

getMinutesPlayed

int getMinutesPlayed(int matchId,
                     int playerId)
Calculates how long the player was on the field in the specified match

Parameters:
matchId - the match to check
playerId - the player to check
Returns:
number of minutes the player was on the field

getPlayerStatus

int getPlayerStatus(int matchId,
                    int playerId)
Returns the player status (PLAYERSTATUS_*) for a player in a specific match

Parameters:
matchId - match id
playerId - player id
Returns:
player status

getMatchesForTraining

java.util.List getMatchesForTraining(java.util.Calendar trainingDate)
Creates a list of matches for the specified training

Parameters:
trainingDate - use this trainingDate
Returns:
list of matchIds (type Integer)

getBasePoints

double getBasePoints(int trainType,
                     int position)
Returns the base points a player gets for this training type in a full match at this position

Parameters:
trainType - training type
position - player position id
Returns:
base points

getMatchPosition

int getMatchPosition(int matchId,
                     int playerId)
Returns the positionId for a player in a specific match If he is not in the lineup, return the player status (PLAYERSTATUS_*)

Parameters:
matchId - match id
playerId - player id
Returns:
position id