|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vinculumtech.carrierwave.image.Image
Image is the base abstract class for all client side Imageable
representations. That is,
all server side classes that implement the Imageable interface have a semantically
equivalent client side type that subclasses the Image class.
During runtime, if an Image subclass is instantiated on the client, it can be sent to the
server so that an Imageable equivalent can be created, sourced by the values the Image instance
was given on the client.
Nested Class Summary | |
static class |
Image.Identity
This class represents the identity of a non-reflected Image instance. |
Constructor Summary | |
|
Image()
|
protected |
Image(Icon icon)
|
Method Summary | |
Icon |
associateIcon(int index,
Icon icon)
Used by the ImageArray class to add Icon only referenced elements. |
Icon |
associateIcon(java.lang.Object key,
Icon icon)
Used by the ImageMap class to add Icon only referenced elements. |
protected Icon |
associateImage(Icon icon,
java.lang.String edge)
|
protected Icon |
associateImage(Image image,
java.lang.String edge)
|
Icon |
associateImage(int index,
Image image,
java.lang.String edge)
Used by the ImageArray class to add elements. |
Icon |
associateImage(java.lang.Object key,
Image image,
java.lang.String edge)
Used by the ImageMap class to add elements. |
void |
clearEdges()
Sets all edge fields to null. |
abstract java.lang.Object |
clone()
Returns a clone of this Image instance. |
protected java.lang.Object |
clone(Image image)
|
protected int |
decrementReferenceCount()
|
void |
disassociateImage(Icon icon)
Disassociates the an Image instance associated with the given Icon instance from the ImageGraph this instance belongs, if applicable. |
void |
disassociateImage(Image image)
Disassociates the given Image instance from the ImageGraph this instance belongs, if applicable. |
protected void |
disassociateImage(java.util.Map images)
|
boolean |
equals(java.lang.Object object)
Returns true if the object is a subclass of Image and the Icon instance equals this Image instances Icon. |
Icon |
getIcon()
|
Image |
getImage(Icon icon)
|
abstract java.lang.String |
getImageableType()
The Imageable type this Image instance represents. |
ImageGraph |
getImageGraph()
Returns the ImageGraph instance this Image instance is associated with, if none exists, an ImageGraph instance is created on demand (lazy init). |
abstract java.lang.String |
getImageInterfaceType()
The image interface type this Image instance implements. |
Image |
getImageStrict(Icon icon)
|
Image |
getParentImage()
If this Image instance is dependent, returns the parent Imgae instance of this Image instance, otherwise null. |
int |
getReferenceCount()
Returns the number of Image instances that reference this Image instance. |
int |
hashCode()
Simply uses the hashcode of the Icon held by this Image instance. |
boolean |
hasImageGraph()
|
static Icon |
iconOf(java.lang.Object object)
A simple convenience method that returns the Icon for the given object. |
static Image |
imageOf(java.lang.Object object)
A simple convenience method that returns the given object cast as an Image. |
protected int |
incrementReferenceCount()
|
protected int |
incrementReferenceCount(int advance)
|
boolean |
isDependent()
Dependent Images are those who represent Imageable, but not ImageableIdentifiable, server side types. That is, they do not have a persistent identity that is not relative to another object. |
boolean |
isDirty()
Returns true if this image has been changed since it was marked clean. Images returned from the server are clean by default. |
boolean |
isIgnoreChange()
|
boolean |
isOrigin()
|
boolean |
isReflection()
|
boolean |
isTransient()
Transient Images are those who are Imageable but are never persisted via PersistenceRoot. Typically ImageableFinder or ImageableAction concrete types should also be ImageableTransient. |
protected void |
localProjectInto(java.lang.Object imageable)
Overriden by Image subclasses. |
protected void |
localReflectFrom(java.lang.Object imageable)
Overriden by Image subclasses. |
protected Icon |
makeDependentIcon(Icon icon,
java.lang.String imageType,
java.lang.String edge)
|
void |
markClean()
Marks this instance as clean. |
void |
markDirty()
Marks this Image instance as dirty. |
void |
projectInto(java.lang.Object imageable)
Projection only stores literal values into the given source, not into related Imageable objects. |
void |
reflectFrom(java.lang.Object imageable)
Reflection only retrieves literal values from the given source, not related Imageable objects. |
void |
resetReferenceCount()
Sets the referenceCount to zero. |
abstract boolean[] |
retrieveDependentEdges()
Returns an array specifying which edge fields on this Image instance are 'dependent'. The values are ordered relative to the fields in the method retrieveEdges . |
abstract java.lang.String[] |
retrieveEdgeImageTypes()
Returns an array specifying the image types of the edge fields. The values are ordered relative to the fields in the method retrieveEdges . |
abstract java.lang.String[] |
retrieveEdges()
Returns an array of all the fields on this Image instance that represent non literal values. |
abstract java.lang.String[] |
retrieveEdgeTypes()
Returns an array specifying the private types of the edge fields. The values are ordered relative to the fields in the method retrieveEdges . |
abstract java.lang.String[] |
retrieveLiterals()
Returns an array of all the field names on this Image instance that represent literal values. |
abstract java.lang.String[] |
retrieveLiteralTypes()
Returns an array of all the field types on this Image instance that represent literal values. |
abstract boolean[] |
retrieveReadOnlyEdges()
Returns an array specifying which edge fields on this Image instance are 'read-only'. The values are ordered relative to the fields in the method retrieveEdges . |
abstract boolean[] |
retrieveReadOnlyLiterals()
Returns an array specifying which literal fields on this Image instance are 'read-only'. The values are ordered relative to the fields in the method retrieveLiterals . |
abstract boolean[] |
retrieveReferenceOnlyEdges()
Returns an array specifying which edge fields on this Image instance are 'reference only'. The values are ordered relative to the fields in the method retrieveEdges . |
protected void |
setIcon(Icon icon)
|
void |
setIgnoreChange(boolean ignoreChange)
Set to true if this image should not be marked dirty during any setter or adder. |
protected void |
setImageGraph(ImageGraph imageGraph)
|
protected void |
setIsDirty(boolean isDirty)
|
protected void |
setIsOrigin(boolean isOrigin)
|
protected void |
setIsReflection(boolean isReflection)
|
void |
setReferenceCount(int referenceCount)
Sets the referenceCount of this Image instance. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Image()
protected Image(Icon icon)
Method Detail |
public static final Icon iconOf(java.lang.Object object)
Icon
for the given object.
object
-
public static final Image imageOf(java.lang.Object object)
object
-
public boolean isIgnoreChange()
public void setIgnoreChange(boolean ignoreChange)
ignoreChange
- protected void setIsOrigin(boolean isOrigin)
public boolean isOrigin()
public Icon associateImage(int index, Image image, java.lang.String edge)
index
- image
- edge
-
public Icon associateImage(java.lang.Object key, Image image, java.lang.String edge)
key
- image
- edge
-
public Icon associateIcon(int index, Icon icon)
index
- icon
-
public Icon associateIcon(java.lang.Object key, Icon icon)
key
- icon
-
protected Icon associateImage(Icon icon, java.lang.String edge)
protected Icon associateImage(Image image, java.lang.String edge)
protected void disassociateImage(java.util.Map images)
public void disassociateImage(Image image)
image
- public void disassociateImage(Icon icon)
icon
- public Image getImage(Icon icon)
icon
-
public Image getImageStrict(Icon icon)
icon
-
IconOnlyFoundException
- if no Image instance can be found for the given Icon instanceprotected void setImageGraph(ImageGraph imageGraph)
public boolean hasImageGraph()
public ImageGraph getImageGraph()
protected void setIsDirty(boolean isDirty)
public void markDirty()
public boolean isDirty()
public void markClean()
public boolean isDependent()
public boolean isTransient()
public boolean isReflection()
protected void setIsReflection(boolean isReflection)
protected int incrementReferenceCount(int advance)
protected int incrementReferenceCount()
protected int decrementReferenceCount()
public int getReferenceCount()
ImageGraphHelper
public void setReferenceCount(int referenceCount)
referenceCount
- public void resetReferenceCount()
protected void setIcon(Icon icon)
protected Icon makeDependentIcon(Icon icon, java.lang.String imageType, java.lang.String edge)
public final Icon getIcon()
public Image getParentImage()
public void clearEdges()
public java.lang.String toString()
public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
protected java.lang.Object clone(Image image)
public int hashCode()
public boolean equals(java.lang.Object object)
object
-
public abstract java.lang.String[] retrieveLiterals()
public abstract java.lang.String[] retrieveLiteralTypes()
public abstract boolean[] retrieveReadOnlyLiterals()
retrieveLiterals
.
public abstract java.lang.String[] retrieveEdges()
public abstract java.lang.String[] retrieveEdgeTypes()
retrieveEdges
.
public abstract java.lang.String[] retrieveEdgeImageTypes()
retrieveEdges
.
public abstract boolean[] retrieveDependentEdges()
retrieveEdges
.
public abstract boolean[] retrieveReferenceOnlyEdges()
retrieveEdges
.
public abstract boolean[] retrieveReadOnlyEdges()
retrieveEdges
.
public abstract java.lang.String getImageableType()
public abstract java.lang.String getImageInterfaceType()
public final void reflectFrom(java.lang.Object imageable) throws ReflectionException
imageable
-
ReflectionException
protected void localReflectFrom(java.lang.Object imageable) throws java.lang.Exception
imageable
-
java.lang.Exception
public final void projectInto(java.lang.Object imageable) throws ProjectionException
imageable
-
ProjectionException
protected void localProjectInto(java.lang.Object imageable) throws java.lang.Exception
imageable
-
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |