/** * */ package com.fitbank.bpm.client; import java.io.InputStream; import java.text.MessageFormat; /** * @BANTEC inc. */ public class BPMConsoleClient extends AbstractHTTPClient { private static final String IMAGE_QUERY = "/rs/process/definition/{0}/image"; private static final String IMAGE_RESOURCE = "/rs/process/definition/{0}"; public BPMConsoleClient(String pURL, String pUser, String pPassword) throws Exception { this.password = pPassword; this.user = pUser; this.setBaseData(pURL); this.sendCredecials(); } public InputStream getImage(String pInstance) throws Exception { String resource = MessageFormat.format(IMAGE_QUERY, pInstance); String resourceImage = MessageFormat.format(IMAGE_RESOURCE, pInstance); this.imageLogin(resourceImage); return this.getData(resource); } }