Interface IKnowledgeBaseManager
- All Superinterfaces:
IDisposable, IEntity
Contains methods to access categories, and to manage knowledge base documents and email templates.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcategoryAssignCampaignByName(int categoryId, String campaignName) Assigns a category to a campaign.voidcategoryDeAssignCampaignByName(int categoryId, String campaignName) Deassigns a category to a campaign.intcreateCategory(CategoryCreateRequest categoryCreateRequest) Creates a category.intcreateKBDocument(KBDocumentType type, String title, String subject, String description, String[] keywords, int categoryId, byte[] mime, String textContent, boolean hasAttachments, String fileName, String comment) Creates a knowledge base document.intcreateKBDocumentNote(int kBDocumentId, String content) Creates a note about a knowledge base document.voiddeleteCategory(int categoryId) Deletes a category.voiddeleteKBDocument(int kBDocumentId) Deletes a knowledge base document from the database.getCategories(boolean onlyAvailableInOpenCampaigns) Gets all categories organized hierarchicallygetCategoriesInCampaignById(int campaignId) Gets the categories assigned to the specified campaign.getCategoriesInCampaignByName(String campaignName) Gets the categories assigned to the specified campaign.getCategory(int categoryId, boolean onlyAvailableInOpenedCampaign) Gets the tree of a category.String[]getCategoryAssignedCampaignNames(int categoryId) Gets the names of the campaigns assigned to the category.getCategoryInCampaignById(int campaignId, int categoryId) Gets the tree of a category in a campaign by id.getCategoryInCampaignByName(String campaignName, int categoryId) Gets the tree of a category in a campaign by name.getCategoryInfo(int categoryId, boolean onlyAvailableInOpenedCampaign) Gets information of the specified category.getCategoryInfoInCampaignById(int campaignId, int categoryId) Gets information of the specified category.getCategoryInfoInCampaignByName(String campaignName, int categoryId) Gets information of the specified category.The instance.getKBDocumentCursor(int cursorId) Gets a knowledge base document cursor open in the instance.getKBDocumentHistory(int kBDocumentId) Gets a list with all the revisions of a knowledge base document.getKBDocumentInfo(int kBDocumentId, boolean onlyAvailableInOpenedCampaign) Gets information of a knowledge base document.getKBDocumentInfoInCampaignById(int campaignId, int kBDocumentId) Gets information of a knowledge base document.getKBDocumentInfoInCampaignByName(String campaignName, int kBDocumentId) Gets information of a knowledge base document.getKBDocumentMime(int kBDocumentId, boolean onlyAvailableInOpenedCampaign) Gets the body and properties of a knowledge base document.getKBDocumentMimeInCampaignById(int campaignId, int kBDocumentId) Gets the body and properties of a knowledge base document.getKBDocumentMimeInCampaignByName(String campaignName, int kBDocumentId) Gets the body and properties of a knowledge base document.getKBDocumentNote(int kBDocumentId, int noteId) Gets a note of a knowledge base document.getKBDocumentNotes(int kBDocumentId) Gets all notes of the specified knowledge base document.Gets the table schema of the knowledge base document.newKBDocumentCursor(String[] columns, String sql, boolean onlyAvailableInOpenCampaigns) Finds knowledge base documents matching the specified criteria.newKBDocumentCursorInCampaignById(int campaignId, String[] columns, String sql) Finds knowledge base documents matching the specified criteria.newKBDocumentCursorInCampaignByName(String campaignName, String[] columns, String sql) Finds knowledge base documents matching the specified criteria.tryGetKBDocumentCursor(int cursorId) Gets a knowledge base document cursor open in the instance or null if it doesn't exist.voidupdateCategory(int categoryId, CategoryUpdateRequest categoryUpdateRequest) Updates a category.voidupdateKBDocument(int kBDocumentId, String title, String subject, String description, String[] keywords, int categoryId, byte[] mime, String textContent, boolean hasAttachments, String fileName, String comment) Updates a knowledge base documentMethods inherited from interface IDisposable
addDisposedListener, removeDisposedListenerMethods inherited from interface IEntity
getUserContext, setUserContext
-
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:
Exceptionaltitude.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:
Exceptionaltitude.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:
Exceptionaltitude.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 formattextContent- 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
subjectparameter should only be used in knowledge base documents of typeKBDocumentType.EmailTemplate. - Throws:
Exceptionaltitude.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:
Exceptionaltitude.integrationServer.exceptions.ISException
-
deleteCategory
-
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:
Exceptionaltitude.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
CategoryDatawith the root categories with all children - Throws:
Exceptionaltitude.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
CategoryDatawith the categories assigned and all descendents. - Throws:
Exceptionaltitude.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
CategoryDatawith the categories assigned and all descendents. - Throws:
Exceptionaltitude.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 categoryonlyAvailableInOpenedCampaign- Only get the category if it is assigned to an open campaign.- Returns:
CategoryDataobject with all children.- Throws:
Exceptionaltitude.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:
Exceptionaltitude.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:
CategoryDataobject with all children.- Throws:
Exceptionaltitude.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:
CategoryDataobject with all children.- Throws:
Exceptionaltitude.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:
CategoryInfoobject with the category information.- Throws:
Exceptionaltitude.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:
CategoryInfoobject with the category information.- Throws:
Exceptionaltitude.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:
CategoryInfoobject with the category information.- Throws:
Exceptionaltitude.integrationServer.exceptions.ISException
-
getInstance
-
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
IKBDocumentCursorcursor. - Throws:
Exceptionaltitude.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
KBDocumentRevisionInfoobjects with all the revisions. - Throws:
Exceptionaltitude.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:
KBDocumentInfoobject with the information of the knowledge base document.- Throws:
Exceptionaltitude.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:
KBDocumentInfoobject with the information of the knowledge base document.- Throws:
Exceptionaltitude.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:
KBDocumentInfoobject with the information of the knowledge base document.- Throws:
Exceptionaltitude.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:
KBDocumentMimeobject with the MIME and data of a knowledge base document.- Throws:
Exceptionaltitude.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:
KBDocumentMimeobject with the MIME and data of a knowledge base document.- Throws:
Exceptionaltitude.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:
KBDocumentMimeobject with the MIME and data of a knowledge base document.- Throws:
Exceptionaltitude.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
KBDocumentNoteobject with the note of the knowledge base document. - Throws:
Exceptionaltitude.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
KBDocumentNoteobjects with the notes. - Throws:
Exceptionaltitude.integrationServer.exceptions.ISException
-
getKBDocumentTableSchema
TableSchema getKBDocumentTableSchema() throws Exception, altitude.integrationServer.exceptions.ISExceptionGets the table schema of the knowledge base document.- Throws:
Exceptionaltitude.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
IKBDocumentCursorcursor. - Throws:
Exceptionaltitude.integrationServer.exceptions.ISExceptionaltitude.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
IKBDocumentCursorcursor. - Throws:
Exceptionaltitude.integrationServer.exceptions.ISExceptionaltitude.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
IKBDocumentCursorcursor. - Throws:
Exceptionaltitude.integrationServer.exceptions.ISExceptionaltitude.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
IKBDocumentCursorcursor. - Throws:
Exceptionaltitude.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:
Exceptionaltitude.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 formattextContent- 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:
Exceptionaltitude.integrationServer.exceptions.ISException
-