Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Package com.RuntimeCollective.content.bean

The Content module defines the Content contract for the Josephine framework, as well as a collection of basic types of Content (TextComponent, File, Image).

See:
          Description

Interface Summary
Content Interface to implement if you want an object to be considerable as a piece of content.
DublinCore An interface that allows access to Dublin Core v1-1 metadata stored in the implementing object.
 

Class Summary
ComplexContent A piece of content made up of one or more pieces of subcontent.
Editor Deprecated. This class shouldn't be used anymore - use the Permissions packages instead.
File The File class will hold the content of a file, either directly, or via a filename reference.
ForwardLink The ForwardLink class implements the Link abstract class, using a URL.
Image The Image class contains a reference to a File, and some metadata (for now a simple caption).
Link The Link abstract class describes a Link entity, obviously.
SimpleContent A basic implementation of Content, which you shouldn't instantiate as is, but subclass.
TextComponent This class is a basic Content holding a piece of text.
URLLink The URLLink class implements the Link abstract class, using a URL.
 

Package com.RuntimeCollective.content.bean Description

The Content module defines the Content contract for the Josephine framework, as well as a collection of basic types of Content (TextComponent, File, Image). It also contains an extension of webapps.bean.User called Editor, which can have admin and/or editor permissions.


1. Using Content beans

The content.bean.Content interface states clearly what you can do with a Content bean. The most important aspects are:

2. Existing types of Content

The basic types of Content necessary to build an application are already defined, namely:

3. Creating a new type of Content

The content.bean.Content defines the contract an EntityBean has to satisfy in order to be considerable as a Content. As such, *any* EntityBean class can be made into a Content. But if you are creating a new type of Content from scratch, your best bet is to extend the abstract content.bean.SimpleContent, which already implements part of the Content functionality.

Most of your job will consist in 1/ deciding what data to store, 2/ choosing which format to support, 3/ overriding getTitle() and getDescription() so that they return some meaningful data, and 4/ overriding viewFormat(format) so that it supports the format you need and returns suitable views of the Content.