Interface KmeliaService
-
- All Superinterfaces:
org.silverpeas.core.ApplicationService
- All Known Implementing Classes:
DefaultKmeliaService
public interface KmeliaService extends org.silverpeas.core.ApplicationServiceThis is the Service interface controller of the MVC. It controls all the activities that happen in a client session. It also provides mechanisms to access other services.- Author:
- Nicolas Eysseric
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract 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 the specified topic.voidchangeTopicStatus(String newStatus, org.silverpeas.core.node.model.NodePK nodePK, boolean recursiveChanges)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 publication, 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, no content) in a Kmax instance.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)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 basketvoiddeletePublicationFromCombination(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)voiddeleteSilverContent(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)voiddeleteTopic(org.silverpeas.core.node.model.NodePK nodePK)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)static KmeliaServiceget()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.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 positionId, 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 nodePK)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 nodePK, String userId, boolean isTreeStructureUsed, String userProfile, boolean mustUserRightsBeChecked)voidindexKmax(String componentId)voidindexKmelia(String componentId)booleanisUserCanPublish(String componentId, String userId)booleanisUserCanValidate(String componentId, String userId)booleanisUserCanValidatePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)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)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)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 pubPK, String userIds)voidsortSubTopics(org.silverpeas.core.node.model.NodePK fatherPK, boolean recursive, String[] criteria)voidsuspendPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String refusalMotive, 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 detail)Update a publication (only the header - parameters)voidupdatePublication(org.silverpeas.core.contribution.publication.model.PublicationDetail detail, boolean forceUpdateDate)voidupdatePublication(org.silverpeas.core.contribution.publication.model.PublicationDetail detail, 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
-
get
static KmeliaService get()
-
getContributionById
Optional<KmeliaPublication> getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)
- Specified by:
getContributionByIdin interfaceorg.silverpeas.core.ApplicationService
-
goTo
TopicDetail goTo(org.silverpeas.core.node.model.NodePK nodePK, String userId, boolean isTreeStructureUsed, String userProfile, boolean mustUserRightsBeChecked)
-
getAllowedSubfolders
List<org.silverpeas.core.node.model.NodeDetail> getAllowedSubfolders(org.silverpeas.core.node.model.NodeDetail folder, String userId)
-
addToTopic
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 the specified topic.- Parameters:
fatherPK- the topic identifier of the father topic.subtopic- the details about the new subtopic.- Returns:
- the new added subtopic.
- Since:
- 1.0
- See Also:
NodeDetail,NodePK
-
addSubTopic
org.silverpeas.core.node.model.NodeDetail addSubTopic(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.- Parameters:
subtopic- 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.
- Since:
- 1.0
- See Also:
NodeDetail,NodePK
-
updateTopic
org.silverpeas.core.node.model.NodeDetail updateTopic(org.silverpeas.core.node.model.NodeDetail topic, String alertType)Update the specified topic and alert users about it.- 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.
- Since:
- 1.0
- See Also:
NodeDetail,NodePK
-
getSubTopicDetail
org.silverpeas.core.node.model.NodeDetail getSubTopicDetail(org.silverpeas.core.node.model.NodePK nodePK)
Return a subtopic to currentTopic- Parameters:
nodePK- the id of the researched topic- Returns:
- the detail of the specified topic
- Since:
- 1.0
- See Also:
NodeDetail
-
deleteTopic
void deleteTopic(org.silverpeas.core.node.model.NodePK nodePK)
Delete a topic and all descendants. Delete all links between descendants and publications. Its publications will be visible in the Declassified zone. Delete All subscriptions and favorites on its topics and all descendants- Parameters:
nodePK- the id of the topic to delete- Since:
- 1.0
-
changeTopicStatus
void changeTopicStatus(String newStatus, org.silverpeas.core.node.model.NodePK nodePK, boolean recursiveChanges)
-
sortSubTopics
void sortSubTopics(org.silverpeas.core.node.model.NodePK fatherPK, boolean recursive, String[] criteria)
-
getTreeview
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)
-
getPublicationDetail
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)- Parameters:
pubPK- the id of the publication- Returns:
- a PublicationDetail
- Since:
- 1.0
- See Also:
PublicationDetail
-
getAuthorizedPublicationsOfFolder
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.In any case, user right access to a publication is verified so that only accessible ones are included into returned list.
- 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
List<KmeliaPublication> getLatestAuthorizedPublications(String instanceId, String userId, int limit)
Checks 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.
- 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.
-
getPathList
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- Parameters:
pubPK- the id of the publication- Returns:
- a Collection of NodeDetail collection
- Since:
- 1.0
- See Also:
NodeDetail
-
getPublicationFatherPK
org.silverpeas.core.node.model.NodePK getPublicationFatherPK(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
Gets 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.- Parameters:
pubPK- the identifying key of the publication.- Returns:
- the father of the publication or null if the publication is an orphaned one.
-
createPublicationIntoTopic
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- Parameters:
pubDetail- a PublicationDetail- Returns:
- the id of the new publication
- Since:
- 1.0
- See Also:
PublicationDetail
-
createPublicationIntoTopic
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)
Creates a new publication into the specified topic and with the specified classification on the PdC.- 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
void updatePublication(org.silverpeas.core.contribution.publication.model.PublicationDetail detail)
Update a publication (only the header - parameters)- Parameters:
detail- a PublicationDetail- Since:
- 1.0
- See Also:
PublicationDetail
-
updatePublication
void updatePublication(org.silverpeas.core.contribution.publication.model.PublicationDetail detail, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)Update a publication (only the header - parameters)- Parameters:
detail- a PublicationDetailclassification- the classification on the PdC of the publication content.- Since:
- 1.0
- See Also:
PublicationDetail
-
updatePublication
void updatePublication(org.silverpeas.core.contribution.publication.model.PublicationDetail detail, boolean forceUpdateDate)
-
deletePublication
void deletePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
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- Parameters:
pubPK- the id of the publication to delete- Since:
- 1.0
- See Also:
TopicDetail
-
sendPublicationToBasket
void sendPublicationToBasket(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
-
sendPublicationToBasket
void sendPublicationToBasket(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, boolean kmaxMode)
-
addPublicationToTopic
void addPublicationToTopic(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 subscribers- Parameters:
pubPK- the id of the publicationfatherPK- the id of the topic- Since:
- 1.0
-
addPublicationToTopicWithoutNotifications
void addPublicationToTopicWithoutNotifications(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK fatherPK, boolean isACreation)
-
addInfoLinks
void addInfoLinks(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, List<org.silverpeas.core.ResourceReference> links)Updates the publication links- Parameters:
pubPK- publication identifier which you want to update linkslinks- list of publication to link with current.
-
getCompletePublication
org.silverpeas.core.contribution.publication.model.CompletePublication getCompletePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
Gets the complete details about the publication referred by the specified unique identifier.- Parameters:
pubPK- the unique identifier of a Kmelia publication.- Returns:
- a
CompletePublicationobject.
-
getPublication
KmeliaPublication getPublication(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. 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.- Parameters:
pubPK- identifier of the publication to get.topicPK- identifier of the topic in which the publication is located.- Returns:
- the asked
KmeliaPublicationinstance.
-
getBestTopicDetailOfPublicationForUser
TopicDetail getBestTopicDetailOfPublicationForUser(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. 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).- 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
org.silverpeas.core.node.model.NodePK getBestLocationOfPublicationForUser(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)Gets 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).- 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.
-
getPublicationDetails
<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 parameter- Parameters:
references- list of publication (componentID + publicationId)- Returns:
- a list of PublicationDetail
-
getPublications
<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.When a folder is given as context, then the ALIAS information is computed on each publication.
- 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
<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. 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.- 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
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.- 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
List<KmeliaPublication> getPublicationsToValidate(String componentId, String userId)
-
isUserCanValidatePublication
boolean isUserCanValidatePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)
-
getAllValidators
ValidatorsList getAllValidators(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
-
setValidators
void setValidators(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userIds)
-
validatePublication
boolean validatePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId, boolean force, boolean hasUserNoMoreValidationRight)- 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
void unvalidatePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId, String refusalMotive, int validationType)
-
suspendPublication
void suspendPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String refusalMotive, String userId)
-
draftOutPublication
void draftOutPublication(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)- Parameters:
pubPK- the id of the publication
-
draftOutPublicationWithoutNotifications
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)
-
draftOutPublication
void draftOutPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK, String userProfile, boolean forceUpdateDate)
-
draftInPublication
void draftInPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
Change publication status from any state to draft- Parameters:
pubPK- the id of the publication
-
draftInPublication
void draftInPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId)
-
movePublication
void movePublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK to, KmeliaPasteDetail pasteContext)
-
movePublicationInSameApplication
void movePublicationInSameApplication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK from, KmeliaPasteDetail pasteContext)
-
externalElementsOfPublicationHaveChanged
void externalElementsOfPublicationHaveChanged(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 removed- Parameters:
pubPK- - id of the publication which contains this external elements
-
sendModificationAlert
void sendModificationAlert(int modificationScope, org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
-
getUserNotification
org.silverpeas.core.notification.user.UserNotification getUserNotification(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK topicPK)Send an email to alert users of a publication creation- Parameters:
pubPK- the publication Id
-
getUserNotification
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)Send an email to alert users of a attachment- Parameters:
pubPK- the publication Id
-
getUserNotification
org.silverpeas.core.notification.user.UserNotification getUserNotification(org.silverpeas.core.node.model.NodePK pk)
Send a notification to alert users about a folder- Parameters:
pk- the folder id
-
deleteAllReadingControlsByPublication
void deleteAllReadingControlsByPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
delete reading controls to a publication- Parameters:
pubPK- the id of a publication- Since:
- 1.0
-
indexKmelia
void indexKmelia(String componentId)
-
getSilverObjectId
int getSilverObjectId(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
-
deleteSilverContent
void deleteSilverContent(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
-
getModelUsed
Collection<String> getModelUsed(String instanceId, String nodeId)
-
getAxis
List<org.silverpeas.core.node.model.NodeDetail> getAxis(String componentId)
Get the axis on which publications are categorized in the specified component instance.- Parameters:
componentId- the unique identifier of a component instance.- Returns:
- a list of axis as
NodeDetailinstances.
-
getAxisHeaders
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.- Parameters:
componentId- the unique identifier of a component instance.- Returns:
- a list of axis headers as
NodeDetailinstances.
-
addAxis
org.silverpeas.core.node.model.NodePK addAxis(org.silverpeas.core.node.model.NodeDetail axis, String componentId)Add the given axis into the specified component instance.- Parameters:
axis- the axis to add.componentId- the unique identifier of the component instance.- Returns:
- the identifier of the new added axis.
-
updateAxis
void updateAxis(org.silverpeas.core.node.model.NodeDetail axis, String componentId)Update the given axis in the specified component instance.- Parameters:
axis- the axis from which its counterpart in the data source will be updated.componentId- the unique identifier of a component instance.
-
deleteAxis
void deleteAxis(String axisId, String componentId)
Delete the given axis in the specified component instance.- Parameters:
axisId- the unique identifier of the axis to delete.componentId- the unique identifier of a component instance.
-
getNodeHeader
org.silverpeas.core.node.model.NodeDetail getNodeHeader(String id, String componentId)
Get the header of the specified node.- Parameters:
id- the unique identifier of a nodecomponentId- the unique identifier of the component instance in which the node is.- Returns:
- a
NodeDetailinstance.
-
addPosition
void addPosition(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.- 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
void updatePosition(org.silverpeas.core.node.model.NodeDetail position, String componentId)Update a position in an axis- 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
void deletePosition(String positionId, String componentId)
Delete a position in an axis- Parameters:
positionId- the unique identifier of the position to delete.componentId- the unique identifier of the component instance in which belongs the axis.
-
getPath
Collection<org.silverpeas.core.node.model.NodeDetail> getPath(String positionId, String componentId)
Get path of a position in an axis.- Parameters:
positionId- 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
List<KmeliaPublication> search(List<String> combination, String componentId)
Get publications categorized in a combination of positions.- 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
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.- 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
Collection<KmeliaPublication> getUnbalancedPublications(String componentId)
Get publications that aren't categorized on any axis.- Parameters:
componentId- the unique identifier of a component instance.- Returns:
- the uncategorized publications.
-
indexKmax
void indexKmax(String componentId)
-
getKmaxPublication
KmeliaPublication getKmaxPublication(String pubId, String currentUserId)
Get the given publication for the given user.- 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
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.- Parameters:
pubId- the unique identifier of a publication.componentId- the unique identifier of the component instance.- Returns:
- a collection of coordinates
-
addPublicationToCombination
void addPublicationToCombination(String pubId, List<String> combination, String componentId)
Add for the given publication a combination of position on the axis of the component instance.- Parameters:
pubId- the unique identifier of a publication.combination- a list of coordinate identifiers.componentId- the unique identifier of the component instance.
-
deletePublicationFromCombination
void deletePublicationFromCombination(String pubId, String combinationId, String componentId)
Remove for the given publication the specified combination of positions on the axis of the component instance.- 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
String createKmaxPublication(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail)
Create a new publication (only the header, no content) in a Kmax instance.- Parameters:
pubDetail- the publication to create.- Returns:
- the id of the new publication
- Since:
- 1.0
- See Also:
PublicationDetail
-
getLocations
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. If the given publication is a clone, then gets all the locations of the main publication.- Parameters:
pubPK- the unique identifier of the publication.- Returns:
- a collection of the locations of the given publication.
-
getAliases
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. If the publication is a clone, then nothing will be returned.- Parameters:
pubPK- the unique identifier of the publication.- Returns:
- a collection of locations that are all the aliases for the given publication.
-
setAliases
void setAliases(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, List<org.silverpeas.core.contribution.publication.model.Location> locations)
-
addAttachmentToPublication
void addAttachmentToPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, String userId, String filename, String description, byte[] contents)
-
createTopic
org.silverpeas.core.node.model.NodeDetail createTopic(String componentId, String topicId, String spaceId, String userId, String name, String description)
-
clonePublication
String clonePublication(org.silverpeas.core.contribution.publication.model.CompletePublication refPubComplete, org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, String nextStatus)
Clone 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).- Parameters:
pubDetail- If not null, attribute values are set to the clonenextStatus- Draft or Clone- Returns:
- the identifier of the cloned publication.
-
removeContentOfPublication
void removeContentOfPublication(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)
-
getFolderChildren
Collection<org.silverpeas.core.node.model.NodeDetail> getFolderChildren(org.silverpeas.core.node.model.NodePK nodePK, String userId)
-
getFolder
org.silverpeas.core.node.model.NodeDetail getFolder(org.silverpeas.core.node.model.NodePK nodePK, String userId)Gets the details about the specified folder. The difference withgetNodeHeader(String, String)is that the children are also set as well as other information like the number of publications.- 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.
-
getExpandedPathToNode
org.silverpeas.core.node.model.NodeDetail getExpandedPathToNode(org.silverpeas.core.node.model.NodePK pk, String userId)
-
getUserTopicProfile
String getUserTopicProfile(org.silverpeas.core.node.model.NodePK pk, String userId)
-
deletePublications
List<String> deletePublications(List<String> ids, org.silverpeas.core.node.model.NodePK nodePK, String userId)
-
getLastAccess
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)
-
copyNode
org.silverpeas.core.node.model.NodeDetail copyNode(KmeliaCopyDetail copyDetail)
Copies the node according to the information provided by the specified copy descriptor.- 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
void copyPublications(KmeliaCopyDetail copyDetail)
Copies all the publications defined in the specified copy descriptor.- Parameters:
copyDetail- a descriptor providing information about the publications to copy and the destination of the copy.
-
copyPublication
org.silverpeas.core.contribution.publication.model.PublicationDetail copyPublication(org.silverpeas.core.contribution.publication.model.PublicationDetail publication, KmeliaCopyDetail copyDetail)Copies 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.- Parameters:
publication- 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.
-
moveNode
void moveNode(org.silverpeas.core.node.model.NodePK nodePK, org.silverpeas.core.node.model.NodePK to, KmeliaPasteDetail pasteContext)
-
filterPublications
List<KmeliaPublication> filterPublications(List<KmeliaPublication> publications, String instanceId, org.silverpeas.core.admin.user.model.SilverpeasRole profile, String userId)
-
userHaveBeenDeleted
void userHaveBeenDeleted(String userId)
-
getActiveValidatorIds
List<String> getActiveValidatorIds(org.silverpeas.core.contribution.publication.model.PublicationPK pk)
-
performReminder
void performReminder(org.silverpeas.core.reminder.Reminder reminder)
Performs processes about kmelia linked to given reminder.
If kmelia is not concerned, nothing is performed.- Parameters:
reminder- aReminderinstance.
-
deleteClone
void deleteClone(org.silverpeas.core.contribution.publication.model.PublicationPK pk)
-
getNonVisiblePublications
List<KmeliaPublication> getNonVisiblePublications(String componentId, String userId)
-
-