public class ArticleTransactionImpl extends ArticleImpl implements ArticleTransaction
ArticleTransaction.Transition
IOAtom.ObjectType
CONTENT_SUMMARIES_ELEMENT_NAME, homeSectionId, INLINE_CONTENT_SUMMARIES_ELEMENT_NAME, ioArticle, LOGGER, mFieldCache, mHomeSectionMap, mPersonSummaries, mSectionsNonVirtual, mSectionsWithVirtual, PERSON_SUMMARIES_ELEMENT_NAME, state, strippedTextMap, type
sRefreshObjectBeforeLock
DEFAULT_RELATION_TYPE, HIDDEN_ARTICLE_PRIORITY, INLINE_RELATION_TYPE, MAIN_IN_TOPIC_PRIORITY
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 | Constructor and Description |
---|---|
protected |
ArticleTransactionImpl()
Deprecated.
|
protected |
ArticleTransactionImpl(Article article)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
MutableTagRelation |
add(Tag pTag)
Deprecated.
Adds a
Tag to this article |
void |
addContentSummary(String pRelationType,
ContentSummary pContentSummary)
Deprecated.
Add a ContentSummary to the supplied relation type.
|
boolean |
addReference(IORelation relation)
Deprecated.
|
boolean |
addReference(ReferenceEntity ref)
Deprecated.
|
void |
addRelativeURI(URI url,
boolean pDefault)
Deprecated.
/**
Add a relative uri for the article.
|
boolean |
addRoleKeeper(Person person,
Type roleType)
Deprecated.
Adds a role keeper to this article.
|
boolean |
addRoleKeeper(Person person,
Type roleType,
String message)
Deprecated.
Adds a role keeper to this article, with a message.
|
boolean |
addToPool(IORelation rel)
Deprecated.
Adds an article to the given pool.
|
boolean |
addToPool(Pool p)
Deprecated.
Adds an article to the given pool.
|
boolean |
addToSection(Section s)
Deprecated.
Adds this article to a section.
|
boolean |
create()
Deprecated.
Creates a new object in the persistence layer.
|
boolean |
delete()
Deprecated.
Removes an existing
IOObject from the persistence layer. |
protected void |
excludeRelation(Collection<IORelation> pFrom,
IORelation pRelation)
Deprecated.
|
Person |
getAuthor()
Deprecated.
Retrieves the author of this article.
|
Person[] |
getAuthors()
Deprecated.
Retrieves the authors of this article.
|
IOObject |
getObject()
Deprecated.
Retrieves the object this transaction was initialized with.
|
Person[] |
getPersonRoleKeepers(Type paType)
Deprecated.
Retrieves persons that have the given role on this article.
|
int[] |
getPublicationIds()
Deprecated.
Retrieves the ids of all publications this article is added to.
|
IORelation[] |
getRoleKeepers()
Deprecated.
Retrieves the role keepers of the article.
|
IORelation[] |
getRoleKeepers(Type roleType)
Deprecated.
Retrieves all persons that have the given role on this article.
|
List<TagRelation> |
getTags()
Deprecated.
Returns an unmodifiable
List of TagRelation 's for this article. |
boolean |
getUpdateLastModified()
Deprecated.
Indicate wether calling update() on this transaction will trigger a change to the last modification
date of the article.
|
boolean |
has(Tag pTag)
Deprecated.
Returns
true if the given Tag is already added. |
boolean |
inSection(int pSectionId)
Deprecated.
Checks whether or not this article is in the given section.
|
void |
refresh()
Deprecated.
|
boolean |
release()
Deprecated.
Releases the lock on this
IOObject . |
void |
remove(Tag pTag)
Deprecated.
Removes a
Tag from this article |
boolean |
removeAllReferences(ReferenceEntity ref)
Deprecated.
Removes all references to a
ReferenceEntity . |
boolean |
removeAllReferences(ReferenceEntity ref,
Type[] types)
Deprecated.
Removes all references of the specified types to a
ReferenceEntity . |
boolean |
removeArticleRelation(Article article,
Type type)
Deprecated.
Removes the relation of the specified type from this article.
|
boolean |
removeFromPool(Pool p)
Deprecated.
Removes an article from the given pool.
|
boolean |
removeFromSection(Section pSection)
Deprecated.
Removes this article from a section.
|
void |
removeInlineImagesFromElement(String element,
int imageId)
Deprecated.
Removes all inline references to the given image from the element in question.
|
void |
removeLocalHomeSection(Section pLocalHomeSection)
Deprecated.
Removes the local home section for that article if present.
|
boolean |
removeReference(IORelation rel)
Deprecated.
Removes an existing reference between a
ReferenceEntity and this article. |
boolean |
removeRoleKeeper(Person person)
Deprecated.
Removes a role keeper from this article.
|
boolean |
removeRoleKeeper(Person person,
Type roleType)
Deprecated.
Removes a role keeper from this article.
|
boolean |
removeRoleKeepers(IORelation[] pRoleKeepers)
Deprecated.
|
boolean |
replaceArticleRelations(Collection pRelations)
Deprecated.
|
void |
setActivateDate(Timestamp ad)
Deprecated.
Sets the activation date of the article.
|
void |
setContentSummaries(String pRelationType,
List<ContentSummary> pContentSummaries)
Deprecated.
Sets the list of
content summaries for the article. |
void |
setCreationDate(Timestamp pCreationDate)
Deprecated.
Sets the creation date of the article.
|
void |
setElementText(String name,
String value)
Deprecated.
Sets an element on this article.
|
void |
setExpireDate(Timestamp ed)
Deprecated.
Sets the expire date of the article.
|
void |
setField(String pName,
FieldValue pValue)
Deprecated.
Internally this method will call
ArticleTransaction.setFieldValue(java.lang.String, java.lang.Object) with
FieldValue.getValue() . |
void |
setFieldValue(String pName,
Object pValue)
Deprecated.
Sets an value for the specified field on this article.
|
void |
setFirstPublished(Timestamp pd)
Deprecated.
Set the "first published" date of this article.
|
void |
setHomeSection(Section s)
Deprecated.
Sets the home section of this article.
|
void |
setHomeSectionId(int pHomeSectionId)
Deprecated.
Sets the home section of this article.
|
void |
setId(int pId)
Deprecated.
Set the id of this object.
|
void |
setLastModified(Timestamp pLastModified)
Deprecated.
Sets the last modification date of the article.
|
void |
setLocalHomeSection(Section pLocalHomeSection)
Deprecated.
Sets the local home section of this article.
|
void |
setLogging(boolean logging)
Deprecated.
Sets whether or not this article should have a log entry created when it is modified.
|
void |
setObject(IOObject a)
Deprecated.
|
void |
setOwnerPublicationId(int pId)
Deprecated.
This method sets the id of the owner publication
|
void |
setPersonSummaries(List<PersonSummary> pPersonSummaries)
Deprecated.
Sets/replaces all the
PersonSummary s of a content item. |
void |
setPriority(int priority)
Deprecated.
Sets the priority of this article.
|
void |
setPublishDate(Timestamp pd)
Deprecated.
Set the publish date of this article.
|
void |
setRelativeURI(URI url)
Deprecated.
Sets the relative part of the url.
|
void |
setSource(String source)
Deprecated.
Set the source of this article.
|
void |
setSourceId(String sourceId)
Deprecated.
Set the source id of this article.
|
void |
setState(Type state)
Deprecated.
Set the state of the article.
|
void |
setStateChange(Timestamp sc)
Deprecated.
Sets the time when the state of this article was last changed.
|
void |
setTitle(String title)
Deprecated.
Sets the title of the article.
|
void |
setType(Type type)
Deprecated.
Sets the type of this article
|
void |
setUpdateLastModified(boolean pNewValue)
Deprecated.
Indicate wether or not this update should trigger an update of the last modified bit.
|
boolean |
update()
Deprecated.
Updates the database with the changes made on this
IOObject . |
void |
update(ArticleTransaction.Transition pTransition)
Deprecated.
Updates the article using the workflow defined by the given
ArticleTransaction.Transition |
void |
updateReference(IORelation pRelation)
Deprecated.
Updates the IORelation.
|
void |
validate()
Deprecated.
Validates the xml content of this article.
|
void |
validate(Object key,
String value)
Deprecated.
|
void |
validateArticleType()
Deprecated.
Validate the content of the article with article type.
|
protected void |
verify(String pName,
String pValue)
Deprecated.
|
checkLoaded, createPersonSummary, getActivateDate, getAgreementInfo, getArticleType, getCategories, getCategories, getChecksum, getContentId, getContentId, getContentSummaries, getContentSummaries, getCreationDate, getDefaultContentType, getElements, getElementText, getExpireDate, getField, getFieldValue, getFirstPublished, getHomeSection, getHomeSectionId, getIOArticle, getLanguage, getLanguage, getLastEditedBy, getLastModified, getLayout, getLayoutId, getLocalHomeSection, getLocalHomeSections, getLocalUrl, getLocalUrls, getLogEntries, getOriginalState, getOwnerPublicationId, getPersonSummaries, getPools, getPreviewToken, getPreviewUrl, getPrinted, getPriority, getProtectionDomain, getProtectionDomains, getPublishDate, getPublishedVariant, getReferenceEntities, getReferredEntities, getReferredEntities, getReferredPersons, getRelatedAPIArticles, getRelatedArticles, getRelativeURI, getRelativeURIs, getRelativeUrl, getSections, getSections, getSource, getSourceId, getState, getStateChange, getStrippedElementText, getTitle, getTopics, getTransactionObjectImpl, getType, getUrl, getUUID, getXMLArticle, inPool, isAgreementRequired, isLive, isLive, isLogging, isPreview, isStaged, parseField, setIOArticle, toContentSummary
breakAndLock, compareTo, createTransaction, equals, getDefaultProtectionDomain, getHashKey, getId, getLockKeeper, getObjectType, getValid, hashCode, isLocked, isStillValid, isValid, lock, lock, lock, lock, objectTypeAsString, setValid, stringToObjectType, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getActivateDate, getAgreementInfo, getArticleType, getCategories, getCategories, getContentId, getContentId, getContentSummaries, getContentSummaries, getCreationDate, getDefaultContentType, getElements, getElementText, getExpireDate, getField, getFieldValue, getFirstPublished, getHomeSection, getHomeSectionId, getLanguage, getLanguage, getLastEditedBy, getLastModified, getLayout, getLayoutId, getLocalHomeSection, getLocalHomeSections, getLocalUrl, getLocalUrls, getLogEntries, getOriginalState, getPersonSummaries, getPools, getPreviewToken, getPreviewUrl, getPrinted, getPriority, getPublishDate, getPublishedVariant, getReferenceEntities, getReferredEntities, getReferredEntities, getReferredPersons, getRelatedAPIArticles, getRelatedArticles, getRelativeURI, getRelativeURIs, getRelativeUrl, getSections, getSections, getSource, getSourceId, getState, getStateChange, getStrippedElementText, getTitle, getTopics, getType, getUrl, inPool, isAgreementRequired, isLive, isLive, isLogging, isStaged, parseField, toContentSummary
breakAndLock, createTransaction, getChecksum, getHashKey, getId, getLockKeeper, getObjectType, getOwnerPublicationId, getProtectionDomain, getProtectionDomains, isLocked, isPreview, isValid, lock, lock, lock, lock
protected ArticleTransactionImpl(Article article)
protected ArticleTransactionImpl()
public IOObject getObject()
IOTransaction
getObject
in interface IOTransaction
public void setObject(IOObject a)
public boolean update() throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
IOTransaction
IOObject
.update
in interface IOTransaction
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalOperationException
- if the state of the object did not pass validation checkspublic boolean create() throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
IOTransaction
create
in interface IOTransaction
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalOperationException
- if the state of the object did not pass validation checkspublic boolean delete() throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
IOTransaction
IOObject
from the persistence layer.delete
in interface IOTransaction
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalOperationException
- if the state of the object did not pass validation checkspublic boolean release() throws IllegalArgumentException, IllegalOperationException
IOTransaction
IOObject
. A new lock must be retrieved when new modifications should be made
on this object.release
in interface IOTransaction
IllegalOperationException
- if this user is not authorized to perform this actionIllegalArgumentException
public void update(ArticleTransaction.Transition pTransition) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
ArticleTransaction
ArticleTransaction.Transition
update
in interface ArticleTransaction
pTransition
- the transition to applyPersistentStoreException
NoSuchObjectException
IllegalOperationException
public void refresh() throws PersistentStoreException, NoSuchObjectException
refresh
in interface IOObject
refresh
in class ArticleImpl
PersistentStoreException
NoSuchObjectException
public Person[] getAuthors()
Article
getAuthors
in interface Article
getAuthors
in class ArticleImpl
Person
arraypublic Person[] getPersonRoleKeepers(Type paType) throws PersistentStoreException, NoSuchObjectException
Article
Article.getRoleKeepers()
for details on role keepers.getPersonRoleKeepers
in interface Article
getPersonRoleKeepers
in class ArticleImpl
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
public Person getAuthor()
Article
getAuthor
in interface Article
getAuthor
in class ArticleImpl
public void addContentSummary(String pRelationType, ContentSummary pContentSummary)
ArticleTransaction
Article.toContentSummary()
method.addContentSummary
in interface ArticleTransaction
pRelationType
- the relation type to add to. Cannot be null
. Should be a defined relation-type name
in the content-type resource.pContentSummary
- the content summary to add. Cannot be null
.Article.toContentSummary()
public void setPersonSummaries(List<PersonSummary> pPersonSummaries)
ArticleTransaction
PersonSummary
s of a content item.setPersonSummaries
in interface ArticleTransaction
pPersonSummaries
- the person summaries to set.public void setContentSummaries(String pRelationType, List<ContentSummary> pContentSummaries)
ArticleTransaction
content summaries
for the article.
Should only be called by the webservice.setContentSummaries
in interface ArticleTransaction
pRelationType
- the name of the relation type. Cannot be null
.pContentSummaries
- the List
of content summaries
. Cannot be null
.Article.toContentSummary()
public IORelation[] getRoleKeepers() throws PersistentStoreException, NoSuchObjectException
Article
TypeManager.getTypes(neo.xredsys.api.Type.Category)
. Typical role keepers are:
getRoleKeepers
in interface Article
getRoleKeepers
in class ArticleImpl
IORelation
arrayPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTypeManager
public IORelation[] getRoleKeepers(Type roleType) throws PersistentStoreException, NoSuchObjectException
Article
Article.getRoleKeepers()
for details on role keepers.getRoleKeepers
in interface Article
getRoleKeepers
in class ArticleImpl
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
public boolean addRoleKeeper(Person person, Type roleType) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
Article.getRoleKeepers()
for details on role keepers.addRoleKeeper
in interface ArticleTransaction
person
- the person to add as author of this articleroleType
- the type of role this person will be given on this articlePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTypeManager
public boolean addRoleKeeper(Person person, Type roleType, String message) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
Article.getRoleKeepers()
for details on role keepers.addRoleKeeper
in interface ArticleTransaction
person
- the person to add as author of this articleroleType
- the type of role this person will be given on this articlemessage
- the message that will be attached to this relationPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTypeManager
public boolean removeRoleKeeper(Person person, Type roleType) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
Article.getRoleKeepers()
for details on role keepers.removeRoleKeeper
in interface ArticleTransaction
person
- the person to remove as author from this articleroleType
- the role the person in question will have removed from this articlePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTypeManager
public boolean removeRoleKeeper(Person person) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
Article.getRoleKeepers()
for details on role keepers.removeRoleKeeper
in interface ArticleTransaction
person
- the person to remove as author from this articlePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTypeManager
public boolean removeRoleKeepers(IORelation[] pRoleKeepers) throws PersistentStoreException, NoSuchObjectException
removeRoleKeepers
in interface ArticleTransaction
PersistentStoreException
NoSuchObjectException
public void setCreationDate(Timestamp pCreationDate) throws PersistentStoreException, NoSuchObjectException, IllegalStateException
ArticleTransaction
setCreationDate
in interface ArticleTransaction
pCreationDate
- the new creation datePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalStateException
- if called when updating an articlepublic void setLastModified(Timestamp pLastModified) throws PersistentStoreException, NoSuchObjectException, IllegalStateException
ArticleTransaction
setLastModified
in interface ArticleTransaction
pLastModified
- the new "last modified" datePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalStateException
- if called when updating an articlepublic void setFirstPublished(Timestamp pd) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
setFirstPublished
in interface ArticleTransaction
pd
- the new first publish datePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic void setFieldValue(String pName, Object pValue)
ArticleTransaction
application/xhtml
, the value will be validated for well-formedness.setFieldValue
in interface ArticleTransaction
pName
- the mapped property to setpValue
- the value of the propertypublic void setField(String pName, FieldValue pValue)
ArticleTransaction
ArticleTransaction.setFieldValue(java.lang.String, java.lang.Object)
with
FieldValue.getValue()
. In addition it will also set any
field options set for the field.setField
in interface ArticleTransaction
pName
- the mapped property to setpValue
- the value of the propertypublic void removeInlineImagesFromElement(String element, int imageId)
ArticleTransaction
removeInlineImagesFromElement
in interface ArticleTransaction
element
- from which inline images will be removedimageId
- the id of the image to removepublic void validate() throws IOException, SAXException
ArticleTransaction
validate
in interface ArticleTransaction
IOException
SAXException
public void validate(Object key, String value) throws IOException, SAXException
IOException
SAXException
public void validateArticleType()
ArticleTransaction
validateArticleType
in interface ArticleTransaction
public void setId(int pId)
IOTransaction
setId
in interface IOTransaction
setId
in class IOObjectImpl
pId
- the idpublic void setPriority(int priority) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
Article.getPriority()
for details on priorities.setPriority
in interface ArticleTransaction
priority
- the new priorityPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic void setActivateDate(Timestamp ad) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
setActivateDate
in interface ArticleTransaction
ad
- the new activation datePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic void setSource(String source) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
Article.getSource()
for details on article source.setSource
in interface ArticleTransaction
source
- the new sourcePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic void setSourceId(String sourceId) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
Article.getSourceId()
for details on article source.setSourceId
in interface ArticleTransaction
sourceId
- the source idPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic void setState(Type state) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
Article.getState()
for details on states.setState
in interface ArticleTransaction
state
- the new statePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existType
,
TypeManager
,
Article.getState()
public void setTitle(String title) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
ArticleTransaction.setElementText(java.lang.String, java.lang.String)
with FieldConstants.TITLE
as key.setTitle
in interface ArticleTransaction
title
- the new titlePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic void setRelativeURI(URI url)
ArticleTransaction
ArticleTransaction.addRelativeURI(URI, boolean)
.
This can then be used to look up the article in the API by using ObjectLoader.getArticleByUrl(String, int)
.
getArticleByUrl expects the url to be url-encoded
E.g:
objectloader.getArticleByUrl("article123.ece", 21); objectloader.getArticleByUrl("A-Very-Cool-Article-Name-Here", 21);If this relative url is set, the presentation layer will use this value to find the Article object in the filter chain.
setRelativeURI
in interface ArticleTransaction
url
- the url of this articlepublic void addRelativeURI(URI url, boolean pDefault)
ArticleTransaction
ObjectLoader.getArticleByUrl(String, int)
.
This method expects the url to be url-encoded
E.g:
objectloader.getArticleByUrl("article123.ece", 21); objectloader.getArticleByUrl("A-Very-Cool-Article-Name-Here", 21);The article can have more than one relative uri. The article can be look up by any of them. If this relative url is set, the presentation layer will use this value to find the Article object in the filter chain.
addRelativeURI
in interface ArticleTransaction
url
- the url of this articlepDefault
- Set this uri as the default uri for the
article. The article can only have one default uri, so setting
this to true will replace the current default uri.public void setStateChange(Timestamp sc) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
setStateChange
in interface ArticleTransaction
sc
- the new timePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic void setExpireDate(Timestamp ed) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
setExpireDate
in interface ArticleTransaction
ed
- the new expire datePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic void setPublishDate(Timestamp pd) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
setPublishDate
in interface ArticleTransaction
pd
- the new publish datePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic void setUpdateLastModified(boolean pNewValue)
ArticleTransaction
setUpdateLastModified
in interface ArticleTransaction
public boolean getUpdateLastModified()
ArticleTransaction
getUpdateLastModified
in interface ArticleTransaction
public void setHomeSection(Section s) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
setHomeSection
in interface ArticleTransaction
s
- the section that this article will belong toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic void setHomeSectionId(int pHomeSectionId) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
setHomeSectionId
in interface ArticleTransaction
pHomeSectionId
- the id of the section that this article will belong toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic boolean addToPool(Pool p) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
ArticleTransaction
addToPool
in interface ArticleTransaction
p
- the pool to add this article toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalOperationException
- if this user is not authorized to perform this actionpublic boolean addToPool(IORelation rel) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
ArticleTransaction
addToPool
in interface ArticleTransaction
rel
- the pool to add this article toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalOperationException
- if this user is not authorized to perform this actionpublic boolean removeFromPool(Pool p) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
ArticleTransaction
removeFromPool
in interface ArticleTransaction
p
- the pool to remove this article fromPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalOperationException
- if this user is not authorized to perform this actionpublic void setLocalHomeSection(Section pLocalHomeSection) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
setLocalHomeSection
in interface ArticleTransaction
pLocalHomeSection
- the local home section of the articlePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic void removeLocalHomeSection(Section pLocalHomeSection) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
removeLocalHomeSection
in interface ArticleTransaction
pLocalHomeSection
- The section that needs to be removedPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic boolean addToSection(Section s) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
addToSection
in interface ArticleTransaction
s
- the Section
to add toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic boolean removeFromSection(Section pSection) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
ArticleTransaction
removeFromSection
in interface ArticleTransaction
pSection
- the Section
to remove fromPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalOperationException
- if the section is the home section of the article.public boolean inSection(int pSectionId) throws PersistentStoreException, NoSuchObjectException
Article
inSection
in interface Article
inSection
in class ArticleImpl
pSectionId
- 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 existpublic boolean addReference(ReferenceEntity ref) throws PersistentStoreException, NoSuchObjectException
addReference
in interface ArticleTransaction
ref
- the ReferenceEntity
to add to this articlefalse
alwaysPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existReferenceEntity
public boolean addReference(IORelation relation) throws PersistentStoreException, NoSuchObjectException
addReference
in interface ArticleTransaction
relation
- the ReferenceEntity
to add to this articlefalse
alwaysPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existReferenceEntity
public void updateReference(IORelation pRelation)
ArticleTransaction
updateReference
in interface ArticleTransaction
pRelation
- the relation to update.public boolean removeAllReferences(ReferenceEntity ref) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
ReferenceEntity
.removeAllReferences
in interface ArticleTransaction
ref
- the ReferenceEntity
to remove from this articletrue
if the refereneces are removed, otherwise false
.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existReferenceEntity
public boolean removeAllReferences(ReferenceEntity ref, Type[] types) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
ReferenceEntity
. Possible types can be found by calling
TypeManager.getTypes(neo.xredsys.api.Type.Category)
.removeAllReferences
in interface ArticleTransaction
ref
- the ReferenceEntity
to remove references totypes
- the types of references to removePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existReferenceEntity
public boolean removeReference(IORelation rel) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
ReferenceEntity
and this article. Possible types can be found by calling
TypeManager.getTypes(neo.xredsys.api.Type.Category)
.removeReference
in interface ArticleTransaction
rel
- the reference to removePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existReferenceEntity
,
TypeManager
public boolean replaceArticleRelations(Collection pRelations)
replaceArticleRelations
in interface ArticleTransaction
public boolean removeArticleRelation(Article article, Type type) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
TypeManager.getTypes(neo.xredsys.api.Type.Category)
. Typical types are:
removeArticleRelation
in interface ArticleTransaction
article
- the article to remove from this articletype
- the type of relation to remove from this articletrue
if the relation was removed, otherwise false
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existTypeManager
public void setLogging(boolean logging)
ArticleTransaction
true
.setLogging
in interface ArticleTransaction
logging
- true if a log entry should be created when this article is modified.public void setType(Type type) throws PersistentStoreException, NoSuchObjectException
ArticleTransaction
setType
in interface ArticleTransaction
type
- the typePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existType
,
TypeManager
public void setElementText(String name, String value)
ArticleTransaction
Article.getElements()
for
details on elements.
Will be removed in next major release.setElementText
in interface ArticleTransaction
name
- the element key to retrieve the text byArticle.getElements()
public int[] getPublicationIds()
Article
getPublicationIds
in interface Article
getPublicationIds
in class ArticleImpl
public void setOwnerPublicationId(int pId)
IOTransaction
setOwnerPublicationId
in interface IOTransaction
setOwnerPublicationId
in class IOObjectImpl
pId
- the idprotected void excludeRelation(Collection<IORelation> pFrom, IORelation pRelation)
public List<TagRelation> getTags()
Article
getTags
in interface Article
getTags
in class ArticleImpl
List
of TagRelation
'spublic MutableTagRelation add(Tag pTag)
ArticleTransaction
Tag
to this articleadd
in interface ArticleTransaction
pTag
- the Tag
to addpublic void remove(Tag pTag)
ArticleTransaction
Tag
from this articleremove
in interface ArticleTransaction
pTag
- the Tag
to removepublic boolean has(Tag pTag)
Article
true
if the given Tag
is already added. Otherwise falsehas
in interface Article
has
in class ArticleImpl
pTag
- the Tag
© 1998- 2021 Escenic AS