コード例 #1
0
 protected static String checkMetaData(
     final FormItemList formItemList, final CreateResponse response) {
   try {
     return formItemList.getField(ProtocolConstants.Parameters.Create.META_DATA);
   } catch (final IllegalArgumentException e) {
     return null;
   }
 }
コード例 #2
0
  protected static String checkIdentifier(
      final FormItemList formItemList, final CreateResponse response) {
    try {
      return formItemList.getField(ProtocolConstants.Parameters.Create.IMAGE_IDENTIFIER);
    } catch (final IllegalArgumentException e) {
      response.imageIdentifierMissing();
    }

    return null;
  }
コード例 #3
0
  protected static URL checkUrl(final FormItemList formItemList, final CreateResponse response) {
    try {
      final String imageUrlString = formItemList.getField(ProtocolConstants.Parameters.Create.URL);

      try {
        URL imageUrl = new URL(imageUrlString);
        return imageUrl;
      } catch (final MalformedURLException e) {
        response.imageUrlMalformed(imageUrlString);
      }
    } catch (final IllegalArgumentException e) {
      response.imageUrlMissing();
    }

    return null;
  }