/** * @param id - id of banner you want to remove * @throws XmlRpcException * @throws MalformedURLException */ public boolean deleteBanner(Integer id) throws XmlRpcException, MalformedURLException { // set URL ((XmlRpcClientConfigImpl) client.getClientConfig()) .setServerURL(new URL(GlobalSettings.getBannerServiceUrl())); return (Boolean) client.execute(DELETE_BANNER_METHOD, new Object[] {sessionId, id}); }
public Object execute(String method, Object[] params) throws XmlRpcException, MalformedURLException { // set URL ((XmlRpcClientConfigImpl) client.getClientConfig()) .setServerURL(new URL(GlobalSettings.getBannerServiceUrl())); return client.execute(method, params); }
/** * @return banner id * @throws XmlRpcException * @throws MalformedURLException */ public Integer createBanner(Map<String, Object> params) throws XmlRpcException, MalformedURLException { ((XmlRpcClientConfigImpl) client.getClientConfig()) .setServerURL(new URL(GlobalSettings.getBannerServiceUrl())); Object[] paramsWithId = new Object[] {sessionId, params}; final Integer result = (Integer) client.execute(ADD_BANNER_METHOD, paramsWithId); return result; }