pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.util.entity
Class AbstractImageGroup

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.util.entity.AbstractNamedEntity
          extended by org.torweg.pulse.util.entity.AbstractNamableEntity
              extended by org.torweg.pulse.util.entity.AbstractImageGroup
All Implemented Interfaces:
java.io.Serializable, INameable, INamed
Direct Known Subclasses:
StoreContentImageGroup

@MappedSuperclass
public abstract class AbstractImageGroup
extends AbstractNamableEntity
implements INameable

Holds different versions of an image (e.g. the differently sized versions of an image assigned to a Content).

Version:
$Revision: 2014 $
Author:
Christian Schatt, Daniel Dietz
See Also:
AbstractImageGroupConfiguration, Serialized Form

Constructor Summary
protected AbstractImageGroup()
          used for HibernateTM.
  AbstractImageGroup(java.lang.String nam, Bundle b)
          The Constructor that sets the name of the AbstractImageGroup.
 
Method Summary
 org.jdom.Element deserializeToJDOM()
          Deserializes the state of the AbstractImageGroup as a JDOM Element.
abstract  java.util.List<AbstractImageGroupConfiguration.Version> getAllAssignableVersions()
          Returns a List containing the version names of all image versions assignable to the AbstractImageGroup.
 java.util.List<java.lang.String> getAssignedVersionNames()
          Returns a List containing the version names of the image versions assigned to the AbstractImageGroup.
 Bundle getBundle()
          returns the bundle of the AbstractImageGroup.
 java.util.List<VirtualFile> getImages()
          returns a flat set of all assigned images.
 VirtualFile getImageVersion(java.lang.String versionName)
          Returns the image version with the given version name.
 AbstractImageGroupConfiguration getImageVersionConfiguration()
          Returns the underlying AbstractImageGroupConfiguration.
 void init()
          initialises the lazy fields of the AbstractImageGroup.
 boolean isAvailableVersionName(java.lang.String versionName)
          checks whether the given name is assignable for the AbstractImageGroup.
 void setBundle(Bundle b)
          sets the bundle of the AbstractImageGroup.
 void setImageVersion(java.lang.String versionName, VirtualFile image)
          Sets the image version with the given version name.
protected  void setImageVersionConfiguration(AbstractImageGroupConfiguration conf)
          Sets the AbstractImageGroupConfiguration.
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractNamableEntity
setName
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractNamedEntity
getName
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.torweg.pulse.util.INameable
setName
 
Methods inherited from interface org.torweg.pulse.util.INamed
getName
 

Constructor Detail

AbstractImageGroup

protected AbstractImageGroup()
used for HibernateTM.


AbstractImageGroup

public AbstractImageGroup(java.lang.String nam, Bundle b)
The Constructor that sets the name of the AbstractImageGroup.

Parameters:
nam - the name to be set.
b - the bundle
Method Detail

getBundle

public final Bundle getBundle()
returns the bundle of the AbstractImageGroup.

Returns:
the bundle

setBundle

public final void setBundle(Bundle b)
sets the bundle of the AbstractImageGroup.

Parameters:
b - the bundle

getAllAssignableVersions

public abstract java.util.List<AbstractImageGroupConfiguration.Version> getAllAssignableVersions()
Returns a List containing the version names of all image versions assignable to the AbstractImageGroup.

Returns:
the version names of all image versions assignable to the AbstractImageGroup

getAssignedVersionNames

public final java.util.List<java.lang.String> getAssignedVersionNames()
Returns a List containing the version names of the image versions assigned to the AbstractImageGroup.

Returns:
the version names of the image versions assigned to the AbstractImageGroup

getImageVersion

public final VirtualFile getImageVersion(java.lang.String versionName)
Returns the image version with the given version name.

Parameters:
versionName - the version name of the image version to be returned
Returns:
the image version with the given version name or null

getImages

public final java.util.List<VirtualFile> getImages()
returns a flat set of all assigned images.

Returns:
a flat set of all assigned images

setImageVersion

public final void setImageVersion(java.lang.String versionName, VirtualFile image)
Sets the image version with the given version name.

Parameters:
versionName - the version name of the image version to be set
image - the image version to be set

isAvailableVersionName

public final boolean isAvailableVersionName(java.lang.String versionName)
checks whether the given name is assignable for the AbstractImageGroup.

Parameters:
versionName - the version name to check
Returns:
true, if and only if setImageVersion(String, VirtualFile) can be safely called for the given name. Otherwise false.

init

public final void init()
initialises the lazy fields of the AbstractImageGroup.


setImageVersionConfiguration

protected final void setImageVersionConfiguration(AbstractImageGroupConfiguration conf)
Sets the AbstractImageGroupConfiguration.

Parameters:
conf - the AbstractImageGroupConfiguration

getImageVersionConfiguration

public final AbstractImageGroupConfiguration getImageVersionConfiguration()
Returns the underlying AbstractImageGroupConfiguration.

Returns:
the imageVersionConfiguration

deserializeToJDOM

public org.jdom.Element deserializeToJDOM()
Deserializes the state of the AbstractImageGroup as a JDOM Element.

Returns:
the state of the AbstractImageGroup as a JDOM Element