Ejemplo n.º 1
0
  /**
   * @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});
  }
Ejemplo n.º 2
0
  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);
  }
Ejemplo n.º 3
0
  /**
   * @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;
  }