Package com.nurelm.nucontent.model

This package provides an object oriented interface to NuContent's data model from which any piece of content in an entire NuContent-powered site can be accessed or modified.

See:
          Description

Class Summary
Content A Content object represents one piece of text content within Page or RepeatItem objects.
Entity Extended to create User or Group objects.
EntityPK Application object ID class for Entity.
File Contains information corresponding to a file on the server's filesystem.
Group Represents a NuContent user group.
Image Object representing a NuContent image.
Link Represents a NuContent link.
Node The parent object of Page, Link, and File objects.
NodePK Application object ID class for Node.
NuSiteManager The NuSiteManager is a top level utility object that lets NuAPI users get Site objects.
Page Corresponds to a Web page in a NuContent application.
RepeatItem A RepeatItem represents one "line" in a RepeatList.
RepeatItem.RepeatItemComparator This inner class, implementing the java.util.Comparator class, is used by RepeatList to sort RepeatItem objects.
RepeatItemPK Application object ID class for RepeatItem.
RepeatList A RepeatList contains an list of RepeatItems.
ReviewRule  
Site Corresponds to a NuContent Web site.
SitePK Application object ID class for Site.
StandAloneFile Object representing a NuContent file.
Task This object represents an edit or review task in NuContent.
User This object corresponds to a user in a NuContent Web site.
UserValueObject This is a utility object used to pass around user information when a "live" user object is not needed.
 

Exception Summary
DataAccessException The only checked exception emitted by the CMS data layer.
 

Package com.nurelm.nucontent.model Description

This package provides an object oriented interface to NuContent's data model from which any piece of content in an entire NuContent-powered site can be accessed or modified.

NuContent objects are accessed via a hierarchy of objects that mirrors the structure of a site:


Site
|
|-- User
|    (TreeMap called "users")
|    (subclass of Entity)
|
|-- Group
|    (TreeMap called "groups")
|    (subclass of Entity)
|
L-- Page
    |(HashMap called "rootPages")
    |(subclass of Node)
    |
    |-- Content
    |    (HashSet called "contentSet")
    |
    |-- Image
    |    (HashSet called "imageSet")
    |
    |-- Node
    |    (ArrayList called "childNodeList")
    |    (subclasses include Page, Link, File, Image)
    |
    L-- RepeatList
        |(HashSet called "repeatListSet")
        |
        L-- RepeatItem
            |(ArrayList called "repeatItemList")
            |
            |-- Content
            |    (HashSet called "contentSet")
            |
            L-- Image
                 (HashSet called "imageSet")

Applications using this package do not need to be concerned with the underlying data structure, aside from following a few simple rules to access the API, and to avoid leaving unclosed data connections:
  1. Import the NuAPI package at the top of each JSP in which you will use it:

    <%@ page import="com.nurelm.nucontent.model.* %>

    Note that you can import other Java packages by putting them in this list separated by commas.
  2. Get the current Site or Page object from the JSP's request object:

    Site site = (Site) request.getAttribute("site");, or
    Page page = (Page) request.getAttribute("page");

    See the Site or Page documentation for information on retrieving information from these objects.
  3. Use the Site object to traverse the site, getting and using any NuAPI objects as needed.
  4. If the NuAPI is being used from within a JSP, then any DB connections will be automatically be closed by a filter after the page is processed.

    When using the NuAPI outside of a JSP, the NuSiteManager object's getSite() method must used to retrieve a site, and it is important to shutdown any data object connections by using the close() method of NuSiteManager.

  5. When inside a repeat tag, a JSP variable called repeatItemId will automatically be made available to the page, indicating the current repeat item's ID, which is useful when programatically accessing content in the current repeat item.