Interface IKnowledgeBaseManager

All Superinterfaces:
IDisposable, IEntity

public interface IKnowledgeBaseManager extends IEntity
Contains methods to access categories, and to manage knowledge base documents and email templates.
  • Method Details

    • categoryAssignCampaignByName

      void categoryAssignCampaignByName(int categoryId, String campaignName) throws Exception, altitude.integrationServer.exceptions.ISException
      Assigns a category to a campaign.
      Parameters:
      categoryId - Identifier of the category.
      campaignName - Name of the campaign.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • categoryDeAssignCampaignByName

      void categoryDeAssignCampaignByName(int categoryId, String campaignName) throws Exception, altitude.integrationServer.exceptions.ISException
      Deassigns a category to a campaign.
      Parameters:
      categoryId - Identifier of the category.
      campaignName - Name of the campaign.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • createCategory

      int createCategory(CategoryCreateRequest categoryCreateRequest) throws Exception, altitude.integrationServer.exceptions.ISException
      Creates a category.
      Parameters:
      categoryCreateRequest - Information about the category.
      Returns:
      The identifier of the category.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • createKBDocument

      int createKBDocument(KBDocumentType type, String title, String subject, String description, String[] keywords, int categoryId, byte[] mime, String textContent, boolean hasAttachments, String fileName, String comment) throws Exception, altitude.integrationServer.exceptions.ISException
      Creates a knowledge base document.
      Parameters:
      type - The type of the knowledge base document.
      title - The title of the knowledge base document.
      subject - The subject of the email template knowledge base document.
      description - The description of the knowledge base document.
      keywords - The list of the keywords of the knowledge base document.
      categoryId - The identifier of the category of the knowledge base document.
      mime - The body of the document in MIME format
      textContent - The text content of the document.
      hasAttachments - If the document has attachments.
      fileName - The file name of the document.
      comment - A comment of the first revision of the document.
      Returns:
      The identifier of the created knowledge base document.

      The subject parameter should only be used in knowledge base documents of type KBDocumentType.EmailTemplate.

      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • createKBDocumentNote

      int createKBDocumentNote(int kBDocumentId, String content) throws Exception, altitude.integrationServer.exceptions.ISException
      Creates a note about a knowledge base document.
      Parameters:
      kBDocumentId - The identifier of the knowledge base document.
      content - The content of the note.
      Returns:
      The identifier of the created note.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • deleteCategory

      void deleteCategory(int categoryId) throws Exception, altitude.integrationServer.exceptions.ISException
      Deletes a category.
      Parameters:
      categoryId - Identifier of the category.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • deleteKBDocument

      void deleteKBDocument(int kBDocumentId) throws Exception, altitude.integrationServer.exceptions.ISException
      Deletes a knowledge base document from the database.
      Parameters:
      kBDocumentId - The identifier of the knowledge base document.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getCategories

      CategoryData[] getCategories(boolean onlyAvailableInOpenCampaigns) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets all categories organized hierarchically
      Parameters:
      onlyAvailableInOpenCampaigns - Only get the categories assigned to open campaigns.
      Returns:
      An array of type CategoryData with the root categories with all children
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getCategoriesInCampaignById

      CategoryData[] getCategoriesInCampaignById(int campaignId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets the categories assigned to the specified campaign.
      Parameters:
      campaignId - The identifier of the campaign
      Returns:
      An array of type CategoryData with the categories assigned and all descendents.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getCategoriesInCampaignByName

      CategoryData[] getCategoriesInCampaignByName(String campaignName) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets the categories assigned to the specified campaign.
      Parameters:
      campaignName - The name of the campaign.
      Returns:
      An array of type CategoryData with the categories assigned and all descendents.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getCategory

      CategoryData getCategory(int categoryId, boolean onlyAvailableInOpenedCampaign) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets the tree of a category.
      Parameters:
      categoryId - The identifier of the category
      onlyAvailableInOpenedCampaign - Only get the category if it is assigned to an open campaign.
      Returns:
      CategoryData object with all children.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getCategoryAssignedCampaignNames

      String[] getCategoryAssignedCampaignNames(int categoryId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets the names of the campaigns assigned to the category.
      Parameters:
      categoryId - Identifier of the category.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getCategoryInCampaignById

      CategoryData getCategoryInCampaignById(int campaignId, int categoryId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets the tree of a category in a campaign by id.
      Parameters:
      campaignId - Identifier of the campaign.
      categoryId - Identifier of the category.
      Returns:
      CategoryData object with all children.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getCategoryInCampaignByName

      CategoryData getCategoryInCampaignByName(String campaignName, int categoryId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets the tree of a category in a campaign by name.
      Parameters:
      campaignName - Name of the campaign.
      categoryId - Identifier of the category.
      Returns:
      CategoryData object with all children.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getCategoryInfo

      CategoryInfo getCategoryInfo(int categoryId, boolean onlyAvailableInOpenedCampaign) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets information of the specified category.
      Parameters:
      categoryId - The category identifier.
      onlyAvailableInOpenedCampaign - Only get the category if it is assigned to an opened campaign.
      Returns:
      CategoryInfo object with the category information.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getCategoryInfoInCampaignById

      CategoryInfo getCategoryInfoInCampaignById(int campaignId, int categoryId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets information of the specified category.
      Parameters:
      campaignId - Identifier of the campaign.
      categoryId - Identifier of the category.
      Returns:
      CategoryInfo object with the category information.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getCategoryInfoInCampaignByName

      CategoryInfo getCategoryInfoInCampaignByName(String campaignName, int categoryId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets information of the specified category.
      Parameters:
      campaignName - Name of the campaign.
      categoryId - Identifier of the category.
      Returns:
      CategoryInfo object with the category information.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getInstance

      IInstance getInstance() throws Exception, altitude.integrationServer.exceptions.ISException
      The instance.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getKBDocumentCursor

      IKBDocumentCursor getKBDocumentCursor(int cursorId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets a knowledge base document cursor open in the instance.
      Parameters:
      cursorId - Identifier of the cursor.
      Returns:
      The IKBDocumentCursor cursor.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getKBDocumentHistory

      KBDocumentRevisionInfo[] getKBDocumentHistory(int kBDocumentId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets a list with all the revisions of a knowledge base document.
      Parameters:
      kBDocumentId - The identifier of the knowledge base document.
      Returns:
      An array of KBDocumentRevisionInfo objects with all the revisions.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getKBDocumentInfo

      KBDocumentInfo getKBDocumentInfo(int kBDocumentId, boolean onlyAvailableInOpenedCampaign) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets information of a knowledge base document.
      Parameters:
      kBDocumentId - Identifier of the knowledge base document.
      onlyAvailableInOpenedCampaign - Only get the document if it belongs to a category assigned to an opened campaign.
      Returns:
      KBDocumentInfo object with the information of the knowledge base document.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getKBDocumentInfoInCampaignById

      KBDocumentInfo getKBDocumentInfoInCampaignById(int campaignId, int kBDocumentId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets information of a knowledge base document.
      Parameters:
      campaignId - Identifier of the campaign.
      kBDocumentId - Identifier of the knowledge base document.
      Returns:
      KBDocumentInfo object with the information of the knowledge base document.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getKBDocumentInfoInCampaignByName

      KBDocumentInfo getKBDocumentInfoInCampaignByName(String campaignName, int kBDocumentId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets information of a knowledge base document.
      Parameters:
      campaignName - Name of the campaign.
      kBDocumentId - Identifier of the knowledge base document.
      Returns:
      KBDocumentInfo object with the information of the knowledge base document.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getKBDocumentMime

      KBDocumentMime getKBDocumentMime(int kBDocumentId, boolean onlyAvailableInOpenedCampaign) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets the body and properties of a knowledge base document.
      Parameters:
      kBDocumentId - The identifier of the knowledge base document.
      onlyAvailableInOpenedCampaign - Only get the document if it belongs to a category assigned to an opened campaign.
      Returns:
      KBDocumentMime object with the MIME and data of a knowledge base document.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getKBDocumentMimeInCampaignById

      KBDocumentMime getKBDocumentMimeInCampaignById(int campaignId, int kBDocumentId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets the body and properties of a knowledge base document.
      Parameters:
      campaignId - Identifier of the campaign.
      kBDocumentId - Identifier of the knowledge base document.
      Returns:
      KBDocumentMime object with the MIME and data of a knowledge base document.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getKBDocumentMimeInCampaignByName

      KBDocumentMime getKBDocumentMimeInCampaignByName(String campaignName, int kBDocumentId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets the body and properties of a knowledge base document.
      Parameters:
      campaignName - Name of the campaign.
      kBDocumentId - Identifier of the knowledge base document.
      Returns:
      KBDocumentMime object with the MIME and data of a knowledge base document.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getKBDocumentNote

      KBDocumentNote getKBDocumentNote(int kBDocumentId, int noteId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets a note of a knowledge base document.
      Parameters:
      kBDocumentId - The identifier of the knowledge base document.
      noteId - The identifier of the note.
      Returns:
      The KBDocumentNote object with the note of the knowledge base document.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getKBDocumentNotes

      KBDocumentNote[] getKBDocumentNotes(int kBDocumentId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets all notes of the specified knowledge base document.
      Parameters:
      kBDocumentId - Identifier of the knowledge base document.
      Returns:
      An array of KBDocumentNote objects with the notes.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • getKBDocumentTableSchema

      TableSchema getKBDocumentTableSchema() throws Exception, altitude.integrationServer.exceptions.ISException
      Gets the table schema of the knowledge base document.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • newKBDocumentCursor

      IKBDocumentCursor newKBDocumentCursor(String[] columns, String sql, boolean onlyAvailableInOpenCampaigns) throws Exception, altitude.integrationServer.exceptions.ISException, altitude.integrationServer.exceptions.ISSqlException
      Finds knowledge base documents matching the specified criteria.
      Parameters:
      columns - Columns to fetch.
      sql - SQL.
      onlyAvailableInOpenCampaigns - Only consider the documents that belong to a category assigned to an opened campaign.
      Returns:
      The IKBDocumentCursor cursor.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
      altitude.integrationServer.exceptions.ISSqlException
    • newKBDocumentCursorInCampaignById

      IKBDocumentCursor newKBDocumentCursorInCampaignById(int campaignId, String[] columns, String sql) throws Exception, altitude.integrationServer.exceptions.ISException, altitude.integrationServer.exceptions.ISSqlException
      Finds knowledge base documents matching the specified criteria.
      Parameters:
      campaignId - Identifier of the campaign.
      columns - Columns to fetch.
      sql - SQL.
      Returns:
      The IKBDocumentCursor cursor.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
      altitude.integrationServer.exceptions.ISSqlException
    • newKBDocumentCursorInCampaignByName

      IKBDocumentCursor newKBDocumentCursorInCampaignByName(String campaignName, String[] columns, String sql) throws Exception, altitude.integrationServer.exceptions.ISException, altitude.integrationServer.exceptions.ISSqlException
      Finds knowledge base documents matching the specified criteria.
      Parameters:
      campaignName - Name of the campaign.
      columns - Columns to fetch.
      sql - SQL.
      Returns:
      The IKBDocumentCursor cursor.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
      altitude.integrationServer.exceptions.ISSqlException
    • tryGetKBDocumentCursor

      IKBDocumentCursor tryGetKBDocumentCursor(int cursorId) throws Exception, altitude.integrationServer.exceptions.ISException
      Gets a knowledge base document cursor open in the instance or null if it doesn't exist.
      Parameters:
      cursorId - Identifier of the cursor.
      Returns:
      The IKBDocumentCursor cursor.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • updateCategory

      void updateCategory(int categoryId, CategoryUpdateRequest categoryUpdateRequest) throws Exception, altitude.integrationServer.exceptions.ISException
      Updates a category.
      Parameters:
      categoryId - Identifier of the category.
      categoryUpdateRequest - Information about the category.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException
    • updateKBDocument

      void updateKBDocument(int kBDocumentId, String title, String subject, String description, String[] keywords, int categoryId, byte[] mime, String textContent, boolean hasAttachments, String fileName, String comment) throws Exception, altitude.integrationServer.exceptions.ISException
      Updates a knowledge base document
      Parameters:
      kBDocumentId - The identifier of the knowledge base document.
      title - The title of the knowledge base document.
      subject - The subject of the knowledge base document.
      description - The description of the knowledge base document.
      keywords - The list of the keywords of the knowledge base document.
      categoryId - The identifier of the category of the knowledge base document.
      mime - The body of the document in MIME format
      textContent - The text content of the document.
      hasAttachments - If the document has attachments.
      fileName - The file name of the document.
      comment - A comment of this revision of the document.
      Throws:
      Exception
      altitude.integrationServer.exceptions.ISException