concept.structure
Class Presentation

public class Presentation

Title: Presentation

Description: Presentation -class containing all the attributes and methods directly affecting presentations

Copyright: Copyright (c) 2006
CONCEPT-lisenssi Tekijänoikeus (c) 2006, Pekka Kuuva, Tatu Repo, Pasi Saari, Anna Seppänen. Kaikki oikeudet pidätetään. Tämän ohjelmiston levittäminen ja käyttö lähdekoodina ja binäärinä, muutettuna tai muuttamattomana, on sallittu edellyttäen, että seuraavat ehdot täytetään: 1. OHJELMISTON LEVITTÄMINEN Lähdekoodikopioissa, dokumentaatiossa ja muussa ohjelmiston mukana tulevassa aineistossa on oltava tämä lisenssi kokonaisuudessaan. 1.2. VIENTIRAJOITUKSET Ohjelmistoa tai sen osia ei saa viedä Amerikan Yhdysvaltoihin ilman tekijöiden erillistä suostumusta. 2. OHJELMISTON KÄYTTÖ (EULA) 2.1 KÄYTTÖEHDOT Ohjelmiston käyttäjän tulee joskus suorittaa vähintään yksi seuraavista toimista: a) Tarjota omalla kustannuksellaan olut tasokkaassa ravintolassa, pubissa tai muussa vastaavassa anniskelua harjoittavassa liikkeessä kullekin tekijöistä, sekä ilmoittaa tästä tarjouksesta. b) Tarjota tekijöille omalla kustannuksellaan pääsy tapahtumaan, jonka yhteydessä sovellusta on käytetty, ja ilmoittaa tästä tarjouksesta tekijöille. Ilmoittamisella tarkoitetaan vähintään viikkoa ennen tarjouk- sen täytäntöönpanoa tekijöille lähetettyä sähköpostia, jossa ilmoitetaan ohjelmiston käyttäjän nimi ja yhteystiedot sekä tarjous ja sen ajankohta. Jos käyttöehdot eivät ole täyttyneet, ohjelmistoa ei saa käyttää. 2.1. TAKUU Tekijänoikeuden haltijat ja ohjelmiston kehittäjät tarjoavat tämän ohjelmiston "sellaisena kuin se on". Sovellukselle ei myönnetä minkäänlaista takuuta kaupallisesti hyväksyttävästä laadusta eikä sen taata soveltuvan mihinkään tarkoitukseen. 2.2. VASTUUNRAJOITUS Tekijänoikeuden haltija ja ohjelmiston kehittäjät eivät ole missään tilanteessa vastuussa suorista, epäsuorista, yleisistä, erityisistä, satunnaisista tai seurauksellisista vahingoista (sisältäen, muttei tyhjentävästi, korvaavan tuotteen tai palvelun hankinnan, käyttömahdollisuuden, tiedon tai voittojen menetykset, tai liiketoiminnan keskeytymisen), jotka aiheutuvat miten tahansa ja millä tahansa vahingonkorvausoikeudellisella perusteella mukaanlukien sopimusvastuu, ankara vastuu ja sopimuksen ulkoinen vastuu (huolimattomuus tai muu), vaikka kyseisten vahinkojen mahdollisuudesta olisi kerrottu.

Version:
1.0
Author:
TR
Constructor Detail

Presentation

public Presentation(concept.structure.Topic topic,
                    concept.structure.Type type,
                    java.lang.String title,
                    int duration,
                    int grade,
                    boolean isFromDB)
A full constructor for the Presentation-class
Parameters:
topic - Topic
type - Type
title - String
duration - int
grade - int
isFromDB - boolean

Method Detail

containsRestricted

public boolean containsRestricted()
Checks whether this presentation contains restricted elements.
Returns:
boolean Returns whether this presentation contains restricted elements.

containsUnRegistered

public boolean containsUnRegistered()
Checks whether this presentation contains unregistered presenters.
Returns:
boolean Returns whether this presentation contains unresgistered presenters.

compareRestrictionsWithRestriction

public java.util.Vector compareRestrictionsWithRestriction(concept.structure.ScheduleRestriction restr,
                                                           concept.structure.Session link)
Compares all the restrictions of this presentation and its presenters against the given restriction. Ignores restrictions caused by the given session.
Parameters:
restr - ScheduleRestriction The given restriction.
link - Session The given session.
Returns:
Vector Returns the conflicts found during the comparison.

compareRestrictionsWithTime

public java.util.Vector compareRestrictionsWithTime(long start,
                                                    long end,
                                                    concept.structure.Session link)
Compares all the restrictions of this presentation and its presenters against a dummy-restriction created from the parameters. Ignores restrictions caused by the given session.
Parameters:
start - long The given starttime for the dummy-restriction.
end - long The given endtime for the dummy-restriction.
link - Session The given session.
Returns:
Vector Returns the conflicts found during the comparison.

addLowerRestriction

public boolean addLowerRestriction(concept.structure.ScheduleRestriction restr)
Adds a restriction to the accumulatedrestrictions of this presentation.
Parameters:
restr - ScheduleRestriction The given restriction.
Returns:
boolean Returns whether the operation was successful.

addLowerRestrictionFromDB

public boolean addLowerRestrictionFromDB(concept.structure.ScheduleRestriction restr)
Adds a restriction to the accumulatedrestrictions of this presentation. Does not invoke the isChanged-flag.
Parameters:
restr - ScheduleRestriction The given restriction.
Returns:
boolean Returns whether the operation was successful.

addRcbs

public concept.structure.ScheduleRestriction addRcbs(concept.structure.Session session)
Adds a restriction caused by the given session to this presentation.
Parameters:
session - Session The given session.
Returns:
ScheduleRestriction Returns the created restriction.

getRcbs

public concept.structure.ScheduleRestriction getRcbs(concept.structure.Session session)
Returns the first instance of restrictions caused by the given session.
Parameters:
session - Session The given session.
Returns:
ScheduleRestriction Returns the found restriction or null.

gatherRestrictions

public boolean gatherRestrictions()
A method to gather all the lower restrictions for this presentation
Returns:
boolean return true when done

removeRestrictionsByRcbs

public boolean removeRestrictionsByRcbs(concept.structure.Session session)
Removes all the restrictions caused by the given session from this presentation. Utilizes the ScheduleRestrictions-class' removeRestrictionsByRcbs-method.
Parameters:
session - Session The given session.
Returns:
boolean Returns whether the operation was successful.

getRestrictions

public java.util.Vector getRestrictions()
Returns all the accumulated restrictions of this presentation.
Returns:
Vector Returns all the accumulated restrictions of this presentation.

addPresenterFromDB

public boolean addPresenterFromDB(concept.structure.Presenter presenter)
A method to add presenter without invoking the isChanged -flag. Also handles the linking on the presenterside. This method is for Jdbc-class' read-methods.
Parameters:
presenter - Presenter incoming presenter to be added
Returns:
boolean returns whether the adding was successful

removePresenter

public boolean removePresenter(concept.structure.Presenter presenter)
Removes the given presenter from this presentation. Not used.
Parameters:
presenter - Presenter The given presenter.
Returns:
boolean Returns whether the operation was successful.

getPresenterIndex

public int getPresenterIndex(concept.structure.Presenter presenter)
Returns the index of the given presenter.
Parameters:
presenter - Presenter The given presenter.
Returns:
int Returns the index or -1 if not found.