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; } }
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; }
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; }