public class IOObjectLoader extends Object implements ObjectLoader
Modifier and Type | Field and Description |
---|---|
protected org.apache.log4j.Logger |
mLogger
Deprecated.
|
Constructor and Description |
---|
IOObjectLoader()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
cacheObject(IOObject object)
Deprecated.
|
boolean |
existsSectionWithUrl(String pSectionUrl)
Deprecated.
Does not work! do not use.
|
boolean |
existsSectionWithUrl(String pSectionUrl,
int pPublicationId)
Deprecated.
Tests if a section with the given URL exists.
|
String |
generateToken(IOObject pObject)
Deprecated.
Generate a token to be used when preview the given IOObject.
|
neo.xredsys.acl.ACLManager |
getACLManager()
Deprecated.
|
AgreementInfo |
getAgreementInfo(int agreementId)
Deprecated.
Retrieves a specific agreement by id.
|
Article |
getArticle(int articleId)
Deprecated.
Retrieves the article object requested, based on the internal article id.
|
Article |
getArticle(int articleId,
int pubId)
Deprecated.
Retrieves the article object requested, based on the internal article id and publication id.
|
Article |
getArticle(int articleId,
Publication pub)
Deprecated.
Retrieves the article object requested, based on the internal article Id and publication.
|
Article |
getArticle(int articleId,
String contentType,
int pubId)
Deprecated.
Retrieves the article object requested.
|
Article |
getArticle(String source,
int sourceId,
int pubId)
Deprecated.
Retrieves the article object requested, based on the article's external source and external Id.
|
Article |
getArticle(String source,
int sourceId,
Publication pub)
Deprecated.
Retrieves the article object requested, based on the article's external source and external id.
|
Article |
getArticle(String source,
String sourceId,
int pubId)
Deprecated.
Retrieves the article object requested, based on the article's external source and external Id.
|
Article |
getArticle(String source,
String sourceId,
Publication pub)
Deprecated.
Retrieves the article object requested, based on the article's external source and external Id.
|
Article |
getArticleByUrl(String pUrl,
int pPublicationId)
Deprecated.
Retrieves an Article by the relative url.
|
Collection<ArticleLog> |
getArticleLogEntries(int articleId)
Deprecated.
Retrieves all log entries belonging to the specified
article.
|
neo.xredsys.content.article.ArticleManager |
getArticleManager()
Deprecated.
|
Article[] |
getArticles(int[] articleIds)
Deprecated.
Retrieves a list of articles.
|
Article[] |
getArticles(int[] articleIds,
int publicationID)
Deprecated.
|
Collection |
getArticlesByState(int codeID)
Deprecated.
Retrieves a collection of article IDs (int) where all the respective
articles have a state equal to the parameter codeID.
|
Collection |
getArticlesByState(int codeID,
int[] pubIds)
Deprecated.
Retrieves a collection of article IDs (int) where all the respective
articles have a state equal to the parameter codeID and belong to one of the
publications defined in pubIds..
|
ArticleIterator |
getArticlesByType(String pType,
int pPublicationId)
Deprecated.
Retrieves all Articles of a given type, as an ArticleIterator.
|
int[] |
getArticlesByUser(int personId,
int maxCount)
Deprecated.
Retrieves an array of articles the user has modified.
|
IOObject |
getCachedObject(IOHashKey key)
Deprecated.
|
String |
getDeclaredSectionParameter(int pSectionId,
String pParameterName)
Deprecated.
Retrieves the value of the specified parameter in this section, disregarding any
inherited value.
|
Set |
getDeclaredSectionParameterNameSet(int pSectionId)
Deprecated.
Retrieves java.util.Set containing the names of all paramters in this section, disregarding any
inherited parameters.
|
Map |
getDeclaredSectionParameters(int pSectionId)
Deprecated.
Retrieves a immutable
java.util.Map containing all specified parameters in this sectiondisregarding any
inherited value. |
neo.xredsys.content.entity.EntityManager |
getEntityManager()
Deprecated.
|
Collection |
getExportedIds(int pPublicationId)
Deprecated.
|
Collection |
getFriendlyIds(int pPublicationId)
Deprecated.
|
Collection<Integer> |
getFriendlyPublicationIds(Person pPerson)
Deprecated.
|
Collection |
getFriendlyPublications(Person pPerson)
Deprecated.
|
Collection<ArticleLog> |
getLatestArticleLogEntries(int articleId,
int numberOfEntries)
Deprecated.
Retrieves the latest log entries for the specified article.
|
List<ArticleLog> |
getLatestArticleLogEntries(int articleId,
int numberOfEntries,
int pFrom,
boolean desc)
Deprecated.
Retrieves the latest log entries for the specified article.
|
Layout |
getLayout(int layoutId)
Deprecated.
Retrieves a Layout object, as specified by its unique Id.
|
Collection<IOObject> |
getMembers(UserGroup pGroup)
Deprecated.
Retrieves the members of this
UserGroup . |
Collection<Section> |
getNonInheritSections(int pubId)
Deprecated.
Retrieves all sections in the given publication that does not inherit access rights.
|
IOObject |
getObject(int type,
int objectId,
int pubId)
Deprecated.
Retrieves the
IOObject requested. |
IOObject |
getObject(IOHashKey object)
Deprecated.
Retrieves the
IOObject requested. |
neo.xredsys.auth.PermissionChecker |
getPermissionChecker()
Deprecated.
|
Person |
getPerson(int personId)
Deprecated.
Retrieves a person-object
|
Person |
getPerson(int personId,
int pubId)
Deprecated.
Retrieves a person-object
|
Person |
getPersonBySourceAndSourceId(String pSource,
String pSourceId,
int pPublicationId)
Deprecated.
Retrieves a person by source and source id.
|
neo.xredsys.dao.PersonDao |
getPersonDao()
Deprecated.
|
neo.xredsys.content.person.PersonManager |
getPersonManager()
Deprecated.
|
List<Person> |
getPersons(String pEmail,
List<Publication> pPublications)
Deprecated.
Retrieves all person-object from the
Publication with the given email address |
Pool |
getPool(int poolId,
int pubId)
Deprecated.
Retrieves a pool, as specified by its unique Id.
|
PublicationImpl |
getPublication(int pubId)
Deprecated.
Retrieves the publication with id pubId
|
Publication |
getPublication(String pubName)
Deprecated.
Retrieves the publication with name pubName
|
Publication |
getPublicationById(int pubId)
Deprecated.
Retrieves the publication with id pubId
|
int[] |
getPublicationIds()
Deprecated.
Returns an array holding ids for all publications.
|
Publication[] |
getPublications()
Deprecated.
Retrieves an array of all publications in the database.
|
Publication[] |
getPublications(int personId)
Deprecated.
Retrieves the ids of all publications where the given person has access rights.
|
Publication[] |
getPublications(Person person)
Deprecated.
Retrieves the ids of all publications where the given person has access rights.
|
UserGroup |
getPublicationUsersGroup(int pubId)
Deprecated.
Retrieves the group containing all users belonging to the given publication.
|
ReferenceEntity[] |
getReferenceEntities(String name,
Type referenceType,
int pubId,
boolean exact)
Deprecated.
Retrieves all
ReferenceEntity objects with the given name and type
in the specified publication Id. |
ReferenceEntity |
getReferenceEntity(int objectId,
int pubId)
Deprecated.
Retrieves the
ReferenceEntity requested. |
ReferenceEntity |
getReferenceEntity(String name,
int pubId)
Deprecated.
Retrieves the
ReferenceEntity with the given name in the specified publication Id. |
ReferenceEntity |
getReferenceEntity(String name,
int pubId,
boolean exact)
Deprecated.
Retrieves the
ReferenceEntity with the given name in the specified publication Id. |
ReferenceEntity |
getReferenceEntity(String source,
String sourceId,
int pubId)
Deprecated.
Retrieves the
ReferenceEntity with the specified source and sourceId combination. |
ReferenceEntity |
getReferenceEntity(String source,
String sourceId,
Type referenceType,
int pubId)
Deprecated.
Retrieves the
ReferenceEntity with the specified source and sourceId combination. |
int[] |
getReferenceEntityIds(int referenceType,
int referenceState)
Deprecated.
Retrieves all entities of a given type and state.
|
neo.xredsys.acl.Role |
getRole(String pRoleName,
String pContext)
Deprecated.
|
neo.xredsys.auth.RoleManager |
getRoleManager()
Deprecated.
|
Section |
getSection(int sectionId)
Deprecated.
Retrieves a section, as specified by its unique Id.
|
Section |
getSection(int publicationId,
String sectionName)
Deprecated.
Retrieves a section, as specified by its section name, and the publication it belongs to.
|
Section |
getSection(int publicationId,
String source,
String sourceId)
Deprecated.
Retrieves a section, as specified by its external source and external Id, for a given publication.
|
Section |
getSectionByUniqueName(int publicationId,
String uniqueName)
Deprecated.
Retrieves a section, as specified by its unique name, and the publication it belongs to.
|
Section |
getSectionByUrl(String pUrl)
Deprecated.
Retrieves a section by url.
|
Section |
getSectionByUrl(String pUrl,
int pPublicationId)
Deprecated.
Retrieves a section by url.
|
int |
getSectionIdByURIAlias(int pPublicationId,
URI pURI)
Deprecated.
Retrieves section by publicationID and URI from HistoricalURI
|
neo.xredsys.content.SectionManager |
getSectionManager()
Deprecated.
|
String |
getSectionParameter(int pSectionId,
String pParameterName)
Deprecated.
Retrieves the value of the specified section parameter, or
use the inherited value if it is not specified in this section.
|
Set |
getSectionParameterNameSet(int pSectionId)
Deprecated.
Retrieves a
java.util.Set containing the names of all parameters in this section,
included inherited parameters from parent sections. |
Map |
getSectionParameters(int pSectionId)
Deprecated.
Retrieves a immutable
java.util.Map containing all parameters in this section,
included inherited parameters from parent sections. |
Vector |
getSections(int pubId)
Deprecated.
Retrieves all sections in the given publication.
|
Vector |
getSections(int pubId,
int sectionType)
Deprecated.
Retrieves all sections of the given type belonging to the given publication.
|
Vector |
getSections(int pubId,
int sectionType,
int sectionState)
Deprecated.
Retrieves all sections of the given type and state belonging to the given publication.
|
Vector |
getSectionsByState(int pubId,
int sectionState)
Deprecated.
Retrieves all sections of the given state belonging to the given publication.
|
int[] |
getSectionsIds(int pubId)
Deprecated.
Retrieves the ids of all sections in the given publication.
|
long |
getTimeSlot()
Deprecated.
Gets the current time slot a token is valid.
|
User |
getUser(int personId,
int pubId)
Deprecated.
Retrieves a specific user by his id and the id of the publication this user belongs to
|
User |
getUser(Person person,
int pubId)
Deprecated.
Retrieves a specific user by his
Person representation and the id of the publication this user belongs to |
User |
getUser(String userName)
Deprecated.
Retrieves a specific user by his user-name
|
User |
getUser(String userName,
int pubId)
Deprecated.
Retrieves a specific user by his user-name and the id of the publication this user belongs to
|
User |
getUserBySourceAndSourceId(String pSource,
String pSourceId,
int pPublicationId)
Deprecated.
Retrieves a user by source and source id.
|
UserGroup |
getUserGroup(int userGroupId,
int pubId)
Deprecated.
Retrieves a specific
UserGroup . |
UserGroup |
getUserGroup(String name,
int pubId)
Deprecated.
Retrieves a specific
UserGroup . |
neo.xredsys.dao.UserGroupDao |
getUserGroupDao()
Deprecated.
|
Collection |
getUserSections(User pUser,
String pRole)
Deprecated.
Retrieves all
Sections where the given user has a role. |
Collection |
getUserSections(User pUser,
String pRole,
int pubId)
Deprecated.
Will return a user's sections.
|
Map |
getUserSectionsWitRoles(User pUser,
String pRole,
int pubId)
Deprecated.
Retrieves a map with all
Sections where the given
user has a role. |
Section[] |
getVirtualSections(int pSectionId)
Deprecated.
Retrieves all the targets of a virtual source.
|
Section[] |
getVirtualSource()
Deprecated.
Retrieves all virtual source sections.
|
boolean |
hasRole(Member pMember,
IOObject pObject,
String pRole)
Deprecated.
Check if the given member has the specified role on this
IOObject . |
boolean |
hasRole(Member pMember,
ProtectionDomain protectionDomain,
String pRole)
Deprecated.
Check if the given member has the specified role on this
ProtectionDomain . |
boolean |
hasRoleFromGroup(Person person,
Section section,
String role)
Deprecated.
Checks wether or not any of the groups this person is memebr of has the specified role on the given section.
|
boolean |
isAuthorized(UserGroup group,
Section section,
String role)
Deprecated.
Checks wether or not this
UserGroup has the specified role on the given section. |
boolean |
isPubAdmin(Person pPerson)
Deprecated.
Checks wether or not the given person is admin of a publication.
|
boolean |
isTokenValid(IOObject pObject,
String pToken)
Deprecated.
This method will verify if the given token is valid or not.
|
void |
setACLManager(neo.xredsys.acl.ACLManager pACLManager)
Deprecated.
|
void |
setArticleManager(neo.xredsys.content.article.ArticleManager pArticleManager)
Deprecated.
|
void |
setEntityManager(neo.xredsys.content.entity.EntityManager pEntityManager)
Deprecated.
|
void |
setPermissionChecker(neo.xredsys.auth.PermissionChecker<IOObject> pPermissionChecker)
Deprecated.
|
void |
setPersonDao(neo.xredsys.dao.PersonDao pPersonDao)
Deprecated.
|
void |
setPersonManager(neo.xredsys.content.person.PersonManager pPersonManager)
Deprecated.
|
void |
setRoleManager(neo.xredsys.auth.RoleManager pRoleManager)
Deprecated.
|
void |
setSectionManager(neo.xredsys.content.SectionManager pSectionManager)
Deprecated.
|
void |
setTimeSlot(long pTimeSlot)
Deprecated.
The time slot a token is valid.
|
void |
setUserGroupDao(neo.xredsys.dao.UserGroupDao pUserGroupDao)
Deprecated.
|
public void setPermissionChecker(neo.xredsys.auth.PermissionChecker<IOObject> pPermissionChecker)
public neo.xredsys.auth.PermissionChecker getPermissionChecker()
public neo.xredsys.content.article.ArticleManager getArticleManager()
public void setArticleManager(neo.xredsys.content.article.ArticleManager pArticleManager)
public neo.xredsys.content.entity.EntityManager getEntityManager()
public void setEntityManager(neo.xredsys.content.entity.EntityManager pEntityManager)
public neo.xredsys.content.SectionManager getSectionManager()
public void setSectionManager(neo.xredsys.content.SectionManager pSectionManager)
public neo.xredsys.content.person.PersonManager getPersonManager()
public void setPersonManager(neo.xredsys.content.person.PersonManager pPersonManager)
public neo.xredsys.dao.PersonDao getPersonDao()
public void setPersonDao(neo.xredsys.dao.PersonDao pPersonDao)
public neo.xredsys.dao.UserGroupDao getUserGroupDao()
public void setUserGroupDao(neo.xredsys.dao.UserGroupDao pUserGroupDao)
public neo.xredsys.acl.ACLManager getACLManager()
public void setACLManager(neo.xredsys.acl.ACLManager pACLManager)
public neo.xredsys.auth.RoleManager getRoleManager()
public void setRoleManager(neo.xredsys.auth.RoleManager pRoleManager)
public IOObject getObject(int type, int objectId, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
IOObject
requested. The arguments must specify the type of object requested and the unique Id of the object, in addition to the publication that the object belongs to.getObject
in interface ObjectLoader
type
- The typeId of the IOObject
requested, as defined in IOAtom
objectId
- The id of the IOObject
requestedpubId
- The id of the publication the IOObject
belongs toIOObject
if successful, null otherwise.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic IOObject getObject(IOHashKey object) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
IOObject
requested. IOHashKey
objects uniquely identifies IOObjects
.getObject
in interface ObjectLoader
object
- an IOHashKey
that describes the object wantedIOObject
if successful, null otherwise.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIOHashKey
public ReferenceEntity getReferenceEntity(String name, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
ReferenceEntity
with the given name in the specified publication Id.getReferenceEntity
in interface ObjectLoader
name
- The name of the ReferenceEntity
requestedpubId
- The id of the publication the ReferenceEntity
belongs toReferenceEntity
if successful, null otherwise.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existObjectLoader.getReferenceEntities(java.lang.String, neo.xredsys.api.Type, int, boolean)
public int[] getReferenceEntityIds(int referenceType, int referenceState) throws PersistentStoreException
ObjectLoader
TypeManager#getTypes(neo.xredsys.api.Type.Category#Type.EntityType)
.
Typical String
representations of types are:
TypeManager#getTypes(neo.xredsys.api.Type.Category#Type.EntityStateType)
.
Typical String
representations of states are:
getReferenceEntityIds
in interface ObjectLoader
referenceType
- the int
representation of the type of enities to retrievereferenceState
- the state of the entities to retrieveArray
of enitity idsPersistentStoreException
- if an error occurs in the persistence layerType
,
TypeManager
public ReferenceEntity getReferenceEntity(String name, int pubId, boolean exact) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
ReferenceEntity
with the given name in the specified publication Id.getReferenceEntity
in interface ObjectLoader
name
- The name of the ReferenceEntity
requestedpubId
- The id of the publication the ReferenceEntity
belongs toexact
- Set to true to only get exact match. If false this is a starts with name
lookup.ReferenceEntity
if successful, null otherwise.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existObjectLoader.getReferenceEntities(java.lang.String, neo.xredsys.api.Type, int, boolean)
public ReferenceEntity[] getReferenceEntities(String name, Type referenceType, int pubId, boolean exact) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
ReferenceEntity
objects with the given name and type
in the specified publication Id.getReferenceEntities
in interface ObjectLoader
name
- The name of the ReferenceEntity
requestedreferenceType
- the type of ReferenceEntity
pubId
- The publication id to use as a hint for looking up the entity in the cache. If the entity does not
exist in the cache, the pubId is ignored.exact
- Set to true to only get exact match. If false this is a starts with name
lookup.ReferenceEntity
objectsPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic ReferenceEntity getReferenceEntity(String source, String sourceId, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
ReferenceEntity
with the specified source and sourceId combination. The combination of source and sourceId should be unique.getReferenceEntity
in interface ObjectLoader
source
- The name of the external source that created this ReferenceEntity
sourceId
- The external Id of the ReferenceEntity
in the named external sourcepubId
- The id of the publication the ReferenceEntity
belongs toReferenceEntity
if successful, null otherwise.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic ReferenceEntity getReferenceEntity(String source, String sourceId, Type referenceType, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
ReferenceEntity
with the specified source and sourceId combination. The combination of source and sourceId should be unique.
A short example:
ObjectLoader loader = IOAPI.getAPI().getObjectLoader(); Type image = IOAPI.getAPI().getTypeManager().typeManager.getType(Type.EntityType, "Image"); ReferenceEntity refEnt = loader.getReferenceEntity(source, sourceid, image, pubId);
Please note the capitalized "Image". The constants from FieldConstants
cannot be used here.
getReferenceEntity
in interface ObjectLoader
source
- The name of the external source that created this ReferenceEntity
sourceId
- The external Id of the ReferenceEntity
in the named external sourcereferenceType
- The type of the reference entity, "Link", "Image", "Media", "Person"pubId
- The id of the publication the ReferenceEntity
belongs toReferenceEntity
if successful, null otherwise.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic ReferenceEntity getReferenceEntity(int objectId, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
ReferenceEntity
requested.getReferenceEntity
in interface ObjectLoader
objectId
- The id of the ReferenceEntity
requestedpubId
- The id of the publication the ReferenceEntity
belongs toReferenceEntity
if successful, null otherwise.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Collection<ArticleLog> getArticleLogEntries(int articleId)
ObjectLoader
getArticleLogEntries
in interface ObjectLoader
articleId
- the id of the article to search for log entriesCollection
of ArticleLog objectspublic Collection<ArticleLog> getLatestArticleLogEntries(int articleId, int numberOfEntries) throws PersistentStoreException
ObjectLoader
getLatestArticleLogEntries
in interface ObjectLoader
articleId
- the id of the article to search for log entriesnumberOfEntries
- the number og log entries to returnPersistentStoreException
- if an error occurs in the persistence layerpublic List<ArticleLog> getLatestArticleLogEntries(int articleId, int numberOfEntries, int pFrom, boolean desc) throws PersistentStoreException
ObjectLoader
getLatestArticleLogEntries
in interface ObjectLoader
articleId
- the id of the article to search for log entriesnumberOfEntries
- the number og log entries to returnpFrom
- the id of the article log entry to query fromdesc
- how to sort the log entriesPersistentStoreException
- if an error occurs in the persistence layerpublic Article getArticle(int articleId, Publication pub) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getArticle
in interface ObjectLoader
articleId
- The id of the article requestedpub
- The publication the article belongs toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Article getArticle(int articleId, String contentType, int pubId) throws PersistentStoreException
ObjectLoader
getArticle
in interface ObjectLoader
articleId
- The id of the article requestedcontentType
- The content-type of the article requested. This attribute is not in use anymorepubId
- The id of the publication the article belongs toPersistentStoreException
- if an error occurs in the persistence layerpublic Article getArticle(int articleId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getArticle
in interface ObjectLoader
articleId
- The id of the article requestedPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if this article does not exist in the databasepublic Article getArticle(int articleId, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getArticle
in interface ObjectLoader
articleId
- The id of the article requestedpubId
- The id of the publication the article belongs toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Article getArticle(String source, String sourceId, Publication pub) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getArticle
in interface ObjectLoader
source
- The external source of this articlesourceId
- The external sourceId of this articlepub
- The publication the article belongs toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Article getArticle(String source, int sourceId, Publication pub) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getArticle
in interface ObjectLoader
source
- The external source of this articlesourceId
- The external sourceId of this articlepub
- The publication the article belongs toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Article getArticle(String source, int sourceId, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getArticle
in interface ObjectLoader
source
- The external source of this articlesourceId
- The external sourceId of this articlepubId
- The id of the publication the article belongs toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Article getArticle(String source, String sourceId, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getArticle
in interface ObjectLoader
source
- The external source of this articlesourceId
- The external sourceId of this articlepubId
- The id of the publication the article belongs toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Article[] getArticles(int[] articleIds) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getArticles
in interface ObjectLoader
articleIds
- an array of article ID'sPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Article[] getArticles(int[] articleIds, int publicationID) throws PersistentStoreException, NoSuchObjectException
public ArticleIterator getArticlesByType(String pType, int pPublicationId)
ObjectLoader
getArticlesByType
in interface ObjectLoader
pType
- The name of the article typepPublicationId
- The id of the publication the article belongs topublic Article getArticleByUrl(String pUrl, int pPublicationId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getArticleByUrl
in interface ObjectLoader
pUrl
- The relative part (to home section) of the url.pPublicationId
- The id of the publication the article belongs toarticle
object if found, null
if not.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic int getSectionIdByURIAlias(int pPublicationId, URI pURI)
ObjectLoader
getSectionIdByURIAlias
in interface ObjectLoader
pPublicationId
- the id of the publicationpURI
- the old URI of the section, which was changed later onpublic Section getSection(int sectionId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getSection
in interface ObjectLoader
sectionId
- the id of the section to retrievePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Section getSection(int publicationId, String sectionName) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getSection
in interface ObjectLoader
publicationId
- the id of the publicationsectionName
- the name of the section to retrievePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Section getSectionByUniqueName(int publicationId, String uniqueName) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getSectionByUniqueName
in interface ObjectLoader
publicationId
- the id of the publicationuniqueName
- the unique name of the sectionPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Section getSectionByUrl(String pUrl) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getSectionByUrl
in interface ObjectLoader
pUrl
- the url of the sectionPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Section getSection(int publicationId, String source, String sourceId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getSection
in interface ObjectLoader
publicationId
- the id of the publicationsource
- external source of the sectionsourceId
- external sourceId of the sectionPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Vector getSections(int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
If you have more than 1000 sections and you want to retrieve all of them by using this method then some additional configuration is needed. You need to set the getSectionsLimit property of neo/io/managers/SectionManager component in your configuration layer. Although this configuration change will make the method return more than 1000 sections but it is not recommended way to traverse the sections. Because if the publication has many sections than executing this method will lower the server performance.
If you want to operate on all sections it is better to traverse the section tree and call
Section.getSubSections()
, as this is usually closer to what you want to do in most cases. And it is also
the recommended way of traversing the section tree.
getSections
in interface ObjectLoader
pubId
- the id of the publication to search inVector
of Section
objectsPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Collection<Section> getNonInheritSections(int pubId)
ObjectLoader
getNonInheritSections
in interface ObjectLoader
pubId
- the id of the publication to search for sections that does not inherit access rightspublic Vector getSections(int pubId, int sectionType) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getSections
in interface ObjectLoader
pubId
- the id of the publication to search insectionType
- the type of sections to retrieveVector
of Section
objectsPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic int[] getSectionsIds(int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getSectionsIds
in interface ObjectLoader
pubId
- the id of the publication to search inPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Vector getSections(int pubId, int sectionType, int sectionState) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getSections
in interface ObjectLoader
pubId
- the id of the publication to search insectionType
- the type of sections to retrievesectionState
- the state of the sections to retrieveVector
of SectionsPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Vector getSectionsByState(int pubId, int sectionState) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
TypeManager
.getSectionsByState
in interface ObjectLoader
pubId
- the id of the publication to search insectionState
- the state of the sections to retrieveVector
of Section
objectsPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if one of the sections refers to an object that does not existpublic Section[] getVirtualSections(int pSectionId) throws PersistentStoreException
ObjectLoader
Section
objects, each
of which is a virtual section with its source set to pSectionId. The list of sections will include sections from other
publications, if they exist.getVirtualSections
in interface ObjectLoader
pSectionId
- the section id of the virtual sourcePersistentStoreException
- if some database error occurspublic Section[] getVirtualSource() throws PersistentStoreException
ObjectLoader
getVirtualSource
in interface ObjectLoader
Array
of Section
objectsPersistentStoreException
- if some database error occurspublic Collection getUserSections(User pUser, String pRole) throws PersistentStoreException
ObjectLoader
Sections
where the given user has a role.getUserSections
in interface ObjectLoader
pUser
- retrieve all Sections
where this user has a rolepRole
- retrieve all Sections
where the given user has this rolePersistentStoreException
- if some store error occurspublic Collection getUserSections(User pUser, String pRole, int pubId) throws PersistentStoreException
getUserSections
in interface ObjectLoader
pUser
- retrieve all Sections
where this user has a rolepRole
- retrieve all Sections
where the given user has this rolepubId
- the id of the publication to search in for sectionsPersistentStoreException
- if some store error occurspublic Map getUserSectionsWitRoles(User pUser, String pRole, int pubId) throws PersistentStoreException
ObjectLoader
Sections
where the given
user has a role. The section is the key and the user's set of
roles for each section is the value. The roles is included as a
java.util.Set where each role is a String.getUserSectionsWitRoles
in interface ObjectLoader
pUser
- retrieve all Sections
where this user has a rolepRole
- retrieve all Sections
where the given user has this rolepubId
- the id of the publication to search in for sectionsPersistentStoreException
- if some store error occurspublic Pool getPool(int poolId, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getPool
in interface ObjectLoader
poolId
- the id of the pool to retrievepubId
- the id of the publication in which this pool should be foundPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Layout getLayout(int layoutId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getLayout
in interface ObjectLoader
layoutId
- the id of the Layout
object to retrieveLayout
object if found, null otherwisePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Section getSectionByUrl(String pUrl, int pPublicationId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getSectionByUrl
in interface ObjectLoader
pUrl
- the url of the sectionpPublicationId
- the publication id to use.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic boolean existsSectionWithUrl(String pSectionUrl, int pPublicationId)
ObjectLoader
existsSectionWithUrl
in interface ObjectLoader
pSectionUrl
- The url to check for existing sectionspPublicationId
- the publication idpublic neo.xredsys.acl.Role getRole(String pRoleName, String pContext)
getRole
in interface ObjectLoader
public boolean existsSectionWithUrl(String pSectionUrl) throws PersistentStoreException
ObjectLoader
existsSectionWithUrl
in interface ObjectLoader
pSectionUrl
- The url to check for existing sectionsPersistentStoreException
public Publication getPublicationById(int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getPublicationById
in interface ObjectLoader
pubId
- the id of the publication to getPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic PublicationImpl getPublication(int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getPublication
in interface ObjectLoader
PersistentStoreException
NoSuchObjectException
public AgreementInfo getAgreementInfo(int agreementId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getAgreementInfo
in interface ObjectLoader
agreementId
- the id of the agreement to retrievePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if the agreement does not existpublic Publication getPublication(String pubName) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getPublication
in interface ObjectLoader
pubName
- the name of the publication to getPublication
object if successful. will never return nullPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve a publication that does not existpublic Collection getFriendlyIds(int pPublicationId)
getFriendlyIds
in interface ObjectLoader
public Collection getExportedIds(int pPublicationId)
getExportedIds
in interface ObjectLoader
public Collection getFriendlyPublications(Person pPerson)
getFriendlyPublications
in interface ObjectLoader
public Collection getArticlesByState(int codeID) throws PersistentStoreException
ObjectLoader
getArticlesByState
in interface ObjectLoader
codeID
- the state of the articlesCollection
of ints which represent article IDs.PersistentStoreException
- if an error occurs in the persistence layerpublic Collection getArticlesByState(int codeID, int[] pubIds) throws PersistentStoreException
ObjectLoader
getArticlesByState
in interface ObjectLoader
codeID
- the state of the articlespubIds
- an array of publication IDsCollection
of ints which represent article IDs.PersistentStoreException
- if an error occurs in the persistence layerpublic Collection<Integer> getFriendlyPublicationIds(Person pPerson)
getFriendlyPublicationIds
in interface ObjectLoader
public Publication[] getPublications() throws PersistentStoreException
ObjectLoader
getPublications
in interface ObjectLoader
Publication
objectsPersistentStoreException
- if an error occurs in the persistence layerpublic int[] getPublicationIds() throws PersistentStoreException
ObjectLoader
getPublicationIds
in interface ObjectLoader
int[]
valuePersistentStoreException
- if an error occurs in the persistence layerpublic boolean hasRole(Member pMember, IOObject pObject, String pRole) throws NoSuchObjectException
ObjectLoader
IOObject
.hasRole
in interface ObjectLoader
pMember
- the member to check for neccesary rightspObject
- the IOObject
to check for the specified member with the specified rolepRole
- the role this member should have on the specified IOObject
NoSuchObjectException
- if member or IOObject
could not be foundpublic boolean hasRole(Member pMember, ProtectionDomain protectionDomain, String pRole)
ObjectLoader
ProtectionDomain
.hasRole
in interface ObjectLoader
pMember
- the member to check for neccesary rightsprotectionDomain
- the Protection
to check for the specified member with the specified rolepRole
- the role this member should have on the specified ProtectionDomain
public boolean hasRoleFromGroup(Person person, Section section, String role) throws NoSuchObjectException
ObjectLoader
hasRoleFromGroup
in interface ObjectLoader
person
- the Person
to check for rights on the given sectionsection
- the section to check if UserGroups
is authorized with the give rolerole
- check if UserGroup
has this role on the given sectionNoSuchObjectException
- if member or IOObject
could not be foundpublic Person getPerson(int personId, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getPerson
in interface ObjectLoader
personId
- the id of the person to retrievepubId
- The publication id to use as a hint for looking up the entity in the cache. If the entity does not
exist in the cache, the pubId is ignored.PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic Person getPerson(int personId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getPerson
in interface ObjectLoader
personId
- the id of the person to retrievePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existpublic List<Person> getPersons(String pEmail, List<Publication> pPublications) throws SQLException
ObjectLoader
Publication
with the given email
addressgetPersons
in interface ObjectLoader
pEmail
- the email address for personspPublications
- the List of Publication from where person will be looked up.
Can be null
to search from all publication.List
of Person
SQLException
public User getUser(int personId, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getUser
in interface ObjectLoader
personId
- the id of the user to retrievepubId
- the id of the publication this user belongs toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
public User getUser(String userName) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getUser
in interface ObjectLoader
userName
- the user-name of the user to retrievePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
public User getUser(String userName, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getUser
in interface ObjectLoader
userName
- the user-name of the user to retrievepubId
- the id of the publication this user belongs toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
public User getUser(Person person, int pubId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
Person
representation and the id of the publication this user belongs togetUser
in interface ObjectLoader
person
- the Person
representation of the user to retrievepubId
- the id of the publication this user belongs toPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
public Person getPersonBySourceAndSourceId(String pSource, String pSourceId, int pPublicationId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getPersonBySourceAndSourceId
in interface ObjectLoader
pSource
- source to look forpSourceId
- sourceId to look forpPublicationId
- the publication idPersistentStoreException
NoSuchObjectException
public User getUserBySourceAndSourceId(String pSource, String pSourceId, int pPublicationId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getUserBySourceAndSourceId
in interface ObjectLoader
pSource
- source to look forpSourceId
- sourceId to look forpPublicationId
- the publication idPersistentStoreException
NoSuchObjectException
public Publication[] getPublications(Person person) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getPublications
in interface ObjectLoader
person
- the person to check for related publicationsCollection
containing ids of all publications where the given person has access rights.PersistentStoreException
- if some database error occursNoSuchObjectException
public Publication[] getPublications(int personId) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
getPublications
in interface ObjectLoader
personId
- the id of the person to check for related publicationsCollection
containing ids of all publications where the given person has access rights.PersistentStoreException
- if some database error occursNoSuchObjectException
public void cacheObject(IOObject object)
public boolean isAuthorized(UserGroup group, Section section, String role) throws NoSuchObjectException
ObjectLoader
UserGroup
has the specified role on the given section.isAuthorized
in interface ObjectLoader
section
- the section to check if UserGroup
is authorized with the give rolerole
- check if UserGroup
has this role on the given sectionUserGroup
has this role on the given section; otherwise falseNoSuchObjectException
- if member or IOObject
could not be foundpublic UserGroup getUserGroup(String name, int pubId)
ObjectLoader
UserGroup
.getUserGroup
in interface ObjectLoader
name
- the name of the UserGroup
to retrievepubId
- the id of the publication the UserGroup
in question belong topublic UserGroup getUserGroup(int userGroupId, int pubId)
ObjectLoader
UserGroup
.getUserGroup
in interface ObjectLoader
userGroupId
- the id of the UserGroup
to retrievepubId
- the id of the publication the UserGroup
in question belong topublic Collection<IOObject> getMembers(UserGroup pGroup) throws PersistentStoreException, NoSuchObjectException
ObjectLoader
UserGroup
. Members to return can be either persons or groups.getMembers
in interface ObjectLoader
pGroup
- the UserGroup
to retrieve members fromPersistentStoreException
- if some database error occursNoSuchObjectException
- if trying to retrieve an object that does not existpublic boolean isPubAdmin(Person pPerson)
ObjectLoader
isPubAdmin
in interface ObjectLoader
pPerson
- the person to check for admin rolepublic UserGroup getPublicationUsersGroup(int pubId) throws PersistentStoreException
ObjectLoader
getPublicationUsersGroup
in interface ObjectLoader
pubId
- the id of publication to retrieve the user group fromPersistentStoreException
- if an error occurs in the persistence layerpublic void setTimeSlot(long pTimeSlot)
ObjectLoader
setTimeSlot
in interface ObjectLoader
pTimeSlot
- the new time slotpublic long getTimeSlot()
ObjectLoader
getTimeSlot
in interface ObjectLoader
public boolean isTokenValid(IOObject pObject, String pToken)
ObjectLoader
isTokenValid
in interface ObjectLoader
pObject
- the IOObject to validate the token againstpToken
- the token to validatepublic String generateToken(IOObject pObject)
ObjectLoader
generateToken
in interface ObjectLoader
pObject
- the object used to generate the tokenpublic int[] getArticlesByUser(int personId, int maxCount) throws PersistentStoreException
ObjectLoader
getArticlesByUser
in interface ObjectLoader
personId
- the id of the personmaxCount
- max number of articles to retrievePersistentStoreException
public String getSectionParameter(int pSectionId, String pParameterName)
ObjectLoader
getSectionParameter
in interface ObjectLoader
pSectionId
- The ID of the section to fetch parameters frompParameterName
- name of the parameter to retrievepublic Set getSectionParameterNameSet(int pSectionId)
ObjectLoader
java.util.Set
containing the names of all parameters in this section,
included inherited parameters from parent sections.getSectionParameterNameSet
in interface ObjectLoader
pSectionId
- The ID of the section to fetch parameters fromSet
containing all parameter namespublic String getDeclaredSectionParameter(int pSectionId, String pParameterName)
ObjectLoader
getDeclaredSectionParameter
in interface ObjectLoader
pSectionId
- The ID of the section to fetch parameters frompParameterName
- name of the parameter to retrievepublic Set getDeclaredSectionParameterNameSet(int pSectionId)
ObjectLoader
getDeclaredSectionParameterNameSet
in interface ObjectLoader
pSectionId
- The ID of the section to fetch parameters fromSet
containg all parameter names in this sectionSet
public Map getSectionParameters(int pSectionId)
ObjectLoader
java.util.Map
containing all parameters in this section,
included inherited parameters from parent sections.getSectionParameters
in interface ObjectLoader
pSectionId
- The ID of the section to fetch parameters fromMap
containing all parameterspublic Map getDeclaredSectionParameters(int pSectionId)
ObjectLoader
java.util.Map
containing all specified parameters in this sectiondisregarding any
inherited value.getDeclaredSectionParameters
in interface ObjectLoader
pSectionId
- The ID of the section to fetch parameters fromMap
containing all parameters© 1998- 2018 Stibo DX