Package com.terminalfour.publish.data
data
package contains data objects relating to publish.
In general these are read-only equivalents of entities used throughout the Terminalfour application, although in some instances, transformations are carried out to better match to the tasks required during publish.
All standard data objects implement the IPDData
interface, which provides a single
default method called exists()
. This default method
always returns true
.
The Publish API has been designed in such a way as to minimize the potential for NullPointerException
s. As such,
in cases where data objects cannot be found, a skeleton data object that implements the IPDNotFound
interface
is returned. This interface extends the IPDData
interface and overrides the default
exists
method, altering it to instead return false
.
Consider the instance where there is no Content Item in the application with an id of 5432456. Attempting to load
the Content Item will result in the com.terminalfour.publish.data.PDContentListItem#NOT_FOUND
instance being returned.
var contentItem = apis.getContent ().get (5432456);
if (contentItem.exists ())
return "The Content item was found";
else
return "The Content item could not be found";
-
Interface Summary Interface Description IPDData Basic interface that is used as a basis for all data objects within the publish API. -
Class Summary Class Description DataUtils Simple utility functions relating to publish data.PDCache PDChannel PDContentItem PDContentListItem PDContentType PDContentTypeElement PDDateTime PDLanguage PDSection PDStatement PDVersion -
Enum Summary Enum Description PDContentItemType