java/nekurak.net-lib/src/cz/frantovo/nekurak/ejb/PodnikRemote.java
author František Kučera <franta-hg@frantovo.cz>
Mon Nov 07 20:31:44 2011 +0100 (2011-11-07)
changeset 197 40b7aa9126d0
parent 176 2472d9e9c0aa
permissions -rw-r--r--
Podpora Markdown syntaxe pro komentáře.
franta-hg@28
     1
package cz.frantovo.nekurak.ejb;
franta-hg@28
     2
franta-hg@170
     3
import cz.frantovo.nekurak.dto.Kategorie;
franta-hg@130
     4
import cz.frantovo.nekurak.dto.Komentar;
franta-hg@171
     5
import cz.frantovo.nekurak.dto.Kurackost;
franta-hg@28
     6
import cz.frantovo.nekurak.dto.Podnik;
franta-hg@107
     7
import cz.frantovo.nekurak.dto.VysledekHlasovani;
franta-hg@132
     8
import cz.frantovo.nekurak.vyjimky.KomentarovaVyjimka;
franta-hg@197
     9
import cz.frantovo.nekurak.vyjimky.WikiSyntaxVyjimka;
franta-hg@28
    10
import java.util.Collection;
franta-hg@28
    11
import javax.ejb.Remote;
franta-hg@28
    12
franta-hg@28
    13
/**
franta-hg@28
    14
 *
franta-hg@28
    15
 * @author fiki
franta-hg@28
    16
 */
franta-hg@28
    17
@Remote
franta-hg@39
    18
public interface PodnikRemote {
franta-hg@28
    19
franta-hg@145
    20
	public Collection<Podnik> getPodniky();
franta-hg@40
    21
franta-hg@170
    22
	public Collection<Podnik> getPodniky(Kategorie kategorie);
franta-hg@170
    23
franta-hg@171
    24
	public Collection<Podnik> getPodniky(Kurackost kurackost);
franta-hg@171
    25
franta-hg@145
    26
	public void zalozPodnik(Podnik p);
franta-hg@40
    27
franta-hg@145
    28
	public void upravPodnik(Podnik p);
franta-hg@67
    29
franta-hg@145
    30
	public Podnik getPodnik(int id);
franta-hg@100
    31
franta-hg@176
    32
	/**
franta-hg@176
    33
	 * Dopočítá souřadnice podle adresy podniku.
franta-hg@176
    34
	 * @return počet podniků u nichž jsme našli souřadnice
franta-hg@176
    35
	 */
franta-hg@145
    36
	public int dopocitejSouradnice();
franta-hg@107
    37
franta-hg@145
    38
	/**
franta-hg@145
    39
	 * Zaznamená hlas uživatele
franta-hg@145
    40
	 * @param podnik ID podniku
franta-hg@145
    41
	 * @param hlas true = kuřácký | false = nekuřácký
franta-hg@145
    42
	 * @param ipAdresa IP adresa uživatele, který hlasuje
franta-hg@145
    43
	 */
franta-hg@145
    44
	public void hlasuj(int podnik, boolean hlas, String ipAdresa);
franta-hg@107
    45
franta-hg@145
    46
	/**
franta-hg@145
    47
	 * @return agregované výsledky hlasování pro daný podnik
franta-hg@145
    48
	 */
franta-hg@164
    49
	public VysledekHlasovani getVysledekHlasovani(Podnik podnik);
franta-hg@130
    50
franta-hg@145
    51
	/**
franta-hg@145
    52
	 * @param k komentář, který se má přidat k podniku
franta-hg@145
    53
	 * @param uloz true = vloží komentář | false = pouze zkontroluje (naformátuje obsah komentáře)
franta-hg@145
    54
	 */
franta-hg@197
    55
	public Komentar komentuj(Komentar k, boolean uloz) throws KomentarovaVyjimka, WikiSyntaxVyjimka;
franta-hg@28
    56
}