com.xmlserv.app.links
Class Link

java.lang.Object
  |
  +--com.xmlserv.app.links.Link

public class Link
extends java.lang.Object

DB abstraction for Link data.


Constructor Summary
Link(java.sql.Connection con, int id)
          Open an existing Link.
Link(int rolegroup)
          Create new Link for the given rolegroup
 
Method Summary
 void delete(java.sql.Connection con)
           
 java.lang.String getComment()
           
 int getContentgroup()
           
 java.lang.String getDescription()
           
 int getId()
           
 int getRolegroup()
           
 java.lang.String getText()
           
 java.lang.String getUrl()
           
 boolean isExternal()
           
static org.jdom.Element list(java.sql.Connection con, int rolegroup, int contentgroup)
          List all links defined for the given rolegroup and contentgroup.
static org.jdom.Element list(java.sql.Connection con, int rolegroup, int contentgroup, boolean htmlFormat)
           
static org.jdom.Element listForArticle(java.sql.Connection con, int rolegroup, int article, boolean htmlFormat)
           
static org.jdom.Element listForArticles(java.sql.Connection con, int rolegroup, int article)
          List all links defined for the given rolegroup and article.
 void save(java.sql.Connection con)
          Save to DB.
 void setComment(java.lang.String comment)
           
 void setContentgroup(int contentgroup)
           
 void setDescription(java.lang.String description)
           
 void setExternal(boolean external)
           
 void setText(java.lang.String text)
           
 void setUrl(java.lang.String url)
           
 org.jdom.Element toElement()
          Convert to an Element.
 org.jdom.Element toElement(boolean htmlFormat)
          Convert to an Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Link

public Link(int rolegroup)
Create new Link for the given rolegroup

Link

public Link(java.sql.Connection con,
            int id)
     throws XMLServException
Open an existing Link.
Method Detail

save

public void save(java.sql.Connection con)
          throws XMLServException
Save to DB.

delete

public void delete(java.sql.Connection con)
            throws XMLServException

toElement

public org.jdom.Element toElement()
Convert to an Element.

toElement

public org.jdom.Element toElement(boolean htmlFormat)
Convert to an Element.

list

public static org.jdom.Element list(java.sql.Connection con,
                                    int rolegroup,
                                    int contentgroup)
                             throws XMLServException
List all links defined for the given rolegroup and contentgroup.

list

public static org.jdom.Element list(java.sql.Connection con,
                                    int rolegroup,
                                    int contentgroup,
                                    boolean htmlFormat)
                             throws XMLServException

listForArticles

public static org.jdom.Element listForArticles(java.sql.Connection con,
                                               int rolegroup,
                                               int article)
                                        throws XMLServException
List all links defined for the given rolegroup and article.

listForArticle

public static org.jdom.Element listForArticle(java.sql.Connection con,
                                              int rolegroup,
                                              int article,
                                              boolean htmlFormat)
                                       throws XMLServException

getId

public int getId()

getComment

public java.lang.String getComment()

setComment

public void setComment(java.lang.String comment)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

isExternal

public boolean isExternal()

setExternal

public void setExternal(boolean external)

getRolegroup

public int getRolegroup()

getContentgroup

public int getContentgroup()

setContentgroup

public void setContentgroup(int contentgroup)

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

getUrl

public java.lang.String getUrl()

setUrl

public void setUrl(java.lang.String url)