com.vinculumtech.carrierwave.image
Class ImageGraphHelper

java.lang.Object
  extended bycom.vinculumtech.carrierwave.image.ImageGraphHelper

public final class ImageGraphHelper
extends java.lang.Object

The ImageGraphHelper class provides a set of utilities to manipulate instances of the ImageGraph instances.

Version:
$Id: //depot/carrierwave/src/shared/com/vinculumtech/carrierwave/image/ImageGraphHelper.java#18 $

Method Summary
static void addOriginImageOn(ImageGraph imageGraph, Image originImage)
          A convenience accessor for the ImageGraph.addOriginImage() method.
static Icon findIconByObjectId(ImageGraph imageGraph, java.lang.Object objectId)
          Searches the given ImageGraph instance for an Icon instance with the given objectId.
static Icon findIconByReferenceableName(ImageGraph imageGraph, java.lang.String referenceableName)
          Searches the given ImageGraph instance for an Icon instance with the given referenceableName.
static Image findImageByObjectId(ImageGraph imageGraph, java.lang.Object objectId)
          Searches the given ImageGraph instance for an Image instance with the given objectId.
static Image findImageByReferenceableName(ImageGraph imageGraph, java.lang.String referenceableName)
          Searches the given ImageGraph instance for an Image instance with the given referenceableName.
static void forceAllImagesOrigin(ImageGraph imageGraph)
          Force all images to be origin images.
static void forceAllIndependentImagesOrigin(ImageGraph imageGraph)
          Force all independant images to be origin images.
static ImageGraph merge(Image[] originImages)
          Forces the given set of distinct graphs, identified by the array of originImages, into a single ImageGraph instance.
static ImageGraph merge(ImageGraph lhs, ImageGraph rhs)
          Moves all images from both the given ImageGraph instances to the same ImageGraph instance.
Either value may be null.
static ImageGraph merge(ImageGraph imageGraph, java.util.List originImages)
          Forces the given set of distinct graphs, identified by the List of originImages, into the given ImageGraph instance.
static ImageGraph merge(java.util.List originImages)
          Forces the given set of distinct graphs, identified by the List of originImages, into a single ImageGraph instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

merge

public static final ImageGraph merge(java.util.List originImages)
Forces the given set of distinct graphs, identified by the List of originImages, into a single ImageGraph instance. The origins will be preserved.

Parameters:
originImages -
Returns:
the shared ImageGraph instance

merge

public static final ImageGraph merge(Image[] originImages)
Forces the given set of distinct graphs, identified by the array of originImages, into a single ImageGraph instance. The origins will be preserved.

Parameters:
originImages -
Returns:
the shared ImageGraph instance

merge

public static final ImageGraph merge(ImageGraph imageGraph,
                                     java.util.List originImages)
Forces the given set of distinct graphs, identified by the List of originImages, into the given ImageGraph instance. The origins in the given ImageGraph instance will be lost and replaced with the given originImages.

Parameters:
imageGraph -
originImages -
Returns:
the shared ImageGraph instance

merge

public static final ImageGraph merge(ImageGraph lhs,
                                     ImageGraph rhs)
Moves all images from both the given ImageGraph instances to the same ImageGraph instance.
Either value may be null. Both lhs and rhs are in an undefined state after the call only the returned ImageGraph instance should be used.

Parameters:
lhs -
rhs -
Returns:
the shared ImageGraph instance

forceAllImagesOrigin

public static final void forceAllImagesOrigin(ImageGraph imageGraph)
Force all images to be origin images.

Parameters:
imageGraph -

addOriginImageOn

public static final void addOriginImageOn(ImageGraph imageGraph,
                                          Image originImage)
A convenience accessor for the ImageGraph.addOriginImage() method.

Parameters:
imageGraph -
originImage -

forceAllIndependentImagesOrigin

public static void forceAllIndependentImagesOrigin(ImageGraph imageGraph)
Force all independant images to be origin images.

Parameters:
imageGraph -

findIconByReferenceableName

public static final Icon findIconByReferenceableName(ImageGraph imageGraph,
                                                     java.lang.String referenceableName)
Searches the given ImageGraph instance for an Icon instance with the given referenceableName.

Parameters:
imageGraph -
referenceableName -
Returns:
the found Icon instance or null

findImageByReferenceableName

public static final Image findImageByReferenceableName(ImageGraph imageGraph,
                                                       java.lang.String referenceableName)
Searches the given ImageGraph instance for an Image instance with the given referenceableName.

Parameters:
imageGraph -
referenceableName -
Returns:
the found Image instance or null

findIconByObjectId

public static final Icon findIconByObjectId(ImageGraph imageGraph,
                                            java.lang.Object objectId)
Searches the given ImageGraph instance for an Icon instance with the given objectId.

Parameters:
imageGraph -
objectId -
Returns:
the found Icon instance or null

findImageByObjectId

public static final Image findImageByObjectId(ImageGraph imageGraph,
                                              java.lang.Object objectId)
Searches the given ImageGraph instance for an Image instance with the given objectId.

Parameters:
imageGraph -
objectId -
Returns:
the found Image instance or null


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.