com.arsdigita.cms.ui
Class SingleImageSelectionModel

java.lang.Object
  extended bycom.arsdigita.kernel.ui.ACSObjectSelectionModel
      extended bycom.arsdigita.cms.ItemSelectionModel
          extended bycom.arsdigita.cms.ui.SingleImageSelectionModel
All Implemented Interfaces:
com.arsdigita.kernel.ui.DomainObjectSelectionModel, com.arsdigita.bebop.SingleSelectionModel

public class SingleImageSelectionModel
extends ItemSelectionModel

Selects a single image for an article.

Version:
$IdS
Author:
Stanislav Freidin
See Also:
ArticleImage, ArticleImageDisplay

Field Summary
static String versionId
           
 
Constructor Summary
SingleImageSelectionModel(com.arsdigita.bebop.parameters.BigDecimalParameter param, ItemSelectionModel articleModel)
          Construct a new SingleImageSelectionModel
SingleImageSelectionModel(com.arsdigita.bebop.SingleSelectionModel imageModel, ItemSelectionModel articleModel)
          Construct a new SingleImageSelectionModel
SingleImageSelectionModel(String javaClass, String objectType, com.arsdigita.bebop.parameters.BigDecimalParameter param, ItemSelectionModel articleModel)
          Construct a new SingleImageSelectionModel
SingleImageSelectionModel(String javaClass, String objectType, com.arsdigita.bebop.SingleSelectionModel imageModel, ItemSelectionModel articleModel)
          Construct a new SingleImageSelectionModel
 
Method Summary
 ItemSelectionModel getArticleSelectionModel()
           
 Object getSelectedKey(com.arsdigita.bebop.PageState state)
          Get the id of the currently selected image
 com.arsdigita.domain.DomainObject getSelectedObject(com.arsdigita.bebop.PageState state)
          Get the currently selected image.
 
Methods inherited from class com.arsdigita.cms.ItemSelectionModel
createACSObject, createACSObject, createItem, createItem, getContentType, getSelectedItem
 
Methods inherited from class com.arsdigita.kernel.ui.ACSObjectSelectionModel
addChangeListener, clearSelection, getJavaClass, getObjectType, getSingleSelectionModel, getStateParameter, isInitialized, isSelected, loadACSObject, removeChangeListener, setSelectedKey, setSelectedObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

SingleImageSelectionModel

public SingleImageSelectionModel(String javaClass,
                                 String objectType,
                                 com.arsdigita.bebop.parameters.BigDecimalParameter param,
                                 ItemSelectionModel articleModel)
Construct a new SingleImageSelectionModel

Parameters:
javaClass - the Java class name of the ImageAsset subclass that this model deals with
param - the BigDecimalParameter where the image ID will be stored
articleModel - the ItemSelectionModel which will supply the current article

SingleImageSelectionModel

public SingleImageSelectionModel(String javaClass,
                                 String objectType,
                                 com.arsdigita.bebop.SingleSelectionModel imageModel,
                                 ItemSelectionModel articleModel)
Construct a new SingleImageSelectionModel

Parameters:
javaClass - the Java class name of the ImageAsset subclass that this model deals with
imageModel - the SingleSelectionModel which will store the image ID
articleModel - the ItemSelectionModel which will supply the current article

SingleImageSelectionModel

public SingleImageSelectionModel(com.arsdigita.bebop.SingleSelectionModel imageModel,
                                 ItemSelectionModel articleModel)
Construct a new SingleImageSelectionModel

Parameters:
imageModel - the SingleSelectionModel which will store the image ID
articleModel - the ItemSelectionModel which will supply the current article

SingleImageSelectionModel

public SingleImageSelectionModel(com.arsdigita.bebop.parameters.BigDecimalParameter param,
                                 ItemSelectionModel articleModel)
Construct a new SingleImageSelectionModel

Parameters:
param - the BigDecimalParameter where the image ID will be stored
articleModel - the ItemSelectionModel which will supply the current article
Method Detail

getSelectedObject

public com.arsdigita.domain.DomainObject getSelectedObject(com.arsdigita.bebop.PageState state)
Get the currently selected image. If no image is selected, select the first image for the article.


getSelectedKey

public Object getSelectedKey(com.arsdigita.bebop.PageState state)
Get the id of the currently selected image


getArticleSelectionModel

public ItemSelectionModel getArticleSelectionModel()
Returns:
the ItemSelectionModel which supplies the article


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2352 UTC