Package com.google.feedserver.adapters

Examples of com.google.feedserver.adapters.FeedServerAdapterException


    SqlMapClient client = getSqlMapClient();
    try {
      Map<String, Object> params = getRequestParams(request);
      params.put("id", entryId);
      if (!(client.delete(queryId, params) > 0)) {
        throw new FeedServerAdapterException(
            FeedServerAdapterException.Reason.ERROR_EXECUTING_ADAPTER_REQUEST, "could not delete");
      }
    } catch (SQLException e) {
      throw new FeedServerAdapterException(
          FeedServerAdapterException.Reason.ERROR_EXECUTING_ADAPTER_REQUEST, e.getMessage());
    }
  }
View Full Code Here


      return super.retrieveFeed(request);
    }
   
    FeedInfo feedInfo = getFeedInfo(request);
    if (feedInfo == null) {
      throw new FeedServerAdapterException(Reason.ADAPTER_CONFIGURATION_NOT_CORRECT,
      "Missing feed info in configuration");
    }
    Feed dataFeed = super.retrieveFeed(request);

    DataTable dataTable = null;
View Full Code Here

            row.addCell(Value.getNullValueFromValueType(valueType));
          }       
        }
        result.addRow(row);
      } catch (TypeMismatchException e) {
        throw new FeedServerAdapterException(
            FeedServerAdapterException.Reason.INVALID_INPUT, e.getMessageToUser());
      } catch (ParseException e) {
        throw new FeedServerAdapterException(
            FeedServerAdapterException.Reason.INVALID_INPUT, e.getLocalizedMessage());
      }
    }
    return result;
  }
View Full Code Here

      Set<String> set = new HashSet<String>();
      if (GVizTypeConverter.isRecursiveType(
          entityInfo,
          entityInfo.getType(property.getTypeName()),
          set)) {
        throw new FeedServerAdapterException(
            FeedServerAdapterException.Reason.INVALID_INPUT,
            "recursive type " + property.getTypeName());
      }
      columnDescriptions.addAll(getColumnDescriptionsForProperty(entityInfo, property, ""));     
    }
View Full Code Here

    String id = prefix + property.getName();
    String label = property.getLabel();
    String typeName = property.getTypeName();
    if ((id == null) || (label == null) || (typeName == null)) {
      //logger.log(Level.SEVERE, "unknown or missing property - " + id);
      throw new FeedServerAdapterException
      (FeedServerAdapterException.Reason.BAD_FEED_TYPE_CONFIG,
          "unknown or missing property - " + id);
    }
    ValueType valueType = GVizTypeConverter.getValueType(typeName);
    return new ColumnDescription(id, valueType, label);   
View Full Code Here

    return (AbstractManagedCollectionAdapter) adapter;
  }

  private void throwApplyingWrapperError(MixinConfiguration config)
      throws FeedServerAdapterException {
    throw new FeedServerAdapterException(
        FeedServerAdapterException.Reason.MIXIN_ERROR_APPLYING_WRAPPER,
        "Coud not apply wrapper over adapter " + config.getTargetAdapterName());
  }
View Full Code Here

  @Override
  public Entry retrieveEntry(RequestContext request, Object entryId)
      throws FeedServerAdapterException {
    if (AclResult.ACCESS_GRANTED != getAclValidator().canRetrieveEntry(request, entryId)) {
      throw new FeedServerAdapterException(FeedServerAdapterException.Reason.NOT_AUTHORIZED,
          "Access Denied");
    }
    return super.retrieveEntry(request, entryId);
  }
View Full Code Here

  }

  @Override
  public Feed retrieveFeed(RequestContext request) throws FeedServerAdapterException {
    if (AclResult.ACCESS_GRANTED != getAclValidator().canRetrieveFeed(request)) {
      throw new FeedServerAdapterException(FeedServerAdapterException.Reason.NOT_AUTHORIZED,
          "Access Denied");
    }
    return super.retrieveFeed(request);
  }
View Full Code Here

  @Override
  public Entry updateEntry(RequestContext request, Object entryId, Entry entry)
      throws FeedServerAdapterException {
    if (AclResult.ACCESS_GRANTED != getAclValidator().canUpdateEntry(request, entryId)) {
      throw new FeedServerAdapterException(FeedServerAdapterException.Reason.NOT_AUTHORIZED,
          "Access Denied");
    }
    return super.updateEntry(request, entryId, entry);
  }
View Full Code Here

  }

  @Override
  public Entry createEntry(RequestContext request, Entry entry) throws FeedServerAdapterException {
    if (AclResult.ACCESS_GRANTED != getAclValidator().canCreateEntry(request)) {
      throw new FeedServerAdapterException(FeedServerAdapterException.Reason.NOT_AUTHORIZED,
          "Access Denied");
    }
    return super.createEntry(request, entry);
  }
View Full Code Here

TOP

Related Classes of com.google.feedserver.adapters.FeedServerAdapterException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.