Ignore:
Timestamp:
Feb 28, 2011, 7:40:53 PM (13 years ago)
Author:
mlg
Message:

Modifications to handle proxy error.
Two types of error are handled : proxy address error and proxy authentication error.
Connecting to jiwigo via a proxy seems to work (tried with my own server... gonna have to try with an external server).
version is 0.13.1.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/dao/ImageDao.java

    r9394 r9430  
    1313import fr.mael.jiwigo.om.Image;
    1414import fr.mael.jiwigo.transverse.enumeration.MethodsEnum;
     15import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException;
    1516import fr.mael.jiwigo.transverse.exception.WrongChunkSizeException;
    1617import fr.mael.jiwigo.transverse.session.SessionManager;
     
    9899     * @return the list of images
    99100     * @throws IOException
    100      */
    101     public List<Image> list(boolean refresh) throws IOException {
     101     * @throws ProxyAuthenticationException
     102     */
     103    public List<Image> list(boolean refresh) throws IOException, ProxyAuthenticationException {
    102104        return listByCategory(null, refresh);
    103105    }
     
    108110     * @return the list of images
    109111     * @throws IOException
    110      */
    111     public List<Image> listByCategory(Integer categoryId, boolean refresh) throws IOException {
     112     * @throws ProxyAuthenticationException
     113     */
     114    public List<Image> listByCategory(Integer categoryId, boolean refresh) throws IOException,
     115            ProxyAuthenticationException {
    112116        if (refresh || cache.get(categoryId) == null) {
    113117            Document doc = null;
     
    207211     * @param tagId ids of the tags
    208212     * @throws IOException
    209      */
    210     public boolean addTags(Integer imageId, String tagId) throws IOException {
     213     * @throws ProxyAuthenticationException
     214     */
     215    public boolean addTags(Integer imageId, String tagId) throws IOException, ProxyAuthenticationException {
    211216        Document doc = sessionManager.executeReturnDocument(MethodsEnum.SET_INFO.getLabel(), "image_id", String
    212217                .valueOf(imageId), "tag_ids", tagId);
     
    248253     * @return the list of images matching the string
    249254     * @throws IOException
    250      */
    251     public List<Image> search(String searchString) throws IOException {
     255     * @throws ProxyAuthenticationException
     256     */
     257    public List<Image> search(String searchString) throws IOException, ProxyAuthenticationException {
    252258        Document doc = sessionManager.executeReturnDocument(MethodsEnum.SEARCH.getLabel(), "query", searchString);
    253259        LOG.debug(doc);
Note: See TracChangeset for help on using the changeset viewer.