Class DefaultPublicationService
- java.lang.Object
-
- org.silverpeas.core.contribution.publication.service.DefaultPublicationService
-
- All Implemented Interfaces:
ComponentInstanceDeletion
,PublicationService
- Direct Known Subclasses:
TagCloudPublicationService
@Service public class DefaultPublicationService extends Object implements PublicationService, ComponentInstanceDeletion
Default implementation ofPublicationService
to manage the publications in Silverpeas.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultPublicationService()
Constructor declaration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAliases(PublicationPK pubPK, List<Location> aliases)
Adds the specified aliases of the specified publication.void
addFather(PublicationPK pubPK, NodePK fatherPK)
Adds the specified father to the given publication.void
addLinks(PublicationPK pubPK, List<ResourceReference> links)
Updates the publication linksvoid
addValidationStep(ValidationStep step)
void
changePublicationOrder(PublicationPK pubPK, NodePK fatherPK, int direction)
Change the order of the given publication among the others one for the specified father.void
changePublicationsOrder(List<String> ids, NodePK nodePK)
void
createIndex(PublicationDetail pubDetail)
Indexes with its content the specified publication.void
createIndex(PublicationPK pubPK)
Indexes with its content the specified publication and its possible aliases.PublicationPK
createPublication(PublicationDetail detail)
Creates in Silverpeas the specified publication.void
delete(String componentInstanceId)
Deletes the resources belonging to the specified component instance.void
deleteIndex(PublicationPK pubPK)
Called on : - deletePublication()void
deleteLink(String id)
Deletes the specified link between two publications.List<Location>
getAllAliases(PublicationPK pubPK)
Gets all the aliases of the specified publication.Collection<NodePK>
getAllFatherPK(PublicationPK pubPK)
Gets the unique identifying key of all of the fathers of the specified publication and in the same component instance.List<NodePK>
getAllFatherPKInSamePublicationComponentInstance(PublicationPK pubPK)
Gets the unique identifying key of all of the fathers of the specified publication and in the same component instance.List<Location>
getAllLocations(PublicationPK pubPK)
Gets all the locations of the specified publication whatever the component instance in which they are.Map<String,List<Location>>
getAllLocationsByPublicationIds(Collection<String> ids)
Selects massively simple data about all locations (main or aliases).Collection<PublicationDetail>
getAllPublications(String instanceId)
Collection<PublicationDetail>
getAllPublications(String instanceId, String sorting)
List<SocialInformationPublication>
getAllPublicationsWithStatusbyUserid(String userId, Date begin, Date end)
get my list of SocialInformationPublication according to options and number of Item and the first IndexSilverpeasList<PublicationDetail>
getAuthorizedPublicationsForUserByCriteria(String userId, PublicationCriteria criteria)
Gets a list of authorized publications by applying given criteria.List<PublicationDetail>
getByIds(Collection<String> publicationIds)
Gets publications from given identifiers.CompletePublication
getCompletePublication(PublicationPK pubPK)
Gets the complete detail about the specified publication.Collection<Coordinate>
getCoordinates(String pubId, String componentId)
Gets the coordinates of the specified publication in the PdC.PublicationDetail
getDetail(PublicationPK pubPK)
Gets the publication with the specified identifying key.Collection<PublicationDetail>
getDetailBetweenDate(String beginDate, String endDate, String instanceId)
PublicationDetail
getDetailByName(PublicationPK pubPK, String pubName)
Looking for, in the instance identified by pubPK, a publication named pubName.PublicationDetail
getDetailByNameAndNodeId(PublicationPK pubPK, String pubName, int nodeId)
Collection<PublicationDetail>
getDetailsByFatherIds(List<String> fatherIds, String instanceId, boolean filterOnVisibilityPeriod)
Collection<PublicationDetail>
getDetailsByFatherIdsAndStatus(List<String> fatherIds, String instanceId, String sorting, String status)
Collection<PublicationDetail>
getDetailsByFatherIdsAndStatusList(List<String> fatherIds, String instanceId, String sorting, List<String> status)
Collection<PublicationDetail>
getDetailsByFatherIdsAndStatusList(List<String> fatherIds, String instanceId, String sorting, List<String> status, boolean filterOnVisibilityPeriod)
Collection<PublicationDetail>
getDetailsByFatherPK(NodePK fatherPK)
Gets all the publications attached to the specified father.Collection<PublicationDetail>
getDetailsByFatherPK(NodePK fatherPK, String sorting)
Gets all the publications attached to the specified father ordered as indicated by the sorting directive.Collection<PublicationDetail>
getDetailsByFatherPK(NodePK fatherPK, String sorting, boolean filterOnVisibilityPeriod)
Gets all the publications attached to the specified father, ordered as indicated by the sorting directive, according to the visibility.Collection<PublicationDetail>
getDetailsByFatherPK(NodePK fatherPK, String sorting, boolean filterOnVisibilityPeriod, String userId)
Gets all the publications attached to the specified father, ordered as indicated by the sorting directive, according to the visibility, and that was authored or updated by the specified user.Collection<PublicationDetail>
getDetailsNotInFatherPK(NodePK fatherPK)
Gets all the publications that aren't attached to the specified father.Collection<PublicationDetail>
getDetailsNotInFatherPK(NodePK fatherPK, String sorting)
Gets all the publications that aren't attached to the specified father and ordered by the specified sorting directive.Map<String,Integer>
getDistributionTree(DistributionTreeCriteria criteria)
Gets the tree of nodes with the number of publication per node.Collection<PublicationDetail>
getDraftsByUser(String userId)
get all publications of given user in state 'Draft'.List<Location>
getLocationsInComponentInstance(PublicationPK pubPK, String instanceId)
Gets the locations of the specified publication in the given component instance.Optional<Location>
getMainLocation(PublicationPK pubPK)
Gets the main location of the specified publication.List<PublicationDetail>
getMinimalDataByIds(Collection<PublicationPK> ids)
Selects massively simple data about publications.int
getNbPubByFatherPath(NodePK fatherPK, String fatherPath)
Collection<PublicationDetail>
getOrphanPublications(String componentId)
Gets all the publications that aren't attached to any father in the specified component instance.List<PublicationDetail>
getPublications(Collection<PublicationPK> publicationPKs)
Gets all the asked publications.SilverpeasList<PublicationDetail>
getPublicationsByCriteria(PublicationCriteria criteria)
Gets all the publications according to given criteria.Collection<PublicationPK>
getPubPKsInFatherPK(NodePK fatherPK)
List<SocialInformationPublication>
getSocialInformationsListOfMyContacts(List<String> myContactsIds, List<String> options, Date begin, Date end)
Get list of SocialInformationPublication of my contacts according to options and number of Item and the first Index.ValidationStep
getValidationStepByUser(PublicationPK pubPK, String userId)
List<ValidationStep>
getValidationSteps(PublicationPK pubPK)
protected void
init()
void
movePublication(PublicationPK pk, NodePK toFatherPK, boolean indexIt)
Moves the specified publication to the specified father and indexes or not it.void
removeAliases(PublicationPK pubPK, Collection<Location> aliases)
Removes the specified aliases of the specified publication.void
removeAllFathers(PublicationPK pubPK)
Removes the specified publication from all fathers.void
removeFather(PublicationPK pubPK, NodePK fatherPK)
Removes the specified publication from the specified father.void
removeFathers(PublicationPK pubPK, Collection<String> fatherIds)
Removes the specified publication from all the specified father.void
removePublication(PublicationPK pk)
Removes the specified publication.List<PublicationDetail>
removeUserFromTargetValidators(String userId)
Remove given userId from publication validators where it appears.void
removeValidationSteps(PublicationPK pubPK)
void
resetPublicationsOrder(NodePK nodePK)
org.silverpeas.kernel.util.Pair<Collection<Location>,Collection<Location>>
setAliases(PublicationPK pubPK, List<Location> aliases)
Sets the aliases of the specified publication.void
setDetail(PublicationDetail detail)
Updates the specified publication.void
setDetail(PublicationDetail detail, boolean forceUpdateDate)
Updates the specified publication and specify if the update date property of the publication detail has to be used as update date.void
setDetail(PublicationDetail detail, boolean forceUpdateDate, ResourceEvent.Type evenType)
Updates the specified publication and specify if the update date property of the publication detail has to be used as update date.
-
-
-
Method Detail
-
delete
public void delete(String componentInstanceId)
Description copied from interface:ComponentInstanceDeletion
Deletes the resources belonging to the specified component instance. This method is invoked by Silverpeas when a component instance is being deleted.- Specified by:
delete
in interfaceComponentInstanceDeletion
- Parameters:
componentInstanceId
- the unique identifier of a component instance.
-
getDetail
public PublicationDetail getDetail(PublicationPK pubPK)
Description copied from interface:PublicationService
Gets the publication with the specified identifying key.- Specified by:
getDetail
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication to get.- Returns:
- the publication corresponding to the given key. If no such publication exists with the specified key, then null is returned.
-
createPublication
public PublicationPK createPublication(PublicationDetail detail)
Description copied from interface:PublicationService
Creates in Silverpeas the specified publication. It persists it into the Silverpeas data source and a new identifier is set for this publication. AResourceEvent.Type.CREATION
event is sent once the publication is created.- Specified by:
createPublication
in interfacePublicationService
- Parameters:
detail
- the detail on the publication to persist.- Returns:
- the identifying key of the publication so that it can be retrieved later in the data source by this key.
-
movePublication
public void movePublication(PublicationPK pk, NodePK toFatherPK, boolean indexIt)
Description copied from interface:PublicationService
Moves the specified publication to the specified father and indexes or not it. The father can be either a node in the same component instance or a node in another component instance. NoResourceEvent.Type.MOVE
event is sent; for doing please use one the move done thePublicationService.setDetail(PublicationDetail, boolean, ResourceEvent.Type)
method by specifying theResourceEvent.Type.MOVE
event as last parameter.- Specified by:
movePublication
in interfacePublicationService
- Parameters:
pk
- the identifying key of the publication to move.toFatherPK
- the new father of the publication.indexIt
- a boolean indicating if the publication must be indexed.
-
changePublicationsOrder
public void changePublicationsOrder(List<String> ids, NodePK nodePK)
- Specified by:
changePublicationsOrder
in interfacePublicationService
-
resetPublicationsOrder
public void resetPublicationsOrder(NodePK nodePK)
- Specified by:
resetPublicationsOrder
in interfacePublicationService
-
changePublicationOrder
public void changePublicationOrder(PublicationPK pubPK, NodePK fatherPK, int direction)
Description copied from interface:PublicationService
Change the order of the given publication among the others one for the specified father. Direction less than 0 means "up", otherwise it means "down".- Specified by:
changePublicationOrder
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication to reorder.fatherPK
- a father of the publication.direction
- a direction of the reordering: a value less than 0 means "up", otherwise it means "down". Cannot be 0.
-
removePublication
public void removePublication(PublicationPK pk)
Description copied from interface:PublicationService
Removes the specified publication. TheResourceEvent.Type.DELETION
event is sent once the publication is removed.- Specified by:
removePublication
in interfacePublicationService
- Parameters:
pk
- the identifying key of the publication to remove.
-
setDetail
public void setDetail(PublicationDetail detail)
Description copied from interface:PublicationService
Updates the specified publication. The update date isn't updated in given the publication detail. TheResourceEvent.Type.UPDATE
event is sent once the publication is updated.- Specified by:
setDetail
in interfacePublicationService
- Parameters:
detail
- the detail of the publication from which it has to be updated.
-
setDetail
public void setDetail(PublicationDetail detail, boolean forceUpdateDate)
Description copied from interface:PublicationService
Updates the specified publication and specify if the update date property of the publication detail has to be used as update date. TheResourceEvent.Type.UPDATE
event is sent once the publication is updated.- Specified by:
setDetail
in interfacePublicationService
- Parameters:
detail
- the detail of the publication from which it has to be updated.forceUpdateDate
- a boolean indicating if the update date has to be set with date of this update.
-
setDetail
public void setDetail(PublicationDetail detail, boolean forceUpdateDate, ResourceEvent.Type evenType)
Description copied from interface:PublicationService
Updates the specified publication and specify if the update date property of the publication detail has to be used as update date. The kind of update is specified by the given event type: it is either a simple publication update or an update issuing from a publication move (some publication properties can require to be updated after a move but they aren't related to a publication modification).- Specified by:
setDetail
in interfacePublicationService
- Parameters:
detail
- the detail of the publication from which it has to be updated.forceUpdateDate
- a boolean indicating if the update date has to be set with date of this update.evenType
- permit to precise to listener of publication modification the type of the update.
-
getValidationSteps
public List<ValidationStep> getValidationSteps(PublicationPK pubPK)
- Specified by:
getValidationSteps
in interfacePublicationService
-
getValidationStepByUser
public ValidationStep getValidationStepByUser(PublicationPK pubPK, String userId)
- Specified by:
getValidationStepByUser
in interfacePublicationService
-
addValidationStep
public void addValidationStep(ValidationStep step)
- Specified by:
addValidationStep
in interfacePublicationService
-
removeValidationSteps
public void removeValidationSteps(PublicationPK pubPK)
- Specified by:
removeValidationSteps
in interfacePublicationService
-
addFather
public void addFather(PublicationPK pubPK, NodePK fatherPK)
Description copied from interface:PublicationService
Adds the specified father to the given publication. The publication will be then visible from this new father.- Specified by:
addFather
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication.fatherPK
- the the identifying key of the new father.
-
removeFather
public void removeFather(PublicationPK pubPK, NodePK fatherPK)
Description copied from interface:PublicationService
Removes the specified publication from the specified father. The publication won't be any more attached to the given father and hence it won't be visible any more from this father.- Specified by:
removeFather
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publicationfatherPK
- the identifying key of the father to detach.
-
removeFathers
public void removeFathers(PublicationPK pubPK, Collection<String> fatherIds)
Description copied from interface:PublicationService
Removes the specified publication from all the specified father. The publication won't be any more attached to the given fathers and hence it won't be visible any more from these fathers.- Specified by:
removeFathers
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publicationfatherIds
- a collection of identifying key of the fathers to detach.
-
removeAllFathers
public void removeAllFathers(PublicationPK pubPK)
Description copied from interface:PublicationService
Removes the specified publication from all fathers. This means the publication will become an orphan and it won't be visible from any fathers.- Specified by:
removeAllFathers
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication
-
getOrphanPublications
public Collection<PublicationDetail> getOrphanPublications(String componentId)
Description copied from interface:PublicationService
Gets all the publications that aren't attached to any father in the specified component instance.- Specified by:
getOrphanPublications
in interfacePublicationService
- Parameters:
componentId
- the unique identifier of a component instance/- Returns:
- a collection of orphan publications.
-
getAllFatherPK
public Collection<NodePK> getAllFatherPK(PublicationPK pubPK)
Description copied from interface:PublicationService
Gets the unique identifying key of all of the fathers of the specified publication and in the same component instance.- Specified by:
getAllFatherPK
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication.- Returns:
- a collection of
NodePK
instances, each of them identifying a node.
-
getAllFatherPKInSamePublicationComponentInstance
public List<NodePK> getAllFatherPKInSamePublicationComponentInstance(PublicationPK pubPK)
Description copied from interface:PublicationService
Gets the unique identifying key of all of the fathers of the specified publication and in the same component instance.- Specified by:
getAllFatherPKInSamePublicationComponentInstance
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication.- Returns:
- a collection of
NodePK
instances, each of them identifying a node.
-
getAllLocationsByPublicationIds
public Map<String,List<Location>> getAllLocationsByPublicationIds(Collection<String> ids)
Description copied from interface:PublicationService
Selects massively simple data about all locations (main or aliases).This method is designed for process performance needs.
- Specified by:
getAllLocationsByPublicationIds
in interfacePublicationService
- Parameters:
ids
- the instance ids aimed.- Returns:
- a map of
Location
instances for each of the specified publications.
-
getAllLocations
public List<Location> getAllLocations(PublicationPK pubPK)
Description copied from interface:PublicationService
Gets all the locations of the specified publication whatever the component instance in which they are. By default, the original location of the publication is returned along with all of its aliases.- Specified by:
getAllLocations
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication.- Returns:
- a collection of the locations of the publication.
- See Also:
Location
-
getLocationsInComponentInstance
public List<Location> getLocationsInComponentInstance(PublicationPK pubPK, String instanceId)
Description copied from interface:PublicationService
Gets the locations of the specified publication in the given component instance.- Specified by:
getLocationsInComponentInstance
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication.instanceId
- the unique identifier of a component instance.- Returns:
- a collection of
Location
objects or none if the publication has no locations in the given component instance. - See Also:
Location
-
getMainLocation
public Optional<Location> getMainLocation(PublicationPK pubPK)
Description copied from interface:PublicationService
Gets the main location of the specified publication. A publication has always one original location and any other locations should be an alias.- Specified by:
getMainLocation
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication.- Returns:
- the main location of the specified publication or nothing is the publication is orphaned (not attached to a father).
- See Also:
Location
-
getAllAliases
public List<Location> getAllAliases(PublicationPK pubPK)
Description copied from interface:PublicationService
Gets all the aliases of the specified publication. The original location isn't returned among the aliases; to get also the original location, please look at thePublicationService.getAllLocations(PublicationPK)
method.- Specified by:
getAllAliases
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication.- See Also:
Location
-
setAliases
public org.silverpeas.kernel.util.Pair<Collection<Location>,Collection<Location>> setAliases(PublicationPK pubPK, List<Location> aliases)
Description copied from interface:PublicationService
Sets the aliases of the specified publication. They replace the existing aliases of the publication. TheIllegalArgumentException
is throw if one of the location isn't an alias.- Specified by:
setAliases
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication.aliases
- the new aliases.- Returns:
- a pair made up of firstly the added aliases and of secondly the removed aliases.
- See Also:
Location
-
addAliases
public void addAliases(PublicationPK pubPK, List<Location> aliases)
Description copied from interface:PublicationService
Adds the specified aliases of the specified publication. TheIllegalArgumentException
is throw if one of the location isn't an alias.- Specified by:
addAliases
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication.aliases
- the aliases to add to the existing ones.- See Also:
Location
-
removeAliases
public void removeAliases(PublicationPK pubPK, Collection<Location> aliases)
Description copied from interface:PublicationService
Removes the specified aliases of the specified publication. TheIllegalArgumentException
is throw if one of the location isn't an alias. Prefer in this case thePublicationService.removeFather(PublicationPK, NodePK)
method.- Specified by:
removeAliases
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication.aliases
- the aliases to remove.- See Also:
Location
-
getDetailsByFatherPK
public Collection<PublicationDetail> getDetailsByFatherPK(NodePK fatherPK)
Description copied from interface:PublicationService
Gets all the publications attached to the specified father.- Specified by:
getDetailsByFatherPK
in interfacePublicationService
- Parameters:
fatherPK
- the identifying key of the father.- Returns:
- a collection of
PublicationDetail
instances.
-
getDetailsByFatherPK
public Collection<PublicationDetail> getDetailsByFatherPK(NodePK fatherPK, String sorting)
Description copied from interface:PublicationService
Gets all the publications attached to the specified father ordered as indicated by the sorting directive.- Specified by:
getDetailsByFatherPK
in interfacePublicationService
- Parameters:
fatherPK
- the identifying key of the father.sorting
- a sorting directive. Must be in the form of "P.[publication detail attribute] (DESC|ASC)"- Returns:
- a collection of
PublicationDetail
instances.
-
getDetailsByFatherPK
public Collection<PublicationDetail> getDetailsByFatherPK(NodePK fatherPK, String sorting, boolean filterOnVisibilityPeriod)
Description copied from interface:PublicationService
Gets all the publications attached to the specified father, ordered as indicated by the sorting directive, according to the visibility.- Specified by:
getDetailsByFatherPK
in interfacePublicationService
- Parameters:
fatherPK
- the identifying key of the father.sorting
- a sorting directive. Must be in the form of "P.[publication detail attribute] (DESC|ASC)"filterOnVisibilityPeriod
- is the publications to get must be today visible.- Returns:
- a collection of
PublicationDetail
instances.
-
getDetailsByFatherPK
public Collection<PublicationDetail> getDetailsByFatherPK(NodePK fatherPK, String sorting, boolean filterOnVisibilityPeriod, String userId)
Description copied from interface:PublicationService
Gets all the publications attached to the specified father, ordered as indicated by the sorting directive, according to the visibility, and that was authored or updated by the specified user.- Specified by:
getDetailsByFatherPK
in interfacePublicationService
- Parameters:
fatherPK
- the identifying key of the father.sorting
- a sorting directive. Must be in the form of "P.[publication detail attribute] (DESC|ASC)"filterOnVisibilityPeriod
- is the publications to get must be today visible.userId
- the unique identifier of the author or of an updater.- Returns:
- a collection of
PublicationDetail
instances.
-
getDetailsNotInFatherPK
public Collection<PublicationDetail> getDetailsNotInFatherPK(NodePK fatherPK)
Description copied from interface:PublicationService
Gets all the publications that aren't attached to the specified father.- Specified by:
getDetailsNotInFatherPK
in interfacePublicationService
- Parameters:
fatherPK
- the identifying key of the father.- Returns:
- a collection of
PublicationDetail
instances.
-
getDetailsNotInFatherPK
public Collection<PublicationDetail> getDetailsNotInFatherPK(NodePK fatherPK, String sorting)
Description copied from interface:PublicationService
Gets all the publications that aren't attached to the specified father and ordered by the specified sorting directive.- Specified by:
getDetailsNotInFatherPK
in interfacePublicationService
- Parameters:
fatherPK
- the identifying key of the father.sorting
- a sorting directive. Must be in the form of "P.[publication detail attribute] (DESC|ASC)"- Returns:
- a collection of
PublicationDetail
instances.
-
deleteLink
public void deleteLink(String id)
Description copied from interface:PublicationService
Deletes the specified link between two publications.- Specified by:
deleteLink
in interfacePublicationService
- Parameters:
id
- the unique identifier of a link between two publications.
-
getCompletePublication
public CompletePublication getCompletePublication(PublicationPK pubPK)
Description copied from interface:PublicationService
Gets the complete detail about the specified publication.- Specified by:
getCompletePublication
in interfacePublicationService
- Parameters:
pubPK
- the identifying key of the publication.- Returns:
- a
CompletePublication
instance.
-
getPublications
public List<PublicationDetail> getPublications(Collection<PublicationPK> publicationPKs)
Description copied from interface:PublicationService
Gets all the asked publications.- Specified by:
getPublications
in interfacePublicationService
- Parameters:
publicationPKs
- a collection of identifying key of the publications to get.- Returns:
- a list of
PublicationDetail
instances.
-
getByIds
public List<PublicationDetail> getByIds(Collection<String> publicationIds)
Description copied from interface:PublicationService
Gets publications from given identifiers.- Specified by:
getByIds
in interfacePublicationService
- Parameters:
publicationIds
- list of identifiers of publications- Returns:
- a list of
PublicationDetail
.
-
getPublicationsByCriteria
public SilverpeasList<PublicationDetail> getPublicationsByCriteria(PublicationCriteria criteria)
Description copied from interface:PublicationService
Gets all the publications according to given criteria.- Specified by:
getPublicationsByCriteria
in interfacePublicationService
- Parameters:
criteria
- the criteria to process.- Returns:
- a list of
PublicationDetail
instances
-
getDistributionTree
public Map<String,Integer> getDistributionTree(DistributionTreeCriteria criteria)
Description copied from interface:PublicationService
Gets the tree of nodes with the number of publication per node.- Specified by:
getDistributionTree
in interfacePublicationService
- Parameters:
criteria
- criteria for delimiting the scope of the request.- Returns:
- the tree of nodes with the number of publication per node
-
getNbPubByFatherPath
public int getNbPubByFatherPath(NodePK fatherPK, String fatherPath)
- Specified by:
getNbPubByFatherPath
in interfacePublicationService
-
getDetailsByFatherIds
public Collection<PublicationDetail> getDetailsByFatherIds(List<String> fatherIds, String instanceId, boolean filterOnVisibilityPeriod)
- Specified by:
getDetailsByFatherIds
in interfacePublicationService
-
getDetailsByFatherIdsAndStatus
public Collection<PublicationDetail> getDetailsByFatherIdsAndStatus(List<String> fatherIds, String instanceId, String sorting, String status)
- Specified by:
getDetailsByFatherIdsAndStatus
in interfacePublicationService
-
getDetailsByFatherIdsAndStatusList
public Collection<PublicationDetail> getDetailsByFatherIdsAndStatusList(List<String> fatherIds, String instanceId, String sorting, List<String> status)
- Specified by:
getDetailsByFatherIdsAndStatusList
in interfacePublicationService
-
getDetailsByFatherIdsAndStatusList
public Collection<PublicationDetail> getDetailsByFatherIdsAndStatusList(List<String> fatherIds, String instanceId, String sorting, List<String> status, boolean filterOnVisibilityPeriod)
- Specified by:
getDetailsByFatherIdsAndStatusList
in interfacePublicationService
-
getPubPKsInFatherPK
public Collection<PublicationPK> getPubPKsInFatherPK(NodePK fatherPK)
- Specified by:
getPubPKsInFatherPK
in interfacePublicationService
-
createIndex
public void createIndex(PublicationDetail pubDetail)
Description copied from interface:PublicationService
Indexes with its content the specified publication. If it has aliases, those won't be taken into account in the indexation.- Specified by:
createIndex
in interfacePublicationService
- Parameters:
pubDetail
- the publication to index.
-
createIndex
public void createIndex(PublicationPK pubPK)
Description copied from interface:PublicationService
Indexes with its content the specified publication and its possible aliases. The index is created only if the publication is indexable.- Specified by:
createIndex
in interfacePublicationService
- Parameters:
pubPK
- the unique identifier of a publication.
-
deleteIndex
public void deleteIndex(PublicationPK pubPK)
Called on : - deletePublication()- Specified by:
deleteIndex
in interfacePublicationService
- Parameters:
pubPK
- the unique identifier of a publication.
-
getAllPublications
public Collection<PublicationDetail> getAllPublications(String instanceId, String sorting)
- Specified by:
getAllPublications
in interfacePublicationService
-
getAllPublications
public Collection<PublicationDetail> getAllPublications(String instanceId)
- Specified by:
getAllPublications
in interfacePublicationService
-
getMinimalDataByIds
public List<PublicationDetail> getMinimalDataByIds(Collection<PublicationPK> ids)
Description copied from interface:PublicationService
Selects massively simple data about publications.For now, only the following data are retrieved:
- pubId
- pubStatus
- pubCloneId
- pubCloneStatus
- instanceId
- pubBeginDate
- pubEndDate
- pubBeginHour
- pubEndHour
- pubcreatorid
- pubupdaterid
The result is not necessarily into same ordering as the one of given parameter.- Specified by:
getMinimalDataByIds
in interfacePublicationService
- Parameters:
ids
- the instance ids aimed.- Returns:
- a list of
PublicationDetail
instances.
-
getDetailByName
public PublicationDetail getDetailByName(PublicationPK pubPK, String pubName)
Description copied from interface:PublicationService
Looking for, in the instance identified by pubPK, a publication named pubName.- Specified by:
getDetailByName
in interfacePublicationService
- Parameters:
pubPK
- the identifier of the instancepubName
- the publication's name we are looking for- Returns:
- the pubId if a publication already exists in this component's instance. null otherwise.
-
getDetailByNameAndNodeId
public PublicationDetail getDetailByNameAndNodeId(PublicationPK pubPK, String pubName, int nodeId)
- Specified by:
getDetailByNameAndNodeId
in interfacePublicationService
-
getDetailBetweenDate
public Collection<PublicationDetail> getDetailBetweenDate(String beginDate, String endDate, String instanceId)
- Specified by:
getDetailBetweenDate
in interfacePublicationService
-
getCoordinates
public Collection<Coordinate> getCoordinates(String pubId, String componentId)
Gets the coordinates of the specified publication in the PdC.- Specified by:
getCoordinates
in interfacePublicationService
- Parameters:
pubId
- a publication identifiercomponentId
- a component instance identifier- Returns:
- a collection of coordinates of the publication in a tree of classification
-
addLinks
public void addLinks(PublicationPK pubPK, List<ResourceReference> links)
Updates the publication links- Specified by:
addLinks
in interfacePublicationService
- Parameters:
pubPK
- publication identifier which you want to update linkslinks
- list of publication to link with current.
-
getAllPublicationsWithStatusbyUserid
public List<SocialInformationPublication> getAllPublicationsWithStatusbyUserid(String userId, Date begin, Date end)
get my list of SocialInformationPublication according to options and number of Item and the first Index- Specified by:
getAllPublicationsWithStatusbyUserid
in interfacePublicationService
- Parameters:
userId
- a user identifierbegin
- dateend
- date- Returns:
- List
-
getSocialInformationsListOfMyContacts
public List<SocialInformationPublication> getSocialInformationsListOfMyContacts(List<String> myContactsIds, List<String> options, Date begin, Date end)
Get list of SocialInformationPublication of my contacts according to options and number of Item and the first Index.- Specified by:
getSocialInformationsListOfMyContacts
in interfacePublicationService
- Parameters:
myContactsIds
- a list of unique identifiers of my contacts.options
- a list of options to apply when filtering the information to get.begin
- the date at which the temporal interval starts.end
- the date at which the temporal interval ends.- Returns:
- a list of publications on which my contacts have worked.
-
getAuthorizedPublicationsForUserByCriteria
public SilverpeasList<PublicationDetail> getAuthorizedPublicationsForUserByCriteria(String userId, PublicationCriteria criteria)
Description copied from interface:PublicationService
Gets a list of authorized publications by applying given criteria.- Specified by:
getAuthorizedPublicationsForUserByCriteria
in interfacePublicationService
- Parameters:
userId
- the identifier of the user for which access control MUST be verified.criteria
- the criteria.- Returns:
- a list of publications
-
getDraftsByUser
public Collection<PublicationDetail> getDraftsByUser(String userId)
Description copied from interface:PublicationService
get all publications of given user in state 'Draft'. It returns simple publications in state 'Draft' and cloned publications with a clone in state 'Draft'.- Specified by:
getDraftsByUser
in interfacePublicationService
- Parameters:
userId
- the unique identifier of a user.- Returns:
- all PublicationDetail in state 'Draft' according to given userId
-
removeUserFromTargetValidators
public List<PublicationDetail> removeUserFromTargetValidators(String userId)
Description copied from interface:PublicationService
Remove given userId from publication validators where it appears.- Specified by:
removeUserFromTargetValidators
in interfacePublicationService
- Parameters:
userId
- id of the user to remove- Returns:
- a List of PublicationPK on which userId have been removed to.
-
init
@PostConstruct protected void init()
-
-