public interface ObjectLoader
getObjectLoader()
.
The methods available to the user of the ObjectLoader instance are explained below.
Popular methods include getArticle(java.lang.String, java.lang.String, neo.xredsys.api.Publication)
, to retrieve single articles by Id,
and getArticles(int[])
, to perform searches for particular articles.Modifier and Type | Method and Description |
---|---|
boolean |
existsSectionWithUrl(String pSectionUrl)
Deprecated.
returns true every time, use
instead |
boolean |
existsSectionWithUrl(String pSectionUrl,
int pPublicationId)
Tests if a section with the given URL exists.
|
String |
generateToken(IOObject pObject)
Generate a token to be used when preview the given IOObject.
|
AgreementInfo |
getAgreementInfo(int agreementId)
Retrieves a specific agreement by id.
|
Article |
getArticle(int articleId)
Retrieves the article object requested, based on the internal article id.
|
Article |
getArticle(int articleId,
int pubId)
Retrieves the article object requested, based on the internal article id and publication id.
|
Article |
getArticle(int articleId,
Publication pub)
Retrieves the article object requested, based on the internal article Id and publication.
|
Article |
getArticle(int articleId,
String contentType,
int pubId)
Deprecated.
use
getArticle(int,int) instead |
Article |
getArticle(String source,
int sourceId,
int pubId)
Retrieves the article object requested, based on the article's external source and external Id.
|
Article |
getArticle(String source,
int sourceId,
Publication pub)
Retrieves the article object requested, based on the article's external source and external id.
|
Article |
getArticle(String source,
String sourceId,
int pubId)
Retrieves the article object requested, based on the article's external source and external Id.
|
Article |
getArticle(String source,
String sourceId,
Publication pub)
Retrieves the article object requested, based on the article's external source and external Id.
|
Article |
getArticleByUrl(String pUrl,
int pPublicationId)
Retrieves an Article by the relative url.
|
Collection<ArticleLog> |
getArticleLogEntries(int articleId)
Retrieves all log entries belonging to the specified
article.
|
Article[] |
getArticles(int[] articleIds)
Retrieves a list of articles.
|
Collection |
getArticlesByState(int codeID)
Deprecated.
no replacement
|
Collection |
getArticlesByState(int codeID,
int[] pubIds)
Deprecated.
no replacement
|
ArticleIterator |
getArticlesByType(String pType,
int pPublicationId)
Deprecated.
no replacement
|
int[] |
getArticlesByUser(int personId,
int maxCount)
Retrieves an array of articles the user has modified.
|
String |
getDeclaredSectionParameter(int pSectionId,
String pParameterName)
Retrieves the value of the specified parameter in this section, disregarding any
inherited value.
|
Set |
getDeclaredSectionParameterNameSet(int pSectionId)
Retrieves java.util.Set containing the names of all paramters in this section, disregarding any
inherited parameters.
|
Map |
getDeclaredSectionParameters(int pSectionId)
Retrieves a immutable
java.util.Map containing all specified parameters in this sectiondisregarding any
inherited value. |
Collection |
getExportedIds(int pPublicationId)
Deprecated.
The friendly publication concept is not used any more.
Add the appropriate
ProtectionDomain and list of roles to the user instead. |
Collection |
getFriendlyIds(int pPublicationId)
Deprecated.
The friendly publication concept is not used any more.
Add the appropriate
ProtectionDomain and list of roles to the user instead. |
Collection<Integer> |
getFriendlyPublicationIds(Person pPerson)
Deprecated.
The friendly publication concept is not used any more.
Add the appropriate
ProtectionDomain and list of roles to the user instead. |
Collection |
getFriendlyPublications(Person pPerson)
Deprecated.
The friendly publication concept is not used any more.
Add the appropriate
ProtectionDomain and list of roles to the user instead. |
Collection<ArticleLog> |
getLatestArticleLogEntries(int articleId,
int numberOfEntries)
Retrieves the latest log entries for the specified article.
|
List<ArticleLog> |
getLatestArticleLogEntries(int articleId,
int numberOfEntries,
int pFrom,
boolean desc)
Retrieves the latest log entries for the specified article.
|
Layout |
getLayout(int layoutId)
Retrieves a Layout object, as specified by its unique Id.
|
Collection |
getMembers(UserGroup group)
Retrieves the members of this
UserGroup . |
Collection<Section> |
getNonInheritSections(int pubId)
Retrieves all sections in the given publication that does not inherit access rights.
|
IOObject |
getObject(int type,
int objectId,
int pubId)
Retrieves the
IOObject requested. |
IOObject |
getObject(IOHashKey key)
Retrieves the
IOObject requested. |
Person |
getPerson(int personId)
Retrieves a person-object
|
Person |
getPerson(int personId,
int pubId)
Retrieves a person-object
|
Person |
getPersonBySourceAndSourceId(String pSource,
String pSourceId,
int pPublicationId)
Retrieves a person by source and source id.
|
List<Person> |
getPersons(String pEmail,
List<Publication> pPublications)
Retrieves all person-object from the
Publication with the given email address |
Pool |
getPool(int poolId,
int pubId)
Retrieves a pool, as specified by its unique Id.
|
PublicationImpl |
getPublication(int pubId)
Deprecated.
Use
getPublicationById(int) instead. |
Publication |
getPublication(String pubName)
Retrieves the publication with name pubName
|
Publication |
getPublicationById(int pubId)
Retrieves the publication with id pubId
|
int[] |
getPublicationIds()
Returns an array holding ids for all publications.
|
Publication[] |
getPublications()
Retrieves an array of all publications in the database.
|
Publication[] |
getPublications(int personId)
Retrieves the ids of all publications where the given person has access rights.
|
Publication[] |
getPublications(Person person)
Retrieves the ids of all publications where the given person has access rights.
|
UserGroup |
getPublicationUsersGroup(int pubId)
Retrieves the group containing all users belonging to the given publication.
|
ReferenceEntity[] |
getReferenceEntities(String name,
Type referenceType,
int pubId,
boolean exact)
Retrieves all
ReferenceEntity objects with the given name and type
in the specified publication Id. |
ReferenceEntity |
getReferenceEntity(int objectId,
int pubId)
Retrieves the
ReferenceEntity requested. |
ReferenceEntity |
getReferenceEntity(String name,
int pubId)
Deprecated.
The return value from this method was never well defined
|
ReferenceEntity |
getReferenceEntity(String name,
int pubId,
boolean exact)
Deprecated.
The return value from this method was never well defined
|
ReferenceEntity |
getReferenceEntity(String source,
String sourceId,
int pubId)
Deprecated.
Use getReferenceEntity(String, String, Type, int)
|
ReferenceEntity |
getReferenceEntity(String source,
String sourceId,
Type referenceType,
int pubId)
Retrieves the
ReferenceEntity with the specified source and sourceId combination. |
int[] |
getReferenceEntityIds(int referenceType,
int referenceState)
Retrieves all entities of a given type and state.
|
neo.xredsys.acl.Role |
getRole(String pRoleName,
String pContext) |
Section |
getSection(int sectionId)
Retrieves a section, as specified by its unique Id.
|
Section |
getSection(int publicationId,
String sectionName)
Retrieves a section, as specified by its section name, and the publication it belongs to.
|
Section |
getSection(int publicationId,
String source,
String sourceId)
Retrieves a section, as specified by its external source and external Id, for a given publication.
|
Section |
getSectionByUniqueName(int publicationId,
String uniqueName)
Retrieves a section, as specified by its unique name, and the publication it belongs to.
|
Section |
getSectionByUrl(String pUrl)
Deprecated.
use
getSectionByUrl(String, int) instead |
Section |
getSectionByUrl(String pUrl,
int pPublicationId)
Retrieves a section by url.
|
int |
getSectionIdByURIAlias(int pPublicationId,
URI pURI)
Retrieves section by publicationID and URI from HistoricalURI
|
String |
getSectionParameter(int pSectionId,
String pParameterName)
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)
Retrieves a
java.util.Set containing the names of all parameters in this section,
included inherited parameters from parent sections. |
Map |
getSectionParameters(int pSectionId)
Retrieves a immutable
java.util.Map containing all parameters in this section,
included inherited parameters from parent sections. |
Vector |
getSections(int pubId)
Retrieves all sections in the given publication.
|
Vector |
getSections(int pubId,
int sectionType)
Retrieves all sections of the given type belonging to the given publication.
|
Vector |
getSections(int pubId,
int sectionType,
int sectionState)
Retrieves all sections of the given type and state belonging to the given publication.
|
Vector |
getSectionsByState(int pubId,
int sectionState)
Retrieves all sections of the given state belonging to the given publication.
|
int[] |
getSectionsIds(int pubId)
Retrieves the ids of all sections in the given publication.
|
long |
getTimeSlot()
Gets the current time slot a token is valid.
|
User |
getUser(int personId,
int pubId)
Retrieves a specific user by his id and the id of the publication this user belongs to
|
User |
getUser(Person person,
int pubId)
Retrieves a specific user by his
Person representation and the id of the publication this user belongs to |
User |
getUser(String userName)
Retrieves a specific user by his user-name
|
User |
getUser(String userName,
int pubId)
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)
Retrieves a user by source and source id.
|
UserGroup |
getUserGroup(int pId,
int pubId)
Retrieves a specific
UserGroup . |
UserGroup |
getUserGroup(String name,
int pubId)
Retrieves a specific
UserGroup . |
Collection |
getUserSections(User pUser,
String pRole)
Retrieves all
Sections where the given user has a role. |
Collection |
getUserSections(User pUser,
String pRole,
int pPublicationID)
Retrieves all
Sections where the given user has a
role. |
Map |
getUserSectionsWitRoles(User pUser,
String pRole,
int pPublicationID)
Deprecated.
|
Section[] |
getVirtualSections(int pSectionId)
Retrieves all the targets of a virtual source.
|
Section[] |
getVirtualSource()
Retrieves all virtual source sections.
|
boolean |
hasRole(Member member,
IOObject ioObject,
String role)
Check if the given member has the specified role on this
IOObject . |
boolean |
hasRole(Member pMember,
ProtectionDomain pDomain,
String pRole)
Check if the given member has the specified role on this
ProtectionDomain . |
boolean |
hasRoleFromGroup(Person person,
Section section,
String role)
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.
use {#hasRole} instead
|
boolean |
isPubAdmin(Person person)
Checks wether or not the given person is admin of a publication.
|
boolean |
isTokenValid(IOObject pObject,
String pToken)
This method will verify if the given token is valid or not.
|
void |
setTimeSlot(long pTimeSlot)
The time slot a token is valid.
|
IOObject getObject(int type, int objectId, int pubId) throws PersistentStoreException, NoSuchObjectException
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.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 existAccessControlException
- if a security manager exists and access to the object is deniedIOObject getObject(IOHashKey key) throws PersistentStoreException, NoSuchObjectException
IOObject
requested. IOHashKey
objects uniquely identifies IOObjects
.key
- 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 existAccessControlException
- if a security manager exists and access to the object is deniedIOHashKey
ReferenceEntity getReferenceEntity(int objectId, int pubId) throws PersistentStoreException, NoSuchObjectException
ReferenceEntity
requested.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 existAccessControlException
- if a security manager exists and access to the reference entity is deniedReferenceEntity getReferenceEntity(String name, int pubId) throws PersistentStoreException, NoSuchObjectException
ReferenceEntity
with the given name in the specified publication Id.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 existAccessControlException
- if a security manager exists and access to the reference entity is deniedgetReferenceEntities(java.lang.String, neo.xredsys.api.Type, int, boolean)
ReferenceEntity getReferenceEntity(String name, int pubId, boolean exact) throws PersistentStoreException, NoSuchObjectException
ReferenceEntity
with the given name in the specified publication Id.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 existAccessControlException
- if a security manager exists and access to the reference entity is deniedgetReferenceEntities(java.lang.String, neo.xredsys.api.Type, int, boolean)
ReferenceEntity[] getReferenceEntities(String name, Type referenceType, int pubId, boolean exact) throws PersistentStoreException, NoSuchObjectException
ReferenceEntity
objects with the given name and type
in the specified publication Id.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
objectsIllegalArgumentException
- if referenceType is null
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existAccessControlException
- if a security manager exists and access to the reference entity is deniedReferenceEntity getReferenceEntity(String source, String sourceId, int pubId) throws PersistentStoreException, NoSuchObjectException
ReferenceEntity
with the specified source and sourceId combination. The combination of source and sourceId should be unique.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 existAccessControlException
- if a security manager exists and access to the reference entity is deniedReferenceEntity getReferenceEntity(String source, String sourceId, Type referenceType, int pubId) throws PersistentStoreException, NoSuchObjectException
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.
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 existAccessControlException
- if a security manager exists and access to the reference entity is deniedint[] getReferenceEntityIds(int referenceType, int referenceState) throws PersistentStoreException
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:
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
Collection<ArticleLog> getArticleLogEntries(int articleId) throws PersistentStoreException
articleId
- the id of the article to search for log entriesCollection
of ArticleLog objectsPersistentStoreException
- if an error occurs in the persistence layerCollection<ArticleLog> getLatestArticleLogEntries(int articleId, int numberOfEntries) throws PersistentStoreException
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 layerList<ArticleLog> getLatestArticleLogEntries(int articleId, int numberOfEntries, int pFrom, boolean desc) throws PersistentStoreException
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 layerArticle getArticle(String source, String sourceId, Publication pub) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the article is deniedArticle getArticle(String source, int sourceId, Publication pub) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the article is deniedArticle getArticle(int articleId, Publication pub) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the article is deniedArticle getArticle(String source, String sourceId, int pubId) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the article is deniedArticle getArticle(String source, int sourceId, int pubId) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the article is deniedArticle getArticle(int articleId, int pubId) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the article is deniedArticle getArticle(int articleId) throws PersistentStoreException, NoSuchObjectException
articleId
- The id of the article requestedPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if this article does not exist in the databaseAccessControlException
- if a security manager exists and access to the article is deniedArticle getArticle(int articleId, String contentType, int pubId) throws PersistentStoreException
getArticle(int,int)
insteadarticleId
- 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 layerAccessControlException
- if a security manager exists and access to the article is deniedArticle[] getArticles(int[] articleIds) throws PersistentStoreException, NoSuchObjectException
articleIds
- an array of article ID'sPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existArticleIterator getArticlesByType(String pType, int pPublicationId) throws PersistentStoreException, NoSuchObjectException
pType
- The name of the article typepPublicationId
- 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 existArticle getArticleByUrl(String pUrl, int pPublicationId) throws PersistentStoreException, NoSuchObjectException
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 existSection getSection(int sectionId) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the section is deniedint getSectionIdByURIAlias(int pPublicationId, URI pURI)
pPublicationId
- the id of the publicationpURI
- the old URI of the section, which was changed later onVector getSections(int pubId) throws PersistentStoreException, NoSuchObjectException
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.
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 existint[] getSectionsIds(int pubId) throws PersistentStoreException, NoSuchObjectException
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 existCollection<Section> getNonInheritSections(int pubId)
pubId
- the id of the publication to search for sections that does not inherit access rightsVector getSections(int pubId, int sectionType) throws PersistentStoreException, NoSuchObjectException
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 existVector getSections(int pubId, int sectionType, int sectionState) throws PersistentStoreException, NoSuchObjectException
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 existVector getSectionsByState(int pubId, int sectionState) throws PersistentStoreException, NoSuchObjectException
TypeManager
.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 existSection getSection(int publicationId, String sectionName) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the section is deniedSection[] getVirtualSections(int pSectionId) throws PersistentStoreException
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.pSectionId
- the section id of the virtual sourcePersistentStoreException
- if some database error occursSection[] getVirtualSource() throws PersistentStoreException
Array
of Section
objectsPersistentStoreException
- if some database error occursSection getSectionByUniqueName(int publicationId, String uniqueName) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the section is deniedSection getSectionByUrl(String pUrl) throws PersistentStoreException, NoSuchObjectException
getSectionByUrl(String, int)
insteadpUrl
- the url of the sectionPersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existSection getSectionByUrl(String pUrl, int pPublicationId) throws PersistentStoreException, NoSuchObjectException
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 existSection getSection(int publicationId, String source, String sourceId) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the section is deniedPool getPool(int poolId, int pubId) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the pool is deniedLayout getLayout(int layoutId) throws PersistentStoreException, NoSuchObjectException
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 existPublicationImpl getPublication(int pubId) throws PersistentStoreException, NoSuchObjectException
getPublicationById(int)
instead.Publication getPublicationById(int pubId) throws PersistentStoreException, NoSuchObjectException
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 exist@Deprecated Collection getFriendlyIds(int pPublicationId) throws PersistentStoreException, UnsupportedOperationException
ProtectionDomain
and list of roles to the user instead.UnsupportedOperationException
- always.PersistentStoreException
@Deprecated Collection getExportedIds(int pPublicationId) throws PersistentStoreException, UnsupportedOperationException
ProtectionDomain
and list of roles to the user instead.UnsupportedOperationException
- always.PersistentStoreException
@Deprecated Collection<Integer> getFriendlyPublicationIds(Person pPerson) throws PersistentStoreException, UnsupportedOperationException
ProtectionDomain
and list of roles to the user instead.UnsupportedOperationException
- always.PersistentStoreException
@Deprecated Collection getFriendlyPublications(Person pPerson) throws PersistentStoreException, UnsupportedOperationException
ProtectionDomain
and list of roles to the user instead.UnsupportedOperationException
- always.PersistentStoreException
Publication getPublication(String pubName) throws PersistentStoreException, NoSuchObjectException
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 existPublication[] getPublications() throws PersistentStoreException
Publication
objectsPersistentStoreException
- if an error occurs in the persistence layerint[] getPublicationIds() throws PersistentStoreException
int[]
valuePersistentStoreException
- if an error occurs in the persistence layerPublication[] getPublications(Person person) throws PersistentStoreException, NoSuchObjectException
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
Publication[] getPublications(int personId) throws PersistentStoreException, NoSuchObjectException
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
Person getPerson(int personId, int pubId) throws PersistentStoreException, NoSuchObjectException
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.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 existAccessControlException
- if a security manager exists and access to the person is deniedPerson getPerson(int personId) throws PersistentStoreException, NoSuchObjectException
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 existAccessControlException
- if a security manager exists and access to the person is deniedList<Person> getPersons(String pEmail, List<Publication> pPublications) throws SQLException
Publication
with the given email
addresspEmail
- 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
PersistentStoreException
- if an error occurs in the persistence layerSQLException
boolean hasRole(Member member, IOObject ioObject, String role) throws NoSuchObjectException
IOObject
.member
- the member to check for neccesary rightsioObject
- the IOObject
to check for the specified member with the specified rolerole
- the role this member should have on the specified IOObject
NoSuchObjectException
- if member or IOObject
could not be foundboolean hasRole(Member pMember, ProtectionDomain pDomain, String pRole)
ProtectionDomain
.pMember
- the member to check for neccesary rightspDomain
- the Protection
to check for the specified member with the specified rolepRole
- the role this member should have on the specified ProtectionDomain
boolean isAuthorized(UserGroup group, Section section, String role) throws NoSuchObjectException
UserGroup
has the specified role on the given section.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 foundboolean hasRoleFromGroup(Person person, Section section, String role) throws NoSuchObjectException
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 foundPerson getPersonBySourceAndSourceId(String pSource, String pSourceId, int pPublicationId) throws PersistentStoreException, NoSuchObjectException
pSource
- source to look forpSourceId
- sourceId to look forpPublicationId
- the publication idPersistentStoreException
NoSuchObjectException
User getUserBySourceAndSourceId(String pSource, String pSourceId, int pPublicationId) throws PersistentStoreException, NoSuchObjectException
pSource
- source to look forpSourceId
- sourceId to look forpPublicationId
- the publication idPersistentStoreException
NoSuchObjectException
User getUser(String userName) throws PersistentStoreException, NoSuchObjectException
userName
- the user-name of the user to retrievePersistentStoreException
- if an error occurs in the persistence layerAccessControlException
- if a security manager exists and access to the user is deniedNoSuchObjectException
User getUser(String userName, int pubId) throws PersistentStoreException, NoSuchObjectException
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 layerAccessControlException
- if a security manager exists and access to the user is deniedNoSuchObjectException
User getUser(int personId, int pubId) throws PersistentStoreException, NoSuchObjectException
personId
- the id of the user to retrievepubId
- the id of the publication this user belongs toPersistentStoreException
- if an error occurs in the persistence layerAccessControlException
- if a security manager exists and access to the user is deniedNoSuchObjectException
User getUser(Person person, int pubId) throws PersistentStoreException, NoSuchObjectException
Person
representation and the id of the publication this user belongs toperson
- the Person
representation of the user to retrievepubId
- the id of the publication this user belongs toPersistentStoreException
- if an error occurs in the persistence layerAccessControlException
- if a security manager exists and access to the user is deniedNoSuchObjectException
UserGroup getUserGroup(String name, int pubId)
UserGroup
.name
- the name of the UserGroup
to retrievepubId
- the id of the publication the UserGroup
in question belong toUserGroup getUserGroup(int pId, int pubId)
UserGroup
.pId
- the id of the UserGroup
to retrievepubId
- the id of the publication the UserGroup
in question belong toCollection getMembers(UserGroup group) throws PersistentStoreException, NoSuchObjectException
UserGroup
. Members to return can be either persons or groups.group
- the UserGroup
to retrieve members fromPersistentStoreException
- if some database error occursNoSuchObjectException
- if trying to retrieve an object that does not existCollection getUserSections(User pUser, String pRole) throws PersistentStoreException
Sections
where the given user has a role.pUser
- retrieve all Sections
where this user has a rolepRole
- retrieve all Sections
where the given user has this rolePersistentStoreException
- if some store error occursCollection getUserSections(User pUser, String pRole, int pPublicationID) throws PersistentStoreException
Sections
where the given user has a
role. The all section is included first in the collection.pUser
- retrieve all Sections
where this user has a rolepRole
- retrieve all Sections
where the given user has this rolepPublicationID
- the id of the publication to search in for sectionsPersistentStoreException
- if some store error occursMap getUserSectionsWitRoles(User pUser, String pRole, int pPublicationID) throws PersistentStoreException
User.getSections(java.lang.String)
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.pUser
- retrieve all Sections
where this user has a rolepRole
- retrieve all Sections
where the given user has this rolepPublicationID
- the id of the publication to search in for sectionsPersistentStoreException
- if some store error occursCollection getArticlesByState(int codeID) throws PersistentStoreException
codeID
- the state of the articlesCollection
of ints which represent article IDs.PersistentStoreException
- if an error occurs in the persistence layerCollection getArticlesByState(int codeID, int[] pubIds) throws PersistentStoreException
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 layerint[] getArticlesByUser(int personId, int maxCount) throws PersistentStoreException
personId
- the id of the personmaxCount
- max number of articles to retrievePersistentStoreException
AgreementInfo getAgreementInfo(int agreementId) throws PersistentStoreException, NoSuchObjectException
agreementId
- the id of the agreement to retrievePersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if the agreement does not existboolean isPubAdmin(Person person)
person
- the person to check for admin roleUserGroup getPublicationUsersGroup(int pubId) throws PersistentStoreException
pubId
- the id of publication to retrieve the user group fromPersistentStoreException
- if an error occurs in the persistence layerboolean isTokenValid(IOObject pObject, String pToken)
pObject
- the IOObject to validate the token againstpToken
- the token to validateString generateToken(IOObject pObject)
pObject
- the object used to generate the tokenvoid setTimeSlot(long pTimeSlot)
pTimeSlot
- the new time slotlong getTimeSlot()
String getSectionParameter(int pSectionId, String pParameterName)
pSectionId
- The ID of the section to fetch parameters frompParameterName
- name of the parameter to retrieveSet getSectionParameterNameSet(int pSectionId)
java.util.Set
containing the names of all parameters in this section,
included inherited parameters from parent sections.pSectionId
- The ID of the section to fetch parameters fromSet
containing all parameter namesString getDeclaredSectionParameter(int pSectionId, String pParameterName)
pSectionId
- The ID of the section to fetch parameters frompParameterName
- name of the parameter to retrieveSet getDeclaredSectionParameterNameSet(int pSectionId)
pSectionId
- The ID of the section to fetch parameters fromSet
containg all parameter names in this sectionSet
Map getDeclaredSectionParameters(int pSectionId)
java.util.Map
containing all specified parameters in this sectiondisregarding any
inherited value.pSectionId
- The ID of the section to fetch parameters fromMap
containing all parametersMap getSectionParameters(int pSectionId)
java.util.Map
containing all parameters in this section,
included inherited parameters from parent sections.pSectionId
- The ID of the section to fetch parameters fromMap
containing all parametersboolean existsSectionWithUrl(String pSectionUrl)
instead
pSectionUrl
- The url to check for existing sectionsboolean existsSectionWithUrl(String pSectionUrl, int pPublicationId)
pSectionUrl
- The url to check for existing sectionspPublicationId
- the publication id© 1998- 2021 Escenic AS