com.arsdigita.content
Class ContentItem

java.lang.Object
  |
  +--com.arsdigita.content.ContentItem

public class ContentItem
extends java.lang.Object

represents an item in the content repository


Field Summary
static java.lang.String cvsId
           
 
Constructor Summary
ContentItem(javax.servlet.jsp.PageContext pc, java.lang.String url)
          Reads a new content item from the database.
 
Method Summary
 SingleSelection getContent()
           
 java.lang.String getContentType()
           
 void getFolderLabels(javax.servlet.jsp.PageContext pc, java.lang.String varName)
          Set a data source in the calling frame with folder URL and label Useful for generating a context bar.
 java.lang.Integer getItemId()
           
 java.lang.String getTemplateUrl()
           
 boolean hasContent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cvsId

public static final java.lang.String cvsId
Constructor Detail

ContentItem

public ContentItem(javax.servlet.jsp.PageContext pc,
                   java.lang.String url)
            throws java.sql.SQLException
Reads a new content item from the database. Given a URL, translate it to a content item, and set up attributes for that content item in the page context.
Parameters:
pc - the page context
url - the url of the content item in the content repository
Throws:
java.sql.SQLException - on database error
Method Detail

hasContent

public boolean hasContent()

getItemId

public java.lang.Integer getItemId()

getContentType

public java.lang.String getContentType()

getContent

public SingleSelection getContent()

getTemplateUrl

public java.lang.String getTemplateUrl()

getFolderLabels

public void getFolderLabels(javax.servlet.jsp.PageContext pc,
                            java.lang.String varName)
                     throws java.sql.SQLException
Set a data source in the calling frame with folder URL and label Useful for generating a context bar.
Parameters:
pc - the page context
varName - the name of the request attribute to create; default "folders" if null
Throws:
java.sql.SQLException - on database error