public static void undeployCommand(final APISession apiSession) throws BonitaException { final CommandAPI commandAPI = TenantAPIAccessor.getCommandAPI(apiSession); commandAPI.unregister("waitServerCommand"); commandAPI.removeDependency("commands"); }
/** * Connects a user, identified by his (her) username and password, in order to use API methods of a tenant. * * @param username * the user name * @param password * the password * @throws LoginException * occurs when an exception is thrown during the login (userName does not exist, or couple (userName, password) is incorrect) * @since 7.2 */ public void login(String username, String password) throws LoginException { session = getLoginAPI(LoginAPI.class).login(username, password); }
/** * protected for testing */ protected CommandAPI getCommandAPI() throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException { return TenantAPIAccessor.getCommandAPI(apiSession); } }
/** * Get API to manage portal user profiles. * * @since 7.2 */ public ProfileAPI getProfileAPI() { return getAPI(ProfileAPI.class); }
/** * Connects the user in order to use API methods of the default tenant. * * @param credentials * the properties to use to login * @return the session to use with other tenant API methods * @throws LoginException * occurs when an exception is thrown during login */ @NoSessionRequired APISession login(Map<String, Serializable> credentials) throws LoginException;
/** * INTERNAL USE ONLY * get client configuration files of the platform * * @return the client platform configuration files as a map containing file name and file content * @since 7.3 */ @Internal Map<String, byte[]> getClientPlatformConfigurations();
/** * @return the {@link PlatformLoginAPI} * @throws BonitaHomeNotSetException * @throws ServerAPIException * @throws UnknownAPITypeException */ public static PlatformLoginAPI getPlatformLoginAPI() throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException { return getAPI(PlatformLoginAPI.class); }
@Override public Document attachNewDocumentVersion(final long processInstanceId, final String documentName, final String contentFileName, final String contentMimeType, final byte[] documentContent) throws DocumentAttachmentException { return documentAPI.attachNewDocumentVersion(processInstanceId, documentName, contentFileName, contentMimeType, documentContent); }
@Override public List<Document> getLastVersionOfDocuments(final long processInstanceId, final int pageIndex, final int numberPerPage, final DocumentCriterion pagingCriterion) throws DocumentException, ProcessInstanceNotFoundException { return documentAPI.getLastVersionOfDocuments(processInstanceId, pageIndex, numberPerPage, pagingCriterion); }
@Override public List<Document> getDocumentList(final long processInstanceId, final String name, final int from, final int numberOfResult) throws DocumentNotFoundException { return documentAPI.getDocumentList(processInstanceId, name, from, numberOfResult); }
@Override public Document addDocument(final long processInstanceId, final String documentName, final String description, final DocumentValue documentValue) throws ProcessInstanceNotFoundException, DocumentAttachmentException, AlreadyExistsException { return documentAPI.addDocument(processInstanceId, documentName, description, documentValue); }
@Override public SearchResult<ArchivedDocument> searchArchivedDocumentsSupervisedBy(final long userId, final SearchOptions searchOptions) throws SearchException, UserNotFoundException { return documentAPI.searchArchivedDocumentsSupervisedBy(userId, searchOptions); }
@Override public Document attachDocument(final long processInstanceId, final String documentName, final String fileName, final String mimeType, final byte[] documentContent) throws DocumentAttachmentException, ProcessInstanceNotFoundException { return documentAPI.attachDocument(processInstanceId, documentName, fileName, mimeType, documentContent); }
@Override public void setDocumentList(final long processInstanceId, final String name, final List<DocumentValue> documentsValues) throws DocumentException, DocumentNotFoundException { documentAPI.setDocumentList(processInstanceId, name, documentsValues); }
/** * Connects a user, identified by his (her) username and password, in order to use API methods of a tenant. * * @param username * the user name * @param password * the password * @throws LoginException * occurs when an exception is thrown during the login (userName does not exist, or couple (userName, password) is incorrect) * @since 7.2 */ public void login(String username, String password) throws LoginException { session = getLoginAPI(LoginAPI.class).login(username, password); }
/** * Get API to manage portal user profiles. * * @since 7.2 */ public ProfileAPI getProfileAPI() { return getAPI(ProfileAPI.class); }
/** * Connects the user in order to use API methods of the default tenant. * * @param credentials * the properties to use to login * @return the session to use with other tenant API methods * @throws LoginException * occurs when an exception is thrown during login */ @NoSessionRequired APISession login(Map<String, Serializable> credentials) throws LoginException;
/** * INTERNAL USE ONLY * get client configuration files of the tenants * * @return the client tenants configuration files as a map containing for each tenant id a map with file name and file content * @since 7.3 */ @Internal Map<Long, Map<String, byte[]>> getClientTenantConfigurations();
/** * Get API to manage portal pages. * * @since 7.2 */ public PageAPI getCustomPageAPI() { return getAPI(PageAPI.class); }
/** * Get API to dynamically check REST API call access right. * * @since 7.2 */ public PermissionAPI getPermissionAPI() { return getAPI(PermissionAPI.class); }