Class PublicationImport


  • public class PublicationImport
    extends Object
    • Method Detail

      • importPublication

        public boolean importPublication​(Map<String,​String> publiParams,
                                         Map<String,​String> formParams,
                                         String language,
                                         String xmlFormName,
                                         String discrimatingParameterName,
                                         String userProfile)
        Creates or updates a publication.
        Parameters:
        publiParams - The parameters of the publication.
        formParams - The parameters of the publication's form.
        language - The language of the publication.
        xmlFormName - The name of the publication's form.
        discrimatingParameterName - The name of the field included in the form which allows to retrieve the eventually existing publication to update.
        userProfile - The user's profile used to draft out the publication.
        Returns:
        True if the publication is created, false if it is updated.
      • importPublication

        public boolean importPublication​(String publicationToUpdateId,
                                         Map<String,​String> publiParams,
                                         Map<String,​String> formParams,
                                         String language,
                                         String xmlFormName,
                                         String userProfile)
        Creates or updates a publication.
        Parameters:
        publicationToUpdateId - The id of the publication to update.
        publiParams - The parameters of the publication.
        formParams - The parameters of the publication's form.
        language - The language of the publication.
        xmlFormName - The name of the publication's form.
        userProfile - The user's profile used to draft out the publication.
        Returns:
        True if the publication is created, false if it is updated.
      • getPublicationXmlFields

        public List<org.silverpeas.core.contribution.content.form.XMLField> getPublicationXmlFields​(String publicationId)
      • getPublicationXmlFields

        public List<org.silverpeas.core.contribution.content.form.XMLField> getPublicationXmlFields​(String publicationId,
                                                                                                    String language)
      • getPublicationId

        public String getPublicationId​(String xmlFormName,
                                       String fieldName,
                                       String fieldValue)
        Parameters:
        xmlFormName - The name of the XML form describing the publication.
        fieldName - The name of the field searched into the form.
        fieldValue - The value of the field searched into the form.
        Returns:
        The id of the publication corresponding to the XML form name and containing a field named fieldName and valued to fieldValue. Returns null if no publication is found.
      • createTopic

        public String createTopic​(String name,
                                  String description)
        Parameters:
        name - The name of the topic.
        description - The description of the topic.
        Returns:
        The id of the newly created topic.
      • draftInPublication

        public void draftInPublication​(String xmlFormName,
                                       String fieldName,
                                       String fieldValue)
      • updatePublicationEndDate

        public void updatePublicationEndDate​(String xmlFormName,
                                             String fieldName,
                                             String fieldValue,
                                             Date endDate)
      • setIgnoreMissingFormFields

        public void setIgnoreMissingFormFields​(boolean ignore)