public interface Article extends IOObject
Article
interface represents read-only Article
objects in the
Escenic system. Since version 5.0 the terminology has been changed to "Content", but the api uses "Article" for
backward compatibility. To learn about how to define content types and work with Escenics object model in general
refer to the Template Developers Guide.ArticleTransaction
,
Type
IOAtom.ObjectType
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_RELATION_TYPE
Default relation type.
|
static int |
HIDDEN_ARTICLE_PRIORITY
Priority for hidden articles.
|
static String |
INLINE_RELATION_TYPE
Relation type for inline relations.
|
static int |
MAIN_IN_TOPIC_PRIORITY
Priority for articles that are main articles in one or more topics.
|
ID_INVALID, OBJECTTYPE_AGREEMENTINFO, OBJECTTYPE_ARTICLE, OBJECTTYPE_CATALOG, OBJECTTYPE_CATEGORY, OBJECTTYPE_ENTITY, OBJECTTYPE_FORUM, OBJECTTYPE_LAYOUT, OBJECTTYPE_MAX, OBJECTTYPE_MIN, OBJECTTYPE_PERSON, OBJECTTYPE_POOL, OBJECTTYPE_POSTING, OBJECTTYPE_PRESENTATION_FORUM, OBJECTTYPE_PRESENTATION_POSTING, OBJECTTYPE_PRESENTATION_THREAD, OBJECTTYPE_PROFILE, OBJECTTYPE_PUBLICATION, OBJECTTYPE_SECTION, OBJECTTYPE_THREAD, OBJECTTYPE_TOPIC, OBJECTTYPE_UNKNOWN, OBJECTTYPE_USERGROUP
Modifier and Type | Method and Description |
---|---|
Timestamp |
getActivateDate()
Retrieves time when this article will be activated on the web.
|
AgreementInfo |
getAgreementInfo()
Retrieves the agreement that belongs to this article.
|
neo.xredsys.content.type.ArticleType |
getArticleType()
Retrieves the type of article.
|
Person |
getAuthor()
Retrieves the author of this article.
|
Person[] |
getAuthors()
Retrieves the authors of this article.
|
Map |
getCategories()
Deprecated.
|
Set |
getCategories(String fieldName)
Deprecated.
|
int |
getContentId()
Deprecated.
not in use
|
int |
getContentId(Type pContentType)
Deprecated.
not in use
|
Map<String,List<ContentSummary>> |
getContentSummaries()
Returns all
content summaries associated with the article. |
List<ContentSummary> |
getContentSummaries(String pRelationType)
Returns a list of
content summaries associated with the article. |
Timestamp |
getCreationDate()
Retrieves the date when this article was created.
|
Type |
getDefaultContentType()
Deprecated.
no replacement
|
Map<String,String> |
getElements()
Deprecated.
|
String |
getElementText(String key)
Deprecated.
use
getFieldValue(String) instead |
Timestamp |
getExpireDate()
Retrieves the time when this article will expire from the web.
|
FieldValue |
getField(String pKey)
Returns the field value object that belongs to this key.
|
Object |
getFieldValue(String pKey)
Retrieve the object that belongs to this key.
|
Timestamp |
getFirstPublished()
Retrieves the date when this article was first published.
|
Section |
getHomeSection()
Retrieves the section to which this article belongs.
|
int |
getHomeSectionId()
Retrieves the id of the section to which this article belongs.
|
Type |
getLanguage()
Deprecated.
not implemented
|
Type |
getLanguage(Type pContentType)
Deprecated.
not implemented
|
Person |
getLastEditedBy()
Retrieves the most recent log entriy for the specified article.
|
Timestamp |
getLastModified()
Retrieves the date when this article was last modified.
|
Layout |
getLayout()
Deprecated.
no replacement
|
int |
getLayoutId()
Deprecated.
no replacement
|
Section |
getLocalHomeSection(int pPublicationId)
Retrieves the article's homesection.
|
Set<Section> |
getLocalHomeSections()
Retrieves all the local home sections to which this article belongs.
|
String |
getLocalUrl(int pPublicationId)
Retrieves the local url to this article based on the given publication id.
|
Set<String> |
getLocalUrls(int pPublicationId)
Retrieves the local urls to this article based on the given publication id.
|
Collection<ArticleLog> |
getLogEntries()
Retrieves all log entries belonging to the specified article.
|
Type |
getOriginalState()
Deprecated.
no replacement
|
Person[] |
getPersonRoleKeepers(Type paType)
Retrieves persons that have the given role on this article.
|
List<PersonSummary> |
getPersonSummaries()
Returns all authors, native and foreign, to the content item.
|
Pool[] |
getPools()
Retrieves all pools that this article is present in.
|
String |
getPreviewToken()
Generate a token to be used when preview an article.
|
String |
getPreviewUrl()
Retrieves the preview url of this article.
|
boolean |
getPrinted()
Deprecated.
not in use
|
int |
getPriority()
Retrieves the priority of this article.
|
int[] |
getPublicationIds()
Retrieves the ids of all publications this article is added to.
|
Timestamp |
getPublishDate()
Retrieves the time when this article was last published.
|
Article |
getPublishedVariant()
Returns the published variant
|
ReferenceEntity[] |
getReferenceEntities()
Deprecated.
use
getContentSummaries() instead |
IORelation[] |
getReferredEntities()
Deprecated.
use
getContentSummaries(String) instead. |
IORelation[] |
getReferredEntities(Type pEntityType)
Deprecated.
use
getContentSummaries(String) instead. |
IORelation[] |
getReferredPersons()
Deprecated.
use
getRoleKeepers() instead |
Article[] |
getRelatedAPIArticles()
Retrieves all related articles.
|
IORelation[] |
getRelatedArticles()
Deprecated.
use
getContentSummaries(String) instead. |
URI |
getRelativeURI()
Retrieves the relative part of the url.
|
Set<URI> |
getRelativeURIs()
|
String |
getRelativeUrl()
Deprecated.
use the {@link #getRelativeURI() instead.
|
IORelation[] |
getRoleKeepers()
Retrieves the role keepers of the article.
|
IORelation[] |
getRoleKeepers(Type roleType)
Retrieves all persons that have the given role on this article.
|
Section[] |
getSections()
Retrieves all sections where this article is present.
|
Section[] |
getSections(boolean includeVirtualSections)
Retrieves all sections where this article is present.
|
String |
getSource()
Retrieves this article's source.
|
String |
getSourceId()
Retrieves this article's source id.
|
Type |
getState()
Retrieves this article's state.
|
Timestamp |
getStateChange()
Retrieves the date when this article was last changed.
|
String |
getStrippedElementText(String key)
Deprecated.
|
List<TagRelation> |
getTags()
Returns an unmodifiable
List of TagRelation 's for this article. |
String |
getTitle()
Retrieves the default title of this articles xml content.
|
Topic[] |
getTopics()
Deprecated.
Topics have been removed in v5.0
|
Type |
getType()
Retrieves this article's type.
|
String |
getUrl()
Retrieves the url to this article.
|
boolean |
has(Tag pTag)
Returns
true if the given Tag is already added. |
boolean |
inPool(Pool pool)
Checks whether or not this article is in the given pool.
|
boolean |
inSection(int sectionId)
Checks whether or not this article is in the given section.
|
boolean |
isAgreementRequired()
Checks whether or not you need an agreement to publish this article.
|
boolean |
isLive()
Checks if this article is activated on the web or not.
|
boolean |
isLive(Date pDate)
Checks if this article is activated on the web or not.
|
boolean |
isLogging()
Checks whether or not a log entry will be created when this article is modified.
|
boolean |
isStaged()
Returns true if this is the staged variant of the article.
|
ContentHandler |
parseField(String pKey,
ContentHandler pHandler)
Deprecated.
|
ContentSummary |
toContentSummary()
Converts this content to a
ContentSummary that can be used to relate other content to this content. |
breakAndLock, createTransaction, getChecksum, getHashKey, getId, getLockKeeper, getObjectType, getOwnerPublicationId, getProtectionDomain, getProtectionDomains, isLocked, isPreview, isValid, lock, lock, lock, lock, refresh
static final String DEFAULT_RELATION_TYPE
static final String INLINE_RELATION_TYPE
static final int HIDDEN_ARTICLE_PRIORITY
static final int MAIN_IN_TOPIC_PRIORITY
Type getDefaultContentType()
Type
representation of this article's default content typeint[] getPublicationIds() throws PersistentStoreException
PersistentStoreException
- if an error occurs in the persistence layerSection getLocalHomeSection(int pPublicationId) throws PersistentStoreException, NoSuchObjectException
pPublicationId
- find home section in this publicationPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existSection getHomeSection() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existSet<Section> getLocalHomeSections() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existint getHomeSectionId() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existSection[] getSections() throws PersistentStoreException, NoSuchObjectException
Section
s where this article is present.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existSection[] getSections(boolean includeVirtualSections) throws PersistentStoreException, NoSuchObjectException
includeVirtualSections
is set to true.includeVirtualSections
- if it set to true the virtual sections will
be included; else they are skippedSection
s where this article is present.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existVirtualSection
@Deprecated Topic[] getTopics() throws PersistentStoreException, NoSuchObjectException
Array
of all topics that this article is added to; an empty array if it is not placed in any topicsPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTopic
Pool[] getPools() throws PersistentStoreException, NoSuchObjectException
Pool
objectsPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existPool
boolean inPool(Pool pool) throws PersistentStoreException
pool
- the pool in which to search for this articlePersistentStoreException
- if an error occurs in the persistence layer@Deprecated IORelation[] getReferredEntities() throws PersistentStoreException, NoSuchObjectException
getContentSummaries(String)
instead.ReferenceEntity
.IORelation
objectsPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existReferenceEntity
,
IORelation
ReferenceEntity[] getReferenceEntities() throws PersistentStoreException, NoSuchObjectException
getContentSummaries()
insteadReferenceEntity
objects that are related to this article.ReferenceEntity
objectsPersistentStoreException
- if some database error occursNoSuchObjectException
- if referring to an IOObject that does not existReferenceEntity
IORelation[] getReferredPersons() throws PersistentStoreException, NoSuchObjectException
getRoleKeepers()
insteadPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existPerson
,
ReferenceEntity
,
IORelation
@Deprecated IORelation[] getReferredEntities(Type pEntityType) throws PersistentStoreException, NoSuchObjectException
getContentSummaries(String)
instead.TypeManager.getTypes(neo.xredsys.api.Type.Category)
.pEntityType
- the type of related objects to retrieveIORelation
s of the given typePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not exist@Deprecated IORelation[] getRelatedArticles() throws PersistentStoreException, NoSuchObjectException
getContentSummaries(String)
instead.IORelation
arrayPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIORelation
Article[] getRelatedAPIArticles() throws PersistentStoreException, NoSuchObjectException
Article
arrayPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existList<ContentSummary> getContentSummaries(String pRelationType)
content summaries
associated with the article.pRelationType
- the name of the types of summaries that should be returned. May not be null
.List
of content summaries
. This will never return null
Map<String,List<ContentSummary>> getContentSummaries()
content summaries
associated with the article.Map
of relation types
to lists
of content summaries
. This will never return null
List<PersonSummary> getPersonSummaries()
List
of PersonSummary
objects
representing native and foreign authors to the content item. Will
never return null
IORelation[] getRoleKeepers() throws PersistentStoreException, NoSuchObjectException
TypeManager.getTypes(neo.xredsys.api.Type.Category)
. Typical role keepers are:
IORelation
arrayPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTypeManager
IORelation[] getRoleKeepers(Type roleType) throws PersistentStoreException, NoSuchObjectException
getRoleKeepers()
for details on role keepers.roleType
- the type of role the persons to retrieve should have on this articleIORelation
objectsPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTypeManager
Person[] getPersonRoleKeepers(Type paType) throws PersistentStoreException, NoSuchObjectException
getRoleKeepers()
for details on role keepers.paType
- the role persons must have on this articlePerson
objectsPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTypeManager
Layout getLayout() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existLayout
int getLayoutId() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existLayout
Type getType() throws PersistentStoreException, NoSuchObjectException
Article
documentation for details on article types.Type
representation of this article's typePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTimestamp getStateChange() throws PersistentStoreException, NoSuchObjectException
Timestamp
representation of the time when this article last had it's state changedPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existint getPriority() throws PersistentStoreException, NoSuchObjectException
Article
interface. For example:
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not exist@Deprecated boolean getPrinted() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTimestamp getActivateDate() throws PersistentStoreException, NoSuchObjectException
Timestamp
representation of the time when this article will be activated on the webPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTimestamp getExpireDate() throws PersistentStoreException, NoSuchObjectException
Timestamp
representation of the time when this article will expire from the webPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTimestamp getPublishDate() throws PersistentStoreException, NoSuchObjectException
Timestamp
representation of the time when this article was last publishedPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existType getState() throws PersistentStoreException, NoSuchObjectException
TypeManager.getTypes(neo.xredsys.api.Type.Category)
method.
Typical states are:
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existType
,
TypeManager
Type getOriginalState() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existString getSource() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existString getSourceId() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not exist@Deprecated int getContentId() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not exist@Deprecated int getContentId(Type pContentType) throws PersistentStoreException, NoSuchObjectException
pContentType
- the type of contentPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not exist@Deprecated Type getLanguage() throws PersistentStoreException, NoSuchObjectException
Type
representation of the language of the default (xml) contentPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not exist@Deprecated Type getLanguage(Type pContentType) throws PersistentStoreException, NoSuchObjectException
pContentType
- the content typeType
representation of the language of the specified (xml) contentPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existString getTitle() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existString getLocalUrl(int pPublicationId) throws PersistentStoreException, NoSuchObjectException
pPublicationId
- the id of the publication to retrieve the section part of this url fromPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existSet<String> getLocalUrls(int pPublicationId) throws PersistentStoreException, NoSuchObjectException
pPublicationId
- the id of the publication to retrieve the section part of this url fromPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existString getUrl() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not exist@Deprecated String getRelativeUrl()
URI getRelativeURI()
Set<URI> getRelativeURIs()
Set
of all the relative URI
's of the articlegetRelativeURI()
String getPreviewUrl() throws PersistentStoreException, NoSuchObjectException
getUrl()
is
the publication part of the returned url. In this case the publication part of the url will be retrieved from
the "publication.previewURL" property in features.properties.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existString getPreviewToken()
@Deprecated Map<String,String> getElements() throws PersistentStoreException, NoSuchObjectException
All possible elements for this article is defined in articleTypes.xml. See Article
for details on
article types.
Map
of String
elements belonging to this articlePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not exist@Deprecated String getElementText(String key)
getFieldValue(String)
insteadgetElements()
for
details on elements.key
- the element key to retrieve the text bygetElements()
Object getFieldValue(String pKey)
pKey
- the key to findFieldValue getField(String pKey)
null
pKey
- the key to find.@Deprecated ContentHandler parseField(String pKey, ContentHandler pHandler) throws IOException, SAXException
pKey
- The name of the fieldpHandler
- The content handler to use with the sax parserIOException
- if an i/o related exception occurs during parsingSAXException
- if the article field contains invalid xmlboolean inSection(int sectionId) throws PersistentStoreException, NoSuchObjectException
sectionId
- the id of the section in which to search for this articlePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTimestamp getLastModified() throws PersistentStoreException, NoSuchObjectException
Timestamp
representation of the date when this article was last modified.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTimestamp getCreationDate() throws PersistentStoreException, NoSuchObjectException
Timestamp
representation of the date when this article was createdPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTimestamp getFirstPublished() throws PersistentStoreException, NoSuchObjectException
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existPerson getAuthor()
Person[] getAuthors()
Person
arrayneo.xredsys.content.type.ArticleType getArticleType() throws PersistentStoreException, NoSuchObjectException
Article
for details on article types.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existboolean isLive()
boolean isLive(Date pDate)
pDate
- is the article live at given date?boolean isAgreementRequired()
AgreementInfo getAgreementInfo()
AgreementInfo
Collection<ArticleLog> getLogEntries() throws PersistentStoreException, NoSuchObjectException
Collection
of ArticleLog
objectsPersistentStoreException
- if some database error occursNoSuchObjectException
- if referring to an object that does not existArticleLog
Person getLastEditedBy() throws PersistentStoreException, NoSuchObjectException
Collection
of ArticleLog
objectsPersistentStoreException
- if some database error occursNoSuchObjectException
- if referring to an object that does not existArticleLog
@Deprecated Map getCategories()
List
of category ids represented as Integers
;
returns an empty map if no categories are registered@Deprecated Set getCategories(String fieldName)
fieldName
- the field to retrieve categories fromSet
of category ids represented as Integers
@Deprecated String getStrippedElementText(String key)
getElements()
for
details on elements.The text will be stripped for all tags before returned.key
- the element key to retrieve the text bygetElements()
boolean isLogging()
true
.ContentSummary toContentSummary()
ContentSummary
that can be used to relate other content to this content.IllegalStateException
- if this content doesn't have a valid id or getArticleType()
returns null
.getContentSummaries(String)
,
ArticleTransaction.setContentSummaries(String, List)
,
ArticleTransaction.addContentSummary(String, ContentSummary)
boolean isStaged()
Article getPublishedVariant() throws NoSuchObjectException, PersistentStoreException
NoSuchObjectException
- if a published variant does not existPersistentStoreException
- if retrieving the variant failsList<TagRelation> getTags() throws PersistentStoreException
List
of TagRelation
'sPersistentStoreException
- if fetching the tags failes© 1998- 2021 Escenic AS