Class DefaultKmeliaService
- java.lang.Object
-
- org.silverpeas.components.kmelia.service.DefaultKmeliaService
-
- All Implemented Interfaces:
KmeliaService,org.silverpeas.core.ApplicationService
@Service @Singleton @Named("kmeliaService") public class DefaultKmeliaService extends Object implements KmeliaServiceThis is the Kmelia Service controller of the MVC. It controls all the activities that happen in a client session. It also provides mechanisms to access other services. Service which manage kmelia and kmax application.- Author:
- Nicolas Eysseric
-
-
Constructor Summary
Constructors Constructor Description DefaultKmeliaService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttachmentToPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId, String filename, String description, byte[] contents)org.silverpeas.core.node.model.NodePKaddAxis(org.silverpeas.core.node.model.NodeDetail axis, String componentId)Add the given axis into the specified component instance.voidaddInfoLinks(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, List<org.silverpeas.core.ResourceReference> links)Updates the publication linksvoidaddPosition(String fatherId, org.silverpeas.core.node.model.NodeDetail position, String componentId, String userId)Add position to an axis in the given component instance and for the specified user.voidaddPublicationToCombination(String pubId, List<String> combination, String componentId)Add for the given publication a combination of position on the axis of the component instance.voidaddPublicationToTopic(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK fatherPK, boolean isACreation)Add a publication to a topic and send email alerts to topic subscribersvoidaddPublicationToTopicWithoutNotifications(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK fatherPK, boolean isACreation)org.silverpeas.core.node.model.NodeDetailaddSubTopic(org.silverpeas.core.node.model.NodePK fatherPK, org.silverpeas.core.node.model.NodeDetail subTopic, String alertType)Add a subtopic to currentTopic and alert users about it.org.silverpeas.core.node.model.NodeDetailaddToTopic(org.silverpeas.core.node.model.NodePK fatherPK, org.silverpeas.core.node.model.NodeDetail subTopic)Add a subtopic to a topic - If a subtopic of same name already exists a NodePK with id=-1 is returned else the new topic NodePKvoidchangeTopicStatus(String newStatus, org.silverpeas.core.node.model.NodePK nodePK, boolean recursiveChanges)protected booleancheckCombination(Collection<org.silverpeas.core.node.coordinates.model.Coordinate> coordinates, List<String> combination)protected booleancheckPoint(org.silverpeas.core.node.coordinates.model.CoordinatePoint point, List<String> combination)StringclonePublication(org.silverpeas.core.contribution.publication.model.CompletePublication refPubComplete, org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, String nextStatus)Clone the given publication.org.silverpeas.core.node.model.NodeDetailcopyNode(KmeliaCopyDetail copyDetail)Copies the node according to the information provided by the specified copy descriptor.org.silverpeas.core.contribution.publication.model.PublicationDetailcopyPublication(org.silverpeas.core.contribution.publication.model.PublicationDetail publiToCopy, KmeliaCopyDetail copyDetail)Copies the specified publication according to the given copy descriptor.voidcopyPublications(KmeliaCopyDetail copyDetail)Copies all the publications defined in the specified copy descriptor.StringcreateKmaxPublication(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail)Create a new Publication (only the header - parameters)StringcreatePublicationIntoTopic(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, org.silverpeas.core.node.model.NodePK fatherPK)Create a new Publication (only the header - parameters) to the current TopicStringcreatePublicationIntoTopic(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, org.silverpeas.core.node.model.NodePK fatherPK, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)Creates a new publication into the specified topic and with the specified classification on the PdC.org.silverpeas.core.node.model.NodeDetailcreateTopic(String componentId, String topicId, String spaceId, String userId, String name, String description)voiddeleteAllReadingControlsByPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)delete reading controls to a publicationvoiddeleteAxis(String axisId, String componentId)Delete the given axis in the specified component instance.voiddeleteClone(org.silverpeas.core.contribution.publication.model.PublicationPK pk)voiddeletePosition(String positionId, String componentId)Delete a position in an axisvoiddeletePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)HEAD Delete a publication If this publication is in the basket or in the DZ, it's deleted from the database Else it only send to the basket.voiddeletePublicationFromCombination(String pubId, String combinationId, String componentId)Remove for the given publication the specified combination of positions on the axis of the component instance.List<String>deletePublications(List<String> ids, org.silverpeas.core.node.model.NodePK nodePK, String userId)Removes publications according to given ids.voiddeleteSilverContent(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)voiddeleteTopic(org.silverpeas.core.node.model.NodePK pkToDelete)Delete a topic and all descendants.voiddraftInPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)Change publication status from any state to draftvoiddraftInPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)voiddraftOutPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK, String userProfile)Change publication status from draft to valid (for publisher) or toValidate (for redactor)voiddraftOutPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK, String userProfile, boolean forceUpdateDate)org.silverpeas.core.contribution.publication.model.PublicationDetaildraftOutPublicationWithoutNotifications(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK, String userProfile)voidexternalElementsOfPublicationHaveChanged(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)alert that an external elements of publication (wysiwyg, attachment, versioning) has been created, updated or removedList<KmeliaPublication>filterPublications(List<KmeliaPublication> publications, String instanceId, org.silverpeas.core.admin.user.model.SilverpeasRole profile, String userId)List<String>getActiveValidatorIds(org.silverpeas.core.contribution.publication.model.PublicationPK pk)Collection<org.silverpeas.core.contribution.publication.model.Location>getAliases(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)Gets all the aliases of the specified publication, whatever the component instance and without taking into account the publication is a clone or not.List<org.silverpeas.core.node.model.NodeDetail>getAllowedSubfolders(org.silverpeas.core.node.model.NodeDetail folder, String userId)ValidatorsListgetAllValidators(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)List<KmeliaPublication>getAuthorizedPublicationsOfFolder(org.silverpeas.core.node.model.NodePK pk, String userProfile, String userId, boolean isTreeStructureUsed)Gets the publications linked to the folder represented by givenNodePKreference.List<org.silverpeas.core.node.model.NodeDetail>getAxis(String componentId)Get the axis on which publications are categorized in the specified component instance.List<org.silverpeas.core.node.model.NodeDetail>getAxisHeaders(String componentId)Get the header of the axis on which publications are categorized in the specified component instance.org.silverpeas.core.node.model.NodePKgetBestLocationOfPublicationForUser(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)Gets the father of the specified publication according to the rights of the user.TopicDetailgetBestTopicDetailOfPublicationForUser(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, boolean isTreeStructureUsed, String userId)Gets the details about the father from which the specified publication is accessible to the given user.org.silverpeas.core.contribution.publication.model.CompletePublicationgetCompletePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)Gets the complete details about the publication referred by the specified unique identifier.org.silverpeas.kernel.bundle.LocalizationBundlegetComponentMessages(String language)org.silverpeas.kernel.bundle.SettingBundlegetComponentSettings()Optional<KmeliaPublication>getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)org.silverpeas.core.node.model.NodeDetailgetExpandedPathToNode(org.silverpeas.core.node.model.NodePK pk, String userId)org.silverpeas.core.node.model.NodeDetailgetFolder(org.silverpeas.core.node.model.NodePK nodePK, String userId)Gets the details about the specified folder.Collection<org.silverpeas.core.node.model.NodeDetail>getFolderChildren(org.silverpeas.core.node.model.NodePK nodePK, String userId)KmeliaPublicationgetKmaxPublication(String pubId, String currentUserId)Get the given publication for the given user.List<org.silverpeas.core.silverstatistics.access.model.HistoryObjectDetail>getLastAccess(org.silverpeas.core.contribution.publication.model.PublicationPK pk, org.silverpeas.core.node.model.NodePK nodePK, String excludedUserId, int maxResult)List<KmeliaPublication>getLatestAuthorizedPublications(String instanceId, String userId, int limit)Checks rights on publications order by descending begin visibility date of publication.List<KmeliaPublication>getLinkedPublications(KmeliaPublication publication, String userId)Gets the publications linked with the specified one and for which the specified user is authorized to access.Collection<org.silverpeas.core.contribution.publication.model.Location>getLocations(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)Gets all the locations of the specified publication; whatever the component instance.Collection<String>getModelUsed(String instanceId, String nodeId)org.silverpeas.core.node.model.NodeDetailgetNodeHeader(String id, String componentId)Get the header of the specified node.List<KmeliaPublication>getNonVisiblePublications(String componentId, String userId)Collection<org.silverpeas.core.node.model.NodeDetail>getPath(String id, String componentId)Get path of a position in an axis.Collection<Collection<org.silverpeas.core.node.model.NodeDetail>>getPathList(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)Return list of all path to this publication - it's a Collection of NodeDetail collectionKmeliaPublicationgetPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK)Gets the Kmelia publication identified by the specified identifying key and that is located into the specified topic.Collection<org.silverpeas.core.node.coordinates.model.Coordinate>getPublicationCoordinates(String pubId, String componentId)Get the coordinates for the given publication on the axis of the specified component instance.org.silverpeas.core.contribution.publication.model.PublicationDetailgetPublicationDetail(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)Return the detail of a publication (only the Header)<T extends org.silverpeas.core.ResourceReference>
List<org.silverpeas.core.contribution.publication.model.PublicationDetail>getPublicationDetails(List<T> references)gets a list of PublicationDetail corresponding to the links parameterorg.silverpeas.core.node.model.NodePKgetPublicationFatherPK(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)Gets the father of the specified publication.<T extends org.silverpeas.core.ResourceReference>
List<KmeliaPublication>getPublications(List<T> references, String userId, org.silverpeas.core.node.model.NodePK contextFolder, boolean accessControlFiltering)Gets a list of publications with optional control access filtering.<T extends org.silverpeas.core.ResourceReference>
List<org.silverpeas.kernel.util.Pair<KmeliaPublication,KmeliaPublication>>getPublicationsForModification(List<T> references, String userId)Gets a list ofPairofKmeliaPublicationinstances into context of modification by a user represented by the given user id.List<KmeliaPublication>getPublicationsToValidate(String componentId, String userId)org.silverpeas.core.node.model.NodeDetailgetRoot(String componentId, String userId)intgetSilverObjectId(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)org.silverpeas.core.node.model.NodeDetailgetSubTopicDetail(org.silverpeas.core.node.model.NodePK pk)Return a subtopic to currentTopicList<org.silverpeas.core.node.model.NodeDetail>getTreeview(org.silverpeas.core.node.model.NodePK nodePK, String profile, boolean coWritingEnable, boolean draftVisibleWithCoWriting, String userId, boolean displayNb, boolean isRightsOnTopicsUsed)Collection<KmeliaPublication>getUnbalancedPublications(String componentId)Get publications that aren't categorized on any axis.List<String>getUserIdsOfFolder(org.silverpeas.core.node.model.NodePK pk)org.silverpeas.core.notification.user.UserNotificationgetUserNotification(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.contribution.attachment.model.SimpleDocumentPK documentPk, org.silverpeas.core.node.model.NodePK topicPK)Send an email to alert users of a attachmentorg.silverpeas.core.notification.user.UserNotificationgetUserNotification(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK)Send an email to alert users of a publication creationorg.silverpeas.core.notification.user.UserNotificationgetUserNotification(org.silverpeas.core.node.model.NodePK pk)Send a notification to alert users about a folderStringgetUserTopicProfile(org.silverpeas.core.node.model.NodePK pk, String userId)TopicDetailgoTo(org.silverpeas.core.node.model.NodePK pk, String userId, boolean isTreeStructureUsed, String userProfile, boolean mustUserRightsBeChecked)voidindexKmax(String componentId)voidindexKmelia(String componentId)booleanisRelatedTo(String instanceId)booleanisUserCanPublish(String componentId, String userId)booleanisUserCanValidate(String componentId, String userId)booleanisUserCanValidatePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)This method verifies if the user behind the given user identifier can validate the publication represented by the given primary key.booleanisUserCanWrite(String componentId, String userId)voidmoveNode(org.silverpeas.core.node.model.NodePK nodePK, org.silverpeas.core.node.model.NodePK to, KmeliaPasteDetail pasteContext)voidmovePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK to, KmeliaPasteDetail pasteContext)voidmovePublicationInSameApplication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK from, KmeliaPasteDetail pasteContext)protected voidonDocumentDeletion(org.silverpeas.core.contribution.attachment.notification.AttachmentRef attachment)voidperformReminder(org.silverpeas.core.reminder.Reminder reminder)Performs processes about kmelia linked to given reminder.
If kmelia is not concerned, nothing is performed.voidremoveContentOfPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)List<KmeliaPublication>search(List<String> combination, int nbDays, String componentId)Get publications categorized in a combination of positions and that are visible or created the given number of days ago.List<KmeliaPublication>search(List<String> combination, String componentId)Get publications categorized in a combination of positions.voidsendModificationAlert(int modificationScope, org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)voidsendPublicationToBasket(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)voidsendPublicationToBasket(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, boolean kmaxMode)Send the publication in the basket topic.voidsetAliases(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, List<org.silverpeas.core.contribution.publication.model.Location> locations)voidsetModelUsed(String[] models, String instanceId, String nodeId)voidsetValidators(org.silverpeas.core.contribution.publication.model.PublicationPK pubOrClonePK, String userIds)voidsortSubTopics(org.silverpeas.core.node.model.NodePK fatherPK, boolean recursive, String[] criteria)voidsuspendPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String defermentMotive, String userId)voidunvalidatePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId, String refusalMotive, int validationType)voidupdateAxis(org.silverpeas.core.node.model.NodeDetail axis, String componentId)Update the given axis in the specified component instance.voidupdatePosition(org.silverpeas.core.node.model.NodeDetail position, String componentId)Update a position in an axisvoidupdatePublication(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail)Update a publication (only the header - parameters)voidupdatePublication(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, boolean forceUpdateDate)voidupdatePublication(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)Update a publication (only the header - parameters)org.silverpeas.core.node.model.NodeDetailupdateTopic(org.silverpeas.core.node.model.NodeDetail topic, String alertType)Update the specified topic and alert users about it.voiduserHaveBeenDeleted(String userId)booleanvalidatePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId, boolean force, boolean hasUserNoMoreValidationRight)
-
-
-
Method Detail
-
goTo
public TopicDetail goTo(org.silverpeas.core.node.model.NodePK pk, String userId, boolean isTreeStructureUsed, String userProfile, boolean mustUserRightsBeChecked)
- Specified by:
goToin interfaceKmeliaService
-
getAuthorizedPublicationsOfFolder
public List<KmeliaPublication> getAuthorizedPublicationsOfFolder(org.silverpeas.core.node.model.NodePK pk, String userProfile, String userId, boolean isTreeStructureUsed)
Description copied from interface:KmeliaServiceGets the publications linked to the folder represented by givenNodePKreference.In any case, user right access to a publication is verified so that only accessible ones are included into returned list.
- Specified by:
getAuthorizedPublicationsOfFolderin interfaceKmeliaService- Parameters:
pk- the reference to a folder.userProfile- a user profileuserId- the identifier of the user for which access controls MUST be verified.isTreeStructureUsed- true if publications are represented into tree structure, false otherwise.- Returns:
- a list of
KmeliaPublicationinstances.
-
getLatestAuthorizedPublications
public List<KmeliaPublication> getLatestAuthorizedPublications(String instanceId, String userId, int limit)
Description copied from interface:KmeliaServiceChecks rights on publications order by descending begin visibility date of publication.Due to the nature of this service, it is not designed to by used by update processes and the result is so cached at request scope in order to avoid to perform several times the same request.
- Specified by:
getLatestAuthorizedPublicationsin interfaceKmeliaService- Parameters:
instanceId- the identifier of the instance.userId- the identifier of the user for which access controls MUST be verified.limit- the maximum number of publications to return (0 = no limit).- Returns:
- a list of
KmeliaPublicationinstances.
-
getAllowedSubfolders
public List<org.silverpeas.core.node.model.NodeDetail> getAllowedSubfolders(org.silverpeas.core.node.model.NodeDetail folder, String userId)
- Specified by:
getAllowedSubfoldersin interfaceKmeliaService
-
addToTopic
public org.silverpeas.core.node.model.NodeDetail addToTopic(org.silverpeas.core.node.model.NodePK fatherPK, org.silverpeas.core.node.model.NodeDetail subTopic)Add a subtopic to a topic - If a subtopic of same name already exists a NodePK with id=-1 is returned else the new topic NodePK- Specified by:
addToTopicin interfaceKmeliaService- Parameters:
fatherPK- the topic Id of the future fathersubTopic- the NodeDetail of the new sub topic- Returns:
- If a subtopic of same name already exists a NodePK with id=-1 is returned else the new topic NodePK
- See Also:
NodeDetail,NodePK
-
addSubTopic
public org.silverpeas.core.node.model.NodeDetail addSubTopic(org.silverpeas.core.node.model.NodePK fatherPK, org.silverpeas.core.node.model.NodeDetail subTopic, String alertType)Description copied from interface:KmeliaServiceAdd a subtopic to currentTopic and alert users about it.- Specified by:
addSubTopicin interfaceKmeliaServicesubTopic- the details about the new subtopicalertType- Notifies either all users ("All""), only publishers ("Publisher") or nobody ("None") about the topic creation.- Returns:
- the new added subtopic.
- See Also:
NodeDetail,NodePK
-
updateTopic
public org.silverpeas.core.node.model.NodeDetail updateTopic(org.silverpeas.core.node.model.NodeDetail topic, String alertType)Description copied from interface:KmeliaServiceUpdate the specified topic and alert users about it.- Specified by:
updateTopicin interfaceKmeliaService- Parameters:
topic- the updated data of the topic.alertType- Notifies either all users ("All""), only publishers ("Publisher") or nobody ("None") about the topic creation.- Returns:
- the updated topic.
- See Also:
NodeDetail,NodePK
-
getSubTopicDetail
public org.silverpeas.core.node.model.NodeDetail getSubTopicDetail(org.silverpeas.core.node.model.NodePK pk)
Description copied from interface:KmeliaServiceReturn a subtopic to currentTopic- Specified by:
getSubTopicDetailin interfaceKmeliaService- Parameters:
pk- the id of the researched topic- Returns:
- the detail of the specified topic
- See Also:
NodeDetail
-
deleteTopic
public void deleteTopic(org.silverpeas.core.node.model.NodePK pkToDelete)
Delete a topic and all descendants. Delete all links between descendants and publications. This publications will be visible in the Declassified zone. Delete All subscriptions and favorites on this topics and all descendants- Specified by:
deleteTopicin interfaceKmeliaService- Parameters:
pkToDelete- the id of the topic to delete- Since:
- 1.0
-
changeTopicStatus
public void changeTopicStatus(String newStatus, org.silverpeas.core.node.model.NodePK nodePK, boolean recursiveChanges)
- Specified by:
changeTopicStatusin interfaceKmeliaService
-
sortSubTopics
public void sortSubTopics(org.silverpeas.core.node.model.NodePK fatherPK, boolean recursive, String[] criteria)- Specified by:
sortSubTopicsin interfaceKmeliaService
-
getTreeview
public List<org.silverpeas.core.node.model.NodeDetail> getTreeview(org.silverpeas.core.node.model.NodePK nodePK, String profile, boolean coWritingEnable, boolean draftVisibleWithCoWriting, String userId, boolean displayNb, boolean isRightsOnTopicsUsed)
- Specified by:
getTreeviewin interfaceKmeliaService
-
getPublicationDetail
public org.silverpeas.core.contribution.publication.model.PublicationDetail getPublicationDetail(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
Return the detail of a publication (only the Header)- Specified by:
getPublicationDetailin interfaceKmeliaService- Parameters:
pubPK- the id of the publication- Returns:
- a PublicationDetail
- Since:
- 1.0
- See Also:
PublicationDetail
-
getPathList
public Collection<Collection<org.silverpeas.core.node.model.NodeDetail>> getPathList(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
Return list of all path to this publication - it's a Collection of NodeDetail collection- Specified by:
getPathListin interfaceKmeliaService- Parameters:
pubPK- the id of the publication- Returns:
- a Collection of NodeDetail collection
- Since:
- 1.0
- See Also:
NodeDetail
-
createPublicationIntoTopic
public String createPublicationIntoTopic(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, org.silverpeas.core.node.model.NodePK fatherPK)
Create a new Publication (only the header - parameters) to the current Topic- Specified by:
createPublicationIntoTopicin interfaceKmeliaService- Parameters:
pubDetail- a PublicationDetail- Returns:
- the id of the new publication
- Since:
- 1.0
- See Also:
PublicationDetail
-
createPublicationIntoTopic
public String createPublicationIntoTopic(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, org.silverpeas.core.node.model.NodePK fatherPK, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)
Description copied from interface:KmeliaServiceCreates a new publication into the specified topic and with the specified classification on the PdC.- Specified by:
createPublicationIntoTopicin interfaceKmeliaService- Parameters:
pubDetail- the detail about the publication to create.fatherPK- the unique identifier of the topic into which the publication is published.classification- the classification on the PdC of the publication content.- Returns:
- the unique identifier of the created publication.
-
updatePublication
public void updatePublication(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail)
Update a publication (only the header - parameters)- Specified by:
updatePublicationin interfaceKmeliaService- Parameters:
pubDetail- a PublicationDetail- Since:
- 1.0
- See Also:
PublicationDetail
-
updatePublication
public void updatePublication(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)Description copied from interface:KmeliaServiceUpdate a publication (only the header - parameters)- Specified by:
updatePublicationin interfaceKmeliaService- Parameters:
pubDetail- a PublicationDetailclassification- the classification on the PdC of the publication content.- See Also:
PublicationDetail
-
updatePublication
public void updatePublication(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, boolean forceUpdateDate)- Specified by:
updatePublicationin interfaceKmeliaService
-
movePublication
@SimulationActionProcess(elementLister=KmeliaPublicationSimulationElementLister.class) @Action(MOVE) public void movePublication(@SourcePK org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, @TargetPK org.silverpeas.core.node.model.NodePK to, KmeliaPasteDetail pasteContext)
- Specified by:
movePublicationin interfaceKmeliaService
-
movePublicationInSameApplication
@SimulationActionProcess(elementLister=KmeliaPublicationSimulationElementLister.class) @Action(MOVE) public void movePublicationInSameApplication(@SourcePK org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, @TargetPK org.silverpeas.core.node.model.NodePK from, KmeliaPasteDetail pasteContext)
- Specified by:
movePublicationInSameApplicationin interfaceKmeliaService
-
externalElementsOfPublicationHaveChanged
public void externalElementsOfPublicationHaveChanged(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)Description copied from interface:KmeliaServicealert that an external elements of publication (wysiwyg, attachment, versioning) has been created, updated or removed- Specified by:
externalElementsOfPublicationHaveChangedin interfaceKmeliaService- Parameters:
pubPK- - id of the publication which contains this external elements
-
deletePublication
public void deletePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
HEAD Delete a publication If this publication is in the basket or in the DZ, it's deleted from the database Else it only send to the basket.- Specified by:
deletePublicationin interfaceKmeliaService- Parameters:
pubPK- the id of the publication to delete- See Also:
TopicDetail
-
sendPublicationToBasket
public void sendPublicationToBasket(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, boolean kmaxMode)Send the publication in the basket topic.All aliases of the publication are deleted if exist.
- Specified by:
sendPublicationToBasketin interfaceKmeliaService- Parameters:
pubPK- the id of the publicationkmaxMode- true to indicate a use from kmax application- Since:
- 1.0
- See Also:
TopicDetail
-
sendPublicationToBasket
public void sendPublicationToBasket(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
- Specified by:
sendPublicationToBasketin interfaceKmeliaService
-
addPublicationToTopic
public void addPublicationToTopic(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK fatherPK, boolean isACreation)Description copied from interface:KmeliaServiceAdd a publication to a topic and send email alerts to topic subscribers- Specified by:
addPublicationToTopicin interfaceKmeliaService- Parameters:
pubPK- the id of the publicationfatherPK- the id of the topic
-
addPublicationToTopicWithoutNotifications
public void addPublicationToTopicWithoutNotifications(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK fatherPK, boolean isACreation)- Specified by:
addPublicationToTopicWithoutNotificationsin interfaceKmeliaService
-
addInfoLinks
public void addInfoLinks(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, List<org.silverpeas.core.ResourceReference> links)Updates the publication links- Specified by:
addInfoLinksin interfaceKmeliaService- Parameters:
pubPK- publication identifier which you want to update linkslinks- list of publication to link with current.
-
getCompletePublication
public org.silverpeas.core.contribution.publication.model.CompletePublication getCompletePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
Description copied from interface:KmeliaServiceGets the complete details about the publication referred by the specified unique identifier.- Specified by:
getCompletePublicationin interfaceKmeliaService- Parameters:
pubPK- the unique identifier of a Kmelia publication.- Returns:
- a
CompletePublicationobject.
-
getPublication
public KmeliaPublication getPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK)
Description copied from interface:KmeliaServiceGets the Kmelia publication identified by the specified identifying key and that is located into the specified topic. As a Kmelia publication can be in different locations, all publications other than the original father of the publication are considered as an alias of that original publication. This is why it is required to know the father of the asked publication.- Specified by:
getPublicationin interfaceKmeliaService- Parameters:
pubPK- identifier of the publication to get.topicPK- identifier of the topic in which the publication is located.- Returns:
- the asked
KmeliaPublicationinstance.
-
getBestTopicDetailOfPublicationForUser
public TopicDetail getBestTopicDetailOfPublicationForUser(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, boolean isTreeStructureUsed, String userId)
Description copied from interface:KmeliaServiceGets the details about the father from which the specified publication is accessible to the given user. If the main location of the publication isn't accessible by the user, then the first accessible alias of the publication is returned. If no aliases are accessible or defined, the the details of the root topic is returned.The component instance set to given
PublicationPKgives the priority of the resultingTopicDetail. For example, into case of a main publication on instance A with aliases on instance B, if component instance id set to givenPublicationPKis the B one, thenTopicDetailresult is about the best father PK (the best location) on instance B (so an alias in that case).- Specified by:
getBestTopicDetailOfPublicationForUserin interfaceKmeliaService- Parameters:
pubPK- the unique identifier of the publication.isTreeStructureUsed- is the tree view of the topics enabled?userId- the unique identifier of a user.- Returns:
- the details of the topic in which the publication is accessible by the given user.
-
getBestLocationOfPublicationForUser
public org.silverpeas.core.node.model.NodePK getBestLocationOfPublicationForUser(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)Description copied from interface:KmeliaServiceGets the father of the specified publication according to the rights of the user. If the main location of the publication isn't accessible by the user, then the first accessible alias of the publication is returned. If no aliases are accessible or defined, the the root topic is returned.The component instance set to given
PublicationPKgives the priority of the resultingNodePK. For example, into case of a main publication on instance A with aliases on instance B, if component instance id set to givenPublicationPKis the B one, then the best father PK (the best location) on instance B is returned (so an alias in that case).- Specified by:
getBestLocationOfPublicationForUserin interfaceKmeliaService- Parameters:
pubPK- the unique identifier of the publicationuserId- the unique identifier of a user.- Returns:
- a topic in which the publication is accessible by the given user.
-
getPublicationFatherPK
public org.silverpeas.core.node.model.NodePK getPublicationFatherPK(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
Description copied from interface:KmeliaServiceGets the father of the specified publication. If the publication is a clone of a main one, then gets the father of the cloned publication. The father returned should be the main location of the publication. It the publication is an orphaned one, null is returned.- Specified by:
getPublicationFatherPKin interfaceKmeliaService- Parameters:
pubPK- the identifying key of the publication.- Returns:
- the father of the publication or null if the publication is an orphaned one.
-
getPublicationDetails
public <T extends org.silverpeas.core.ResourceReference> List<org.silverpeas.core.contribution.publication.model.PublicationDetail> getPublicationDetails(List<T> references)
Description copied from interface:KmeliaServicegets a list of PublicationDetail corresponding to the links parameter- Specified by:
getPublicationDetailsin interfaceKmeliaService- Parameters:
references- list of publication (componentID + publicationId)- Returns:
- a list of PublicationDetail
-
getPublications
public <T extends org.silverpeas.core.ResourceReference> List<KmeliaPublication> getPublications(List<T> references, String userId, org.silverpeas.core.node.model.NodePK contextFolder, boolean accessControlFiltering)
Description copied from interface:KmeliaServiceGets a list of publications with optional control access filtering.When a folder is given as context, then the ALIAS information is computed on each publication.
- Specified by:
getPublicationsin interfaceKmeliaService- Parameters:
references- list of publication represented asResourceReferenceinstances.userId- identifier User. allow to check if the publication is accessible for current usercontextFolder- optional folder that represents if specified the folder into which the given references are retrieved. It is MANDATORY to determinate alias status.accessControlFiltering- true to filter the publication according user rights.- Returns:
- a collection of Kmelia publications
-
getPublicationsForModification
public <T extends org.silverpeas.core.ResourceReference> List<org.silverpeas.kernel.util.Pair<KmeliaPublication,KmeliaPublication>> getPublicationsForModification(List<T> references, String userId)
Description copied from interface:KmeliaServiceGets a list ofPairofKmeliaPublicationinstances into context of modification by a user represented by the given user id. On the left of aPairinstance, there is a publication that can not be a null value. On the right, there is the clone of the publication if any, and so, it can be null if the publication has got no clone.The main location is computed for each publication (and clone) by taking care about performances.
This service guarantees that the returned
KmeliaPublicationinstances each aims the main location.- Specified by:
getPublicationsForModificationin interfaceKmeliaService- Parameters:
references- list of publication represented asResourceReferenceinstances.userId- identifier User. allow to check if the publication is accessible for current user- Returns:
- a list of
PairofKmeliaPublicationinstances. A pair represents on the left the publication and the eventual corresponding clone on the right if it exists.
-
getLinkedPublications
public List<KmeliaPublication> getLinkedPublications(KmeliaPublication publication, String userId)
Gets the publications linked with the specified one and for which the specified user is authorized to access.- Specified by:
getLinkedPublicationsin interfaceKmeliaService- Parameters:
publication- the publication from which linked publications are get.userId- the unique identifier of a user. It allows to check if a linked publication is accessible for the specified user.- Returns:
- a list of Kmelia publications.
-
getPublicationsToValidate
public List<KmeliaPublication> getPublicationsToValidate(String componentId, String userId)
- Specified by:
getPublicationsToValidatein interfaceKmeliaService
-
getAllValidators
public ValidatorsList getAllValidators(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
- Specified by:
getAllValidatorsin interfaceKmeliaService
-
setValidators
public void setValidators(org.silverpeas.core.contribution.publication.model.PublicationPK pubOrClonePK, String userIds)- Specified by:
setValidatorsin interfaceKmeliaService
-
validatePublication
public boolean validatePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId, boolean force, boolean hasUserNoMoreValidationRight)- Specified by:
validatePublicationin interfaceKmeliaService- Parameters:
pubPK- id of the publication to validate. If publication is always visible, clone is processed.userId- id of the user who validateforce- if true, force to validate publication (bypass pending validations)hasUserNoMoreValidationRight- true if the given id represents a user which has no more validation right (deleted user for example)- Returns:
- true if the validation process is complete (ie all validators have validate)
-
unvalidatePublication
public void unvalidatePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId, String refusalMotive, int validationType)- Specified by:
unvalidatePublicationin interfaceKmeliaService
-
suspendPublication
public void suspendPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String defermentMotive, String userId)- Specified by:
suspendPublicationin interfaceKmeliaService
-
draftOutPublication
public void draftOutPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK, String userProfile)Description copied from interface:KmeliaServiceChange publication status from draft to valid (for publisher) or toValidate (for redactor)- Specified by:
draftOutPublicationin interfaceKmeliaService- Parameters:
pubPK- the id of the publication
-
draftOutPublicationWithoutNotifications
public org.silverpeas.core.contribution.publication.model.PublicationDetail draftOutPublicationWithoutNotifications(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK, String userProfile)- Specified by:
draftOutPublicationWithoutNotificationsin interfaceKmeliaService
-
draftOutPublication
public void draftOutPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK, String userProfile, boolean forceUpdateDate)- Specified by:
draftOutPublicationin interfaceKmeliaService
-
draftInPublication
public void draftInPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
Description copied from interface:KmeliaServiceChange publication status from any state to draft- Specified by:
draftInPublicationin interfaceKmeliaService- Parameters:
pubPK- the id of the publication
-
draftInPublication
public void draftInPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)- Specified by:
draftInPublicationin interfaceKmeliaService
-
getUserNotification
public org.silverpeas.core.notification.user.UserNotification getUserNotification(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK)Description copied from interface:KmeliaServiceSend an email to alert users of a publication creation- Specified by:
getUserNotificationin interfaceKmeliaService- Parameters:
pubPK- the publication Id
-
getUserNotification
public org.silverpeas.core.notification.user.UserNotification getUserNotification(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.contribution.attachment.model.SimpleDocumentPK documentPk, org.silverpeas.core.node.model.NodePK topicPK)Description copied from interface:KmeliaServiceSend an email to alert users of a attachment- Specified by:
getUserNotificationin interfaceKmeliaService- Parameters:
pubPK- the publication Id
-
deleteAllReadingControlsByPublication
public void deleteAllReadingControlsByPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
delete reading controls to a publication- Specified by:
deleteAllReadingControlsByPublicationin interfaceKmeliaService- Parameters:
pubPK- the id of a publication- Since:
- 1.0
-
getLastAccess
public List<org.silverpeas.core.silverstatistics.access.model.HistoryObjectDetail> getLastAccess(org.silverpeas.core.contribution.publication.model.PublicationPK pk, org.silverpeas.core.node.model.NodePK nodePK, String excludedUserId, int maxResult)
- Specified by:
getLastAccessin interfaceKmeliaService
-
getUserIdsOfFolder
public List<String> getUserIdsOfFolder(org.silverpeas.core.node.model.NodePK pk)
- Specified by:
getUserIdsOfFolderin interfaceKmeliaService
-
indexKmelia
public void indexKmelia(String componentId)
- Specified by:
indexKmeliain interfaceKmeliaService
-
sendModificationAlert
public void sendModificationAlert(int modificationScope, org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)- Specified by:
sendModificationAlertin interfaceKmeliaService
-
getSilverObjectId
public int getSilverObjectId(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
- Specified by:
getSilverObjectIdin interfaceKmeliaService
-
deleteSilverContent
public void deleteSilverContent(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
- Specified by:
deleteSilverContentin interfaceKmeliaService
-
removeContentOfPublication
public void removeContentOfPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
- Specified by:
removeContentOfPublicationin interfaceKmeliaService
-
setModelUsed
public void setModelUsed(String[] models, String instanceId, String nodeId)
- Specified by:
setModelUsedin interfaceKmeliaService
-
getModelUsed
public Collection<String> getModelUsed(String instanceId, String nodeId)
- Specified by:
getModelUsedin interfaceKmeliaService
-
getAxis
public List<org.silverpeas.core.node.model.NodeDetail> getAxis(String componentId)
Description copied from interface:KmeliaServiceGet the axis on which publications are categorized in the specified component instance.- Specified by:
getAxisin interfaceKmeliaService- Parameters:
componentId- the unique identifier of a component instance.- Returns:
- a list of axis as
NodeDetailinstances.
-
getAxisHeaders
public List<org.silverpeas.core.node.model.NodeDetail> getAxisHeaders(String componentId)
Description copied from interface:KmeliaServiceGet the header of the axis on which publications are categorized in the specified component instance.- Specified by:
getAxisHeadersin interfaceKmeliaService- Parameters:
componentId- the unique identifier of a component instance.- Returns:
- a list of axis headers as
NodeDetailinstances.
-
addAxis
public org.silverpeas.core.node.model.NodePK addAxis(org.silverpeas.core.node.model.NodeDetail axis, String componentId)Description copied from interface:KmeliaServiceAdd the given axis into the specified component instance.- Specified by:
addAxisin interfaceKmeliaService- Parameters:
axis- the axis to add.componentId- the unique identifier of the component instance.- Returns:
- the identifier of the new added axis.
-
updateAxis
public void updateAxis(org.silverpeas.core.node.model.NodeDetail axis, String componentId)Description copied from interface:KmeliaServiceUpdate the given axis in the specified component instance.- Specified by:
updateAxisin interfaceKmeliaService- Parameters:
axis- the axis from which its counterpart in the data source will be updated.componentId- the unique identifier of a component instance.
-
deleteAxis
public void deleteAxis(String axisId, String componentId)
Description copied from interface:KmeliaServiceDelete the given axis in the specified component instance.- Specified by:
deleteAxisin interfaceKmeliaService- Parameters:
axisId- the unique identifier of the axis to delete.componentId- the unique identifier of a component instance.
-
getNodeHeader
public org.silverpeas.core.node.model.NodeDetail getNodeHeader(String id, String componentId)
Description copied from interface:KmeliaServiceGet the header of the specified node.- Specified by:
getNodeHeaderin interfaceKmeliaService- Parameters:
id- the unique identifier of a nodecomponentId- the unique identifier of the component instance in which the node is.- Returns:
- a
NodeDetailinstance.
-
addPosition
public void addPosition(String fatherId, org.silverpeas.core.node.model.NodeDetail position, String componentId, String userId)
Description copied from interface:KmeliaServiceAdd position to an axis in the given component instance and for the specified user.- Specified by:
addPositionin interfaceKmeliaService- Parameters:
fatherId- the identifier of the position that will be the father of the new one.position- the position to add.componentId- the unique identifier of the component instance.userId- the unique identifier of a user.
-
updatePosition
public void updatePosition(org.silverpeas.core.node.model.NodeDetail position, String componentId)Description copied from interface:KmeliaServiceUpdate a position in an axis- Specified by:
updatePositionin interfaceKmeliaService- Parameters:
position- the position from which its counterpart in the data source will be updated.componentId- the unique identifier of the component instance in which belongs the axis.
-
deletePosition
public void deletePosition(String positionId, String componentId)
Description copied from interface:KmeliaServiceDelete a position in an axis- Specified by:
deletePositionin interfaceKmeliaService- Parameters:
positionId- the unique identifier of the position to delete.componentId- the unique identifier of the component instance in which belongs the axis.
-
getPath
public Collection<org.silverpeas.core.node.model.NodeDetail> getPath(String id, String componentId)
Description copied from interface:KmeliaServiceGet path of a position in an axis.- Specified by:
getPathin interfaceKmeliaService- Parameters:
id- the unique identifier of a position.componentId- the unique identifier of the component instance in which belongs the axis.- Returns:
- the path of the position with a
NodeDetailinstance for each path's node.
-
search
public List<KmeliaPublication> search(List<String> combination, String componentId)
Description copied from interface:KmeliaServiceGet publications categorized in a combination of positions.- Specified by:
searchin interfaceKmeliaService- Parameters:
combination- a list of positions composing the combination.componentId- the unique identifier of the component instance in which belongs the combination.- Returns:
- the publications that satisfy the combination of positions.
-
search
public List<KmeliaPublication> search(List<String> combination, int nbDays, String componentId)
Description copied from interface:KmeliaServiceGet publications categorized in a combination of positions and that are visible or created the given number of days ago.- Specified by:
searchin interfaceKmeliaService- Parameters:
combination- a list of positions composing the combination.nbDays- the number of days before today.componentId- the unique identifier of the component instance in which belongs the combination.- Returns:
- the publications that satisfy the combination of positions and the time criteria.
-
getUnbalancedPublications
public Collection<KmeliaPublication> getUnbalancedPublications(String componentId)
Description copied from interface:KmeliaServiceGet publications that aren't categorized on any axis.- Specified by:
getUnbalancedPublicationsin interfaceKmeliaService- Parameters:
componentId- the unique identifier of a component instance.- Returns:
- the uncategorized publications.
-
indexKmax
public void indexKmax(String componentId)
- Specified by:
indexKmaxin interfaceKmeliaService
-
getKmaxPublication
public KmeliaPublication getKmaxPublication(String pubId, String currentUserId)
Description copied from interface:KmeliaServiceGet the given publication for the given user.- Specified by:
getKmaxPublicationin interfaceKmeliaService- Parameters:
pubId- the unique identifier of a publication.currentUserId- the unique identifier of the user for whom the publications are asked.- Returns:
- the publication as a
KmeliaPublicationinstance.
-
getPublicationCoordinates
public Collection<org.silverpeas.core.node.coordinates.model.Coordinate> getPublicationCoordinates(String pubId, String componentId)
Description copied from interface:KmeliaServiceGet the coordinates for the given publication on the axis of the specified component instance.- Specified by:
getPublicationCoordinatesin interfaceKmeliaService- Parameters:
pubId- the unique identifier of a publication.componentId- the unique identifier of the component instance.- Returns:
- a collection of coordinates
-
addPublicationToCombination
public void addPublicationToCombination(String pubId, List<String> combination, String componentId)
Description copied from interface:KmeliaServiceAdd for the given publication a combination of position on the axis of the component instance.- Specified by:
addPublicationToCombinationin interfaceKmeliaService- Parameters:
pubId- the unique identifier of a publication.combination- a list of coordinate identifiers.componentId- the unique identifier of the component instance.
-
checkCombination
protected boolean checkCombination(Collection<org.silverpeas.core.node.coordinates.model.Coordinate> coordinates, List<String> combination)
-
checkPoint
protected boolean checkPoint(org.silverpeas.core.node.coordinates.model.CoordinatePoint point, List<String> combination)
-
deletePublicationFromCombination
public void deletePublicationFromCombination(String pubId, String combinationId, String componentId)
Description copied from interface:KmeliaServiceRemove for the given publication the specified combination of positions on the axis of the component instance.- Specified by:
deletePublicationFromCombinationin interfaceKmeliaService- Parameters:
pubId- the unique identifier of a publication.combinationId- the unique identifier of a combination of positions.componentId- the unique identifier of the component instance.
-
createKmaxPublication
public String createKmaxPublication(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail)
Create a new Publication (only the header - parameters)- Specified by:
createKmaxPublicationin interfaceKmeliaService- Parameters:
pubDetail- a PublicationDetail- Returns:
- the id of the new publication
- Since:
- 1.0
- See Also:
PublicationDetail
-
getAliases
public Collection<org.silverpeas.core.contribution.publication.model.Location> getAliases(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
Description copied from interface:KmeliaServiceGets all the aliases of the specified publication, whatever the component instance and without taking into account the publication is a clone or not. If the publication is a clone, then nothing will be returned.- Specified by:
getAliasesin interfaceKmeliaService- Parameters:
pubPK- the unique identifier of the publication.- Returns:
- a collection of locations that are all the aliases for the given publication.
-
getLocations
public Collection<org.silverpeas.core.contribution.publication.model.Location> getLocations(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
Description copied from interface:KmeliaServiceGets all the locations of the specified publication; whatever the component instance. If the given publication is a clone, then gets all the locations of the main publication.- Specified by:
getLocationsin interfaceKmeliaService- Parameters:
pubPK- the unique identifier of the publication.- Returns:
- a collection of the locations of the given publication.
-
setAliases
public void setAliases(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, List<org.silverpeas.core.contribution.publication.model.Location> locations)- Specified by:
setAliasesin interfaceKmeliaService
-
addAttachmentToPublication
public void addAttachmentToPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId, String filename, String description, byte[] contents)- Specified by:
addAttachmentToPublicationin interfaceKmeliaService
-
createTopic
public org.silverpeas.core.node.model.NodeDetail createTopic(String componentId, String topicId, String spaceId, String userId, String name, String description)
- Specified by:
createTopicin interfaceKmeliaService
-
clonePublication
public String clonePublication(org.silverpeas.core.contribution.publication.model.CompletePublication refPubComplete, org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, String nextStatus)
Description copied from interface:KmeliaServiceClone the given publication. Create new publication based on pubDetail object if not null or CompletePublication otherwise. Original publication will not be modified (except references to clone: cloneId and cloneStatus).- Specified by:
clonePublicationin interfaceKmeliaServicepubDetail- If not null, attribute values are set to the clonenextStatus- Draft or Clone- Returns:
- the identifier of the cloned publication.
-
getRoot
public org.silverpeas.core.node.model.NodeDetail getRoot(String componentId, String userId)
- Specified by:
getRootin interfaceKmeliaService
-
getFolder
public org.silverpeas.core.node.model.NodeDetail getFolder(org.silverpeas.core.node.model.NodePK nodePK, String userId)Description copied from interface:KmeliaServiceGets the details about the specified folder. The difference withKmeliaService.getNodeHeader(String, String)is that the children are also set as well as other information like the number of publications.- Specified by:
getFolderin interfaceKmeliaService- Parameters:
nodePK- the unique identifier of the folder.userId- the unique identifier of the user for which the folder is asked.- Returns:
- the
NodeDetailinstance corresponding to the folder.
-
getFolderChildren
public Collection<org.silverpeas.core.node.model.NodeDetail> getFolderChildren(org.silverpeas.core.node.model.NodePK nodePK, String userId)
- Specified by:
getFolderChildrenin interfaceKmeliaService
-
getUserTopicProfile
public String getUserTopicProfile(org.silverpeas.core.node.model.NodePK pk, String userId)
- Specified by:
getUserTopicProfilein interfaceKmeliaService
-
isUserCanValidatePublication
public boolean isUserCanValidatePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)This method verifies if the user behind the given user identifier can validate the publication represented by the given primary key. The verification is strictly applied on the given primary key, that is to say that no publication clone information are retrieved. To perform a verification on a publication clone, the primary key of the clone must be given.- Specified by:
isUserCanValidatePublicationin interfaceKmeliaService- Parameters:
pubPK- the primary key of the publication or of the clone of a publication.userId- the identifier of the user fo which rights must be verified.- Returns:
- true if the user can validate, false otherwise.
-
isUserCanValidate
public boolean isUserCanValidate(String componentId, String userId)
- Specified by:
isUserCanValidatein interfaceKmeliaService
-
isUserCanWrite
public boolean isUserCanWrite(String componentId, String userId)
- Specified by:
isUserCanWritein interfaceKmeliaService
-
isUserCanPublish
public boolean isUserCanPublish(String componentId, String userId)
- Specified by:
isUserCanPublishin interfaceKmeliaService
-
getExpandedPathToNode
public org.silverpeas.core.node.model.NodeDetail getExpandedPathToNode(org.silverpeas.core.node.model.NodePK pk, String userId)- Specified by:
getExpandedPathToNodein interfaceKmeliaService
-
deletePublications
public List<String> deletePublications(List<String> ids, org.silverpeas.core.node.model.NodePK nodePK, String userId)
Removes publications according to given ids. Before a publication is removed, user priviledges are controlled. If node defines the trash, publications are definitively deleted. Otherwise, publications move into trash.- Specified by:
deletePublicationsin interfaceKmeliaService- Parameters:
ids- the ids of publications to deletenodePK- the node where the publications areuserId- the user who wants to perform deletion- Returns:
- the list of publication ids which has been really deleted
-
getContributionById
public Optional<KmeliaPublication> getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)
- Specified by:
getContributionByIdin interfaceorg.silverpeas.core.ApplicationService- Specified by:
getContributionByIdin interfaceKmeliaService
-
getComponentSettings
public org.silverpeas.kernel.bundle.SettingBundle getComponentSettings()
- Specified by:
getComponentSettingsin interfaceorg.silverpeas.core.ApplicationService
-
getComponentMessages
public org.silverpeas.kernel.bundle.LocalizationBundle getComponentMessages(String language)
- Specified by:
getComponentMessagesin interfaceorg.silverpeas.core.ApplicationService
-
isRelatedTo
public boolean isRelatedTo(String instanceId)
- Specified by:
isRelatedToin interfaceorg.silverpeas.core.ApplicationService
-
moveNode
@SimulationActionProcess(elementLister=KmeliaNodeSimulationElementLister.class) @Action(MOVE) public void moveNode(@SourcePK org.silverpeas.core.node.model.NodePK nodePK, @TargetPK org.silverpeas.core.node.model.NodePK to, KmeliaPasteDetail pasteContext)
- Specified by:
moveNodein interfaceKmeliaService
-
copyNode
@SimulationActionProcess(elementLister=KmeliaNodeSimulationElementLister.class) @Action(COPY) public org.silverpeas.core.node.model.NodeDetail copyNode(@SourcePK @TargetPK KmeliaCopyDetail copyDetail)
Description copied from interface:KmeliaServiceCopies the node according to the information provided by the specified copy descriptor.- Specified by:
copyNodein interfaceKmeliaService- Parameters:
copyDetail- a descriptor giving details about the copy to perform like the node to copy and the destination.- Returns:
- the copy of the node.
-
copyPublications
@SimulationActionProcess(elementLister=KmeliaPublicationSimulationElementLister.class) @Action(COPY) public void copyPublications(@SourcePK @TargetPK KmeliaCopyDetail copyDetail)
Description copied from interface:KmeliaServiceCopies all the publications defined in the specified copy descriptor.- Specified by:
copyPublicationsin interfaceKmeliaService- Parameters:
copyDetail- a descriptor providing information about the publications to copy and the destination of the copy.
-
copyPublication
@SimulationActionProcess(elementLister=KmeliaPublicationSimulationElementLister.class) @Action(COPY) public org.silverpeas.core.contribution.publication.model.PublicationDetail copyPublication(@SourcePK org.silverpeas.core.contribution.publication.model.PublicationDetail publiToCopy, @TargetPK KmeliaCopyDetail copyDetail)
Description copied from interface:KmeliaServiceCopies the specified publication according to the given copy descriptor. In the case the publication is an alias, then the copy adds a new location to the original copy. Otherwise the publication is well copied.- Specified by:
copyPublicationin interfaceKmeliaService- Parameters:
publiToCopy- the publication to copy.copyDetail- a descriptor providing details about the copy like the destination.- Returns:
- the copy of the publication or the publication itself in the case of a new location.
-
filterPublications
public List<KmeliaPublication> filterPublications(List<KmeliaPublication> publications, String instanceId, org.silverpeas.core.admin.user.model.SilverpeasRole profile, String userId)
- Specified by:
filterPublicationsin interfaceKmeliaService
-
userHaveBeenDeleted
public void userHaveBeenDeleted(String userId)
- Specified by:
userHaveBeenDeletedin interfaceKmeliaService
-
onDocumentDeletion
protected void onDocumentDeletion(org.silverpeas.core.contribution.attachment.notification.AttachmentRef attachment)
-
getUserNotification
public org.silverpeas.core.notification.user.UserNotification getUserNotification(org.silverpeas.core.node.model.NodePK pk)
Description copied from interface:KmeliaServiceSend a notification to alert users about a folder- Specified by:
getUserNotificationin interfaceKmeliaService- Parameters:
pk- the folder id
-
getActiveValidatorIds
public List<String> getActiveValidatorIds(org.silverpeas.core.contribution.publication.model.PublicationPK pk)
- Specified by:
getActiveValidatorIdsin interfaceKmeliaService
-
performReminder
public void performReminder(org.silverpeas.core.reminder.Reminder reminder)
Description copied from interface:KmeliaServicePerforms processes about kmelia linked to given reminder.
If kmelia is not concerned, nothing is performed.- Specified by:
performReminderin interfaceKmeliaService- Parameters:
reminder- aReminderinstance.
-
deleteClone
public void deleteClone(org.silverpeas.core.contribution.publication.model.PublicationPK pk)
- Specified by:
deleteClonein interfaceKmeliaService
-
getNonVisiblePublications
public List<KmeliaPublication> getNonVisiblePublications(String componentId, String userId)
- Specified by:
getNonVisiblePublicationsin interfaceKmeliaService
-
-