org.malai.presentation
Class Presentation<A extends AbstractPresentation,C extends ConcretePresentation>

java.lang.Object
  extended by org.malai.presentation.Presentation<A,C>
Type Parameters:
A - The type of the abstract presentation.
C - The type of the concrecte presentation.
All Implemented Interfaces:
Modifiable, Reinitialisable

public class Presentation<A extends AbstractPresentation,C extends ConcretePresentation>
extends java.lang.Object
implements Modifiable, Reinitialisable

A presentation contains an abstract presentation and a concrete presentation. The goal of a presentation is to provide users with data (the abstract presentation) transformed to be displayable (the concrete presentation).

This file is part of libMalai.
Copyright (c) 2009-2012 Arnaud BLOUIN

libMalan is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

libMalan is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Since:
0.1
Version:
0.1
Author:
Arnaud BLOUIN

Field Summary
protected  A abstractPresentation
          The abstract presentation, i.e. the manipulated data model.
protected  C concretePresentation
          The concrete presentation, i.e. the representation of the abstract presentation.
 
Constructor Summary
Presentation(A absPres, C concPres)
          Creates a presentation.
 
Method Summary
 A getAbstractPresentation()
           
 C getConcretePresentation()
           
 boolean isModified()
           
 void reinit()
          Reinitialises the presentation (its concrete and abstract presentations).
 void setModified(boolean modified)
          Sets the Modifiable object as modified.
 void update()
          Updates the presentation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

abstractPresentation

protected A extends AbstractPresentation abstractPresentation
The abstract presentation, i.e. the manipulated data model.


concretePresentation

protected C extends ConcretePresentation concretePresentation
The concrete presentation, i.e. the representation of the abstract presentation.

Constructor Detail

Presentation

public Presentation(A absPres,
                    C concPres)
Creates a presentation.

Parameters:
absPres - The abstract presentation, i.e. the manipulated data model.
concPres - The concrete presentation, i.e. the representation of the abstract presentation.
Throws:
java.lang.IllegalArgumentException - If one of the given argument is null.
Since:
0.1
Method Detail

setModified

public void setModified(boolean modified)
Description copied from interface: Modifiable
Sets the Modifiable object as modified.

Specified by:
setModified in interface Modifiable
Parameters:
modified - True: the element is will tagged as modified.

isModified

public boolean isModified()
Specified by:
isModified in interface Modifiable
Returns:
True: the object has been modified. False otherwise.

getAbstractPresentation

public A getAbstractPresentation()
Returns:
The abstract presentation, i.e. the manipulated data model.
Since:
0.1

getConcretePresentation

public C getConcretePresentation()
Returns:
The concrete presentation, i.e. the representation of the abstract presentation.
Since:
0.1

update

public void update()
Updates the presentation.

Since:
0.2

reinit

public void reinit()
Reinitialises the presentation (its concrete and abstract presentations).

Specified by:
reinit in interface Reinitialisable
Since:
0.2