public interface ObjectUpdater
Modifier and Type | Interface and Description |
---|---|
static interface |
ObjectUpdater.Command
The Command interface should be implemented by any class whose instances are intended to be executed inside a database transaction
|
Modifier and Type | Method and Description |
---|---|
void |
addFriendlyPub(int pPublicationId,
int pFriendlyPublicationId)
Deprecated.
The friendly publication concept isn't used any
more. Add the appropriate
ProtectionDomain and list of
roles to the user instead. |
boolean |
createAgreementInfo(AgreementInfoTransaction at)
Creates a new agreement.
|
boolean |
createArticle(ArticleTransaction article)
Creates a new article.
|
boolean |
createArticleMetaContent(ArticleTransaction article)
Deprecated.
no replacement
|
boolean |
createExternalPerson(PersonTransaction pt)
Deprecated.
no replacement
|
boolean |
createLayout(LayoutTransaction layout)
Creates a new layout.
|
boolean |
createPerson(PersonTransaction pt)
Creates a new person.
|
boolean |
createPool(PoolTransaction pool)
Creates a new pool.
|
boolean |
createSection(SectionTransaction section)
Creates a new section.
|
boolean |
createUserGroup(UserGroupTransaction gt)
Creates a new empty UserGroup.
|
boolean |
createUserGroup(UserGroupTransaction gt,
Member... members)
Creates a new UserGroup.
|
VirtualSection |
createVirtualSection(Section pParent,
Section pReal,
boolean recursive)
Creates a new shadow section from a source section.
|
VirtualSection |
createVirtualSection(Section pParent,
Section pReal,
String name,
boolean recursive)
Creates a new shadow section from a source section.
|
VirtualSection |
createVirtualSection(Section pParent,
Section pReal,
String name,
String directoryname,
boolean recursive)
Creates a new shadow section from a source section.
|
VirtualSection |
createVirtualSection(Section pParent,
Section pReal,
String name,
String directoryname,
String uniquename,
boolean recursive)
Creates a new shadow section from a virtual source section.
|
boolean |
deleteAgreementInfo(AgreementInfoTransaction at)
Deletes an existing agreement.
|
boolean |
deleteArticle(ArticleTransaction article)
Deletes an existing article.
|
boolean |
deleteFriendlyPub(int pPublicationId,
int pFriendlyPublicationId)
Deprecated.
The friendly publication concept isn't used any
more. Add the appropriate
ProtectionDomain and list of
roles to the user instead. |
boolean |
deleteLayout(LayoutTransaction layout)
Deletes an existing layout.
|
boolean |
deletePerson(PersonTransaction person,
boolean deleteRel)
Deletes an existing person from the database.
|
boolean |
deletePool(PoolTransaction pool)
Deletes an existing pool.
|
void |
deletePublication(int pubId)
Deletes an existing publication.
|
boolean |
deleteSection(SectionTransaction section)
Deletes an existing section from the database.
|
boolean |
deleteSection(SectionTransaction section,
boolean deleteArticles)
Deletes an existing section from the database.
|
boolean |
deleteUserGroup(UserGroupTransaction userGroup)
Deletes an existing
UserGroup . |
void |
emptySectionParameterCache()
Removes all entries in the section parameter cache.
|
void |
execute(ObjectUpdater.Command pCommand)
Executes the given
ObjectUpdater.Command within a database transaction. |
void |
insertArticleLog(Article article,
String description,
Person person)
Deprecated.
no replacement
|
boolean |
removeUserRights(PersonTransaction pt)
Removes the user rights of this person.
|
int |
revertStagedArticles(int pNumberOfDaysSinceTheyWereModified)
Reverts all staged articles that has not been modified for a given number of days.
|
void |
syncVirtualSection(Section pVirtual)
Sync shadow section with changes done in "real" section.
|
boolean |
updateAgreementInfo(AgreementInfoTransaction at)
Updates an existing agreement.
|
boolean |
updateArticle(ArticleTransaction article)
Updates a specific article.
|
void |
updateArticle(ArticleTransaction pTransaction,
ArticleTransaction.Transition pTransition) |
boolean |
updatePassword(PersonTransaction pPersonTransaction,
com.escenic.auth.Realm pRealm,
String pOldPassword,
String pNewPassword)
Updates a persons password.
|
boolean |
updatePassword(PersonTransaction pt,
String oldPassword,
String newPassword)
Deprecated.
Use
updatePassword(PersonTransaction, Realm, String, String) |
boolean |
updatePerson(PersonTransaction pt)
Updates an existing person.
|
boolean |
updatePool(PoolTransaction pool)
Updates an existing pool.
|
boolean |
updateSection(SectionTransaction section)
Updates an existing section.
|
boolean |
updateUserGroup(UserGroupTransaction gt)
Updates an existing UserGroup.
|
void |
updateVirtualSectionTree(VirtualSection root)
Manually synchronizes a shadow section tree with the correct virtual target tree.
|
boolean createArticleMetaContent(ArticleTransaction article) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
Article
. Meta-content is described in ArticleMetaContentInterface
article
- the article to have the new meta-contentPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if the Article
does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the article is deniedvoid insertArticleLog(Article article, String description, Person person) throws PersistentStoreException
article
- the article to create the new log entry fromdescription
- the log descriptionperson
- the person that has modified this article. null
if log entry should not be related to a specific person.PersistentStoreException
- if an error occurs in the persistence layerboolean createArticle(ArticleTransaction article) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
article
- the article to createPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the article is deniedboolean deleteArticle(ArticleTransaction article) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
article
- the article to deletePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the article is deniedboolean updateArticle(ArticleTransaction article) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
article
- the article to updatePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the article is deniedVirtualSection createVirtualSection(Section pParent, Section pReal, boolean recursive) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
pParent
- where to place the new section. This will be the parent of the new virtual sectionpReal
- the section to use as a source for the new shadow sectionrecursive
- all subsections of pReal will be added to the shadow section if they also are virtual targetsVirtualSection
representation of the new shadow sectionPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionVirtualSection createVirtualSection(Section pParent, Section pReal, String name, boolean recursive) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
pParent
- where to place the new section. This will be the parent of the new virtual sectionpReal
- the section to use as a source for the new shadow sectionname
- the name of the new shadow sectionrecursive
- all subsections of pReal will be added to the shadow section if they also are virtual targetsVirtualSection
representation of the new shadow sectionPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionVirtualSection createVirtualSection(Section pParent, Section pReal, String name, String directoryname, boolean recursive) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
pParent
- where to place the new section. This will be the root of the new virtual sectionpReal
- the section to use as a source for the new shadow sectionname
- the name of the new shadow sectiondirectoryname
- the directory of the new shadow sectionrecursive
- all subsections of pReal will be added to the shadow section if they also are virtual targetsVirtualSection
representation of the new shadow sectionPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionVirtualSection createVirtualSection(Section pParent, Section pReal, String name, String directoryname, String uniquename, boolean recursive) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
pParent
- where to place the new section. This will be the root of the new virtual source sectionpReal
- the section to use as a source for the new shadow sectionname
- the name of the new shadow sectiondirectoryname
- the directory of the new shadow sectionuniquename
- the uniquename of the new shadow sectionrecursive
- all subsections of pReal will be added to the shadow section if they also are virtual targetsVirtualSection
representation of the new shadow sectionPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionvoid syncVirtualSection(Section pVirtual) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
pVirtual
- the section to sync.PersistentStoreException
NoSuchObjectException
IllegalOperationException
void emptySectionParameterCache()
boolean createSection(SectionTransaction section) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
section
- the section to createPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the section is deniedboolean deleteSection(SectionTransaction section) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
section
- the section to deletePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the section is deniedboolean deleteSection(SectionTransaction section, boolean deleteArticles) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
section
- the section to deletedeleteArticles
- If set to true, all articles with home
section in this section will also be deletedPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the section is deniedboolean updateSection(SectionTransaction section) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
section
- the section to modifyPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the section is deniedboolean createPool(PoolTransaction pool) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
pool
- the pool to createPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the pool is deniedboolean deletePool(PoolTransaction pool) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
pool
- the pool to deletePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the pool is deniedboolean updatePool(PoolTransaction pool) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
pool
- the pool to modifyPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the pool is deniedboolean createLayout(LayoutTransaction layout) throws PersistentStoreException, IllegalOperationException
layout
- the layout to createPersistentStoreException
- if an error occurs in the persistence layerIllegalOperationException
- if this user is not authorized to perform this actionboolean deleteLayout(LayoutTransaction layout) throws PersistentStoreException, IllegalOperationException
layout
- the layout to deletePersistentStoreException
- if an error occurs in the persistence layerIllegalOperationException
- if this user is not authorized to perform this actionboolean createPerson(PersonTransaction pt) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
pt
- the person to createPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the person is deniedboolean createExternalPerson(PersonTransaction pt) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
pt
- the person to createPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the person is deniedboolean updatePerson(PersonTransaction pt) throws PersistentStoreException, IllegalOperationException, NoSuchObjectException
pt
- the person to modifyPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the person is deniedboolean deletePerson(PersonTransaction person, boolean deleteRel) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
person
- the person to deletedeleteRel
- true if relations with other IOObject
objects should be removedPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the person is deniedboolean removeUserRights(PersonTransaction pt) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
pt
- the person to lose user rightsPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the person is deniedboolean updatePassword(PersonTransaction pt, String oldPassword, String newPassword) throws PersistentStoreException, IllegalOperationException, NoSuchObjectException
updatePassword(PersonTransaction, Realm, String, String) instead.
pt
- the person to update his/her passwordoldPassword
- this persons old passwordnewPassword
- this persons new passwordPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the person is deniedboolean updatePassword(PersonTransaction pPersonTransaction, com.escenic.auth.Realm pRealm, String pOldPassword, String pNewPassword) throws PersistentStoreException, IllegalOperationException, NoSuchObjectException
pPersonTransaction
- the person to update his/her passwordpRealm
- the realm for which we want to change passwordpOldPassword
- this persons old passwordpNewPassword
- this persons new passwordPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if referring to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionAccessControlException
- if a security manager exists and access to the person is deniedboolean createUserGroup(UserGroupTransaction gt, Member... members) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
gt
- the group to createmembers
- the member(s) to insert into the new groupPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionboolean createUserGroup(UserGroupTransaction gt) throws PersistentStoreException, IllegalOperationException
gt
- the group to createPersistentStoreException
- if an error occurs in the persistence layerIllegalOperationException
- if this user is not authorized to perform this actionboolean deleteUserGroup(UserGroupTransaction userGroup) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
UserGroup
.userGroup
- the UserGroup
to deletePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionboolean updateUserGroup(UserGroupTransaction gt) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
gt
- the group to modifyPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if refering to an IOObject
that does not existIllegalOperationException
- if this user is not authorized to perform this actionvoid deletePublication(int pubId) throws PersistentStoreException, IllegalOperationException
pubId
- the id of the publication to deletePersistentStoreException
- if an error occurs in the persistence layerIllegalOperationException
- if this user is not authorized to perform this actionboolean updateAgreementInfo(AgreementInfoTransaction at) throws PersistentStoreException, IllegalOperationException, NoSuchObjectException
at
- the agreement to modifyPersistentStoreException
- if an error occurs in the persistence layerIllegalOperationException
- if this user is not authorized to perform this actionNoSuchObjectException
boolean createAgreementInfo(AgreementInfoTransaction at) throws PersistentStoreException, IllegalOperationException
Section
or another IOObect
.
This agreement will decide who has access rights to the related IOObjects
.at
- the agreement to createPersistentStoreException
- if an error occurs in the persistence layerIllegalOperationException
- if this user is not authorized to perform this actionboolean deleteAgreementInfo(AgreementInfoTransaction at) throws PersistentStoreException, IllegalOperationException, NoSuchObjectException
Section
or another IOObect
.
This agreement will decide who has access rights to the related IOObjects
.at
- the agreement to deletePersistentStoreException
- if an error occurs in the persistence layerIllegalOperationException
- if this user is not authorized to perform this actionNoSuchObjectException
@Deprecated boolean deleteFriendlyPub(int pPublicationId, int pFriendlyPublicationId) throws PersistentStoreException, UnsupportedOperationException
ProtectionDomain
and list of
roles to the user instead.UnsupportedOperationException
- always.PersistentStoreException
@Deprecated void addFriendlyPub(int pPublicationId, int pFriendlyPublicationId) throws PersistentStoreException, UnsupportedOperationException
ProtectionDomain
and list of
roles to the user instead.UnsupportedOperationException
- always.PersistentStoreException
void updateVirtualSectionTree(VirtualSection root) throws IllegalOperationException
root
- the root of the shadow section tree to synchronizeIllegalOperationException
- if the directory name of a new subsection in the virtual source tree is identical with an existing section in the shadow section treevoid updateArticle(ArticleTransaction pTransaction, ArticleTransaction.Transition pTransition) throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
int revertStagedArticles(int pNumberOfDaysSinceTheyWereModified) throws PersistentStoreException
pNumberOfDaysSinceTheyWereModified
- the threshold for when to start reverting changes. All staged articles not
modified since the given number of days in the past will be revertedPersistentStoreException
- if loading the list of the staged articles fails.void execute(ObjectUpdater.Command pCommand) throws SQLException
ObjectUpdater.Command
within a database transaction. If executing the ObjectUpdater.Command
fails, the
entire database transaction will be rolled back. The original exception thrown by the ObjectUpdater.Command
will be wrapped
inside a SQLException
pCommand
- the ObjectUpdater.Command
to executeSQLException
- if executing the ObjectUpdater.Command
failed.© 1998- 2021 Escenic AS