Overloaded method which sets an embedded image on account of name and {@link DataSource}.

@param name The name of the image as being referred to from the message content body (eg.
'&lt;cid:embeddedimage&gt;').
@param imagedata The image data.
9767
public void addEmbeddedImage(final String name, final DataSource imagedata) {
		embeddedImages.add(new AttachmentResource(name, imagedata));
	}
1264235
public DataSource createDataSourceProxy(String name, final DataSource dataSource) {
		assert dataSource != null;
		JdbcWrapperHelper.pullDataSourceProperties(name, dataSource);
		final InvocationHandler invocationHandler = new AbstractInvocationHandler<DataSource>(
				dataSource) {
			private static final long serialVersionUID = 1L;

			/** {@inheritDoc} */
			@Override
			public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
				Object result = method.invoke(dataSource, args);
				if (result instanceof Connection) {
					result = createConnectionProxy((Connection) result);
				}
				return result;
			}
		};
		return createProxy(dataSource, invocationHandler);
	}
330882
public void setImage(BufferedImage img) {
        this.img = img;
        Dimension dim;
        if (img != null) {
            dim = new Dimension(img.getWidth(), img.getHeight());
        } else {
            dim = new Dimension(DEFAULT_WIDTH, DEFAULT_HEIGHT);
        }

        setSize(dim);
        setPreferredSize(dim);
        repaint();
    }
1100933
public static ResourceRecordSet<TXTData> txt(String name, String txtdata) {
    return new TXTBuilder().name(name).add(txtdata).build();
  }
1316371
@Override
    public IIOMetadata getImageMetadata(final int imageIndex) throws IOException {
        checkBounds(imageIndex);
        readHeader();

        return new TGAMetadata(header, extensions);
    }
148790
public void setImage(final Image image) {
		ImageModel model = getOrCreateComponentModel();
		model.image = image;
		model.imageUrl = null;
	}
198853
public void setImageName(String imageName) {
		if ((imageName != null) && !imageName.endsWith(".jpg")) {
			throw new IllegalArgumentException("Image must be a jpeg file.");
		}
		this.imageName = imageName;
	}
1076296
@Override
    public void setContent(InputStream data) throws IOException {
        try {
            ImageIcon image =
                    new ImageIcon(JAI
                            .create("stream",
                                    new MemoryCacheSeekableStream(data))
                            .getAsBufferedImage());
            if (m_pane == null) {
                m_label = new JLabel(image);
                m_pane = new JScrollPane(m_label);
            } else {
                m_label.setIcon(image);
            }
        } catch (Exception e) {
            throw new IOException(e.getMessage());
        }
    }
123838
@Override
	public Response setImage(
			final String name,
			final String qualifier,
			final InputStream image,
			final FormDataContentDisposition fileDetail) {

		// Do set the image, and wrap exceptions in a HTTP response.
		Response response;
		String id = name + " (qualifier = " + qualifier + ")";
		try {
			doSetImage(name, qualifier, image, fileDetail);
			response = Response.noContent().build();

		} catch( IllegalArgumentException e ) {
			response = handleError(
					Status.BAD_REQUEST,
					new RestError( REST_MNGMT_INVALID_IMAGE, e ),
					lang( this.manager )).build();

		} catch( NoSuchElementException e ) {
			response = handleError(
					Status.BAD_REQUEST,
					new RestError( REST_INEXISTING, e, name( id )),
					lang( this.manager )).build();

		} catch( IOException e ) {
			response = handleError(
					Status.INTERNAL_SERVER_ERROR,
					new RestError( REST_IO_ERROR, e ),
					lang( this.manager )).build();
		}

		return response;
	}
797388
public static ResourceRecordSet<MXData> mx(String name, Collection<String> mxdata) {
    return new MXBuilder().name(name).addAll(mxdata).build();
  }
2162
public function setImagePrettyName($name)
    {
        $this->set('prettyname', $name);
        if ($this->image) {
            $this->image->setPrettyName($name);
        }
    }
1136591
public void setResourceContainerImageName(java.util.Collection<StringFilter> resourceContainerImageName) {
        if (resourceContainerImageName == null) {
            this.resourceContainerImageName = null;
            return;
        }

        this.resourceContainerImageName = new java.util.ArrayList<StringFilter>(resourceContainerImageName);
    }
754818
public void setImageUrlAttribute(String name, String value) {
		ensureAttributes();
		Attribute attribute = new ImageUrlAttribute(value);
		attribute.setEditable(isEditable(name));
		getAllAttributes().put(name, attribute);

	}
272738
public void setBufferedImage(BufferedImage img) {
        image = img;
        width = img.getWidth();
        height = img.getHeight();
        updateColorArray();
    }
949351
public static ResourceRecordSet<NSData> ns(String name, String nsdname) {
    return new NSBuilder().name(name).add(nsdname).build();
  }
867729
public static boolean registerJdbcDataSource(String name, DataSource dataSource) {
        return jdbcDataSources.putIfAbsent(name, dataSource) == null;
    }
877195
public static Resource create(String name, String imageName, String imageTag) {
    Map<String, String> labels = new LinkedHashMap<String, String>();
    labels.put(NAME_KEY, checkNotNull(name, "name"));
    labels.put(IMAGE_NAME_KEY, checkNotNull(imageName, "imageName"));
    labels.put(IMAGE_TAG_KEY, checkNotNull(imageTag, "imageTag"));
    return Resource.create(TYPE, labels);
  }