Package com.linkedin.restli.server.annotations

Examples of com.linkedin.restli.server.annotations.Optional


  {
      if (!paramType.equals(ResourceContext.class))
      {
        throw new ResourceConfigException("Incorrect data type for param: @" + ResourceContextParam.class.getSimpleName() + " parameter annotation must be of type " +  ResourceContext.class.getName());
      }
      Optional optional = annotations.get(Optional.class);
      return new Parameter("",
                           paramType,
                           null,
                           optional != null,
                           null,
View Full Code Here


          ", @" + Projection.class.getSimpleName() +
          ", @" + MetadataProjectionParam.class.getSimpleName() +
          " or @" + PagingProjectionParam.class.getSimpleName() +
          " parameter annotation must be of type " + MaskTree.class.getName());
    }
    Optional optional = annotations.get(Optional.class);

    @SuppressWarnings({"unchecked", "rawtypes"})
    Parameter<?> param = new Parameter("",
                                       paramType,
                                       null,
View Full Code Here

    {
      throw new ResourceConfigException("Incorrect data type for param: @" + PathKeysParam.class.getSimpleName() + " or @" + Keys.class.getSimpleName() +
              " parameter annotation must be of type " +  PathKeys.class.getName());
    }

    Optional optional = annotations.get(Optional.class);
    Parameter.ParamType parameter = null;
    if(paramAnnotationType.equals(Keys.class))
    {
      parameter = Parameter.ParamType.PATH_KEYS;
    }
View Full Code Here

  {
    if (!paramType.equals(String.class))
    {
      throw new ResourceConfigException("Incorrect data type for param: @" + HeaderParam.class.getSimpleName() + " parameter annotation must be of type String");
    }
    Optional optional = annotations.get(Optional.class);

    @SuppressWarnings({"unchecked", "rawtypes"})
    Parameter<?> param = new Parameter("",
                                       paramType,
                                       null,
View Full Code Here

    }
    else
    {
      throw new ResourceConfigException("Param Annotation type must be 'PagingContextParam' or the deprecated 'Context' for PagingContext");
    }
    Optional optional = annotations.get(Optional.class);
    @SuppressWarnings({"unchecked", "rawtypes"})
    Parameter<?> param =
        new Parameter("",
                      paramType,
                      null,
View Full Code Here

    }
    else
    {
      throw new ResourceConfigException("Param Annotation type must be 'AssocKeysParam' or the deprecated 'AssocKey' for AssocKey");
    }
    Optional optional = annotations.get(Optional.class);

    if (!checkAssocKey(model.getKeys(), assocKeyParamValue))
    {
      throw new ResourceConfigException("Non-existing assocKey '" + assocKeyParamValue + "' on " + buildMethodMessage(method));
    }
View Full Code Here

  private static Parameter buildActionParam(final Method method,
                                            final AnnotationSet annotations,
                                            final Class<?> paramType)
  {
    ActionParam actionParam = annotations.get(ActionParam.class);
    Optional optional = annotations.get(Optional.class);
    String paramName = actionParam.value();
    Class<? extends TyperefInfo> typerefInfoClass = actionParam.typeref();
    try
    {
      Parameter param =
View Full Code Here

  private static Parameter<?> buildQueryParam(final Method method,
                                              final AnnotationSet annotations,
                                              final Class<?> paramType)
  {
    QueryParam queryParam = annotations.get(QueryParam.class);
    Optional optional = annotations.get(Optional.class);
    String paramName = queryParam.value();
    if (INVALID_CHAR_PATTERN.matcher(paramName).find())
    {
      throw new ResourceConfigException("Unsupported character in the parameter name :"
          + paramName);
View Full Code Here

TOP

Related Classes of com.linkedin.restli.server.annotations.Optional

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.