org.eggframework2.view.elements
Class AttributableImpl

java.lang.Object
  extended by org.eggframework2.view.elements.AttributableImpl
All Implemented Interfaces:
Attributable, IElement

public class AttributableImpl
extends java.lang.Object
implements Attributable

TODO [PL] Pomyslec nad nazwa tej klasy. [PL] Standardowa implementacja interfejsu Attributable.

Author:
Jacek Olszak

Constructor Summary
AttributableImpl(Attributable element)
           
 
Method Summary
 java.lang.String getAttribute(java.lang.String name)
          [PL] Zwraca wartość atrybutu o podanej nazwie
 java.util.Set<java.lang.String> getAttributeNames()
          [PL] Zwraca niemodyfikowalny zbiór nazw atrybutów (dodanie nowych/usunięcie istniejących nazw nie jest możliwe).
 void marshal(OutputBuilder builder)
          [PL] Szereguje swoją zawartość do obiektu OutputBuilder
 Attributable setAttribute(java.lang.String name, java.lang.String value)
          [PL] Dodaje nowy lub aktualizuje istniejący atrybut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributableImpl

public AttributableImpl(Attributable element)
Method Detail

setAttribute

public Attributable setAttribute(java.lang.String name,
                                 java.lang.String value)
                          throws java.lang.IllegalArgumentException
Description copied from interface: Attributable
[PL] Dodaje nowy lub aktualizuje istniejący atrybut

Specified by:
setAttribute in interface Attributable
Parameters:
name - [PL] Nazwa atrybutu.
value - [PL] Wartość atrybutu. Automatycznie konwertuje znaki specjalne (&, >, <, ") do encji Xhtml. Jeśli null to usuwa atrybut.
Returns:
[PL] Instancję elementu, na którym została wywołana ta metoda
Throws:
java.lang.IllegalArgumentException - [PL] Gdy nazwa jest null lub gdy nazwa atrybutu jest równa "id" i wartośc jest pustym łańcuchem tekstowym "".

getAttribute

public java.lang.String getAttribute(java.lang.String name)
                              throws java.lang.IllegalArgumentException
Description copied from interface: Attributable
[PL] Zwraca wartość atrybutu o podanej nazwie

Specified by:
getAttribute in interface Attributable
Throws:
java.lang.IllegalArgumentException - Gdy name jest null

getAttributeNames

public java.util.Set<java.lang.String> getAttributeNames()
Description copied from interface: Attributable
[PL] Zwraca niemodyfikowalny zbiór nazw atrybutów (dodanie nowych/usunięcie istniejących nazw nie jest możliwe). Natomiast dodawanie/usuwanie kolejnych atrybutów do elementu automatycznie modyfikuje ten zbiór.

Specified by:
getAttributeNames in interface Attributable

marshal

public void marshal(OutputBuilder builder)
Description copied from interface: IElement
[PL] Szereguje swoją zawartość do obiektu OutputBuilder

Specified by:
marshal in interface IElement


Copyright © 2010. All Rights Reserved.