|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.domain.DomainObject
com.arsdigita.domain.ObservableDomainObject
com.arsdigita.kernel.ACSObject
com.arsdigita.versioning.VersionedACSObject
com.arsdigita.cms.ContentItem
com.arsdigita.cms.Asset
com.arsdigita.cms.BinaryAsset
com.arsdigita.cms.ImageAsset
com.arsdigita.cms.ReusableImageAsset
An asset
representing a reusable
image.
ImageAsset
Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
|
static String |
versionId
|
Fields inherited from class com.arsdigita.cms.ImageAsset |
CONTENT, HEIGHT, MIME_GIF, MIME_JPEG, WIDTH |
Fields inherited from class com.arsdigita.cms.Asset |
DESCRIPTION, MIME_TYPE, NAME |
Fields inherited from class com.arsdigita.cms.ContentItem |
ANCESTORS, AUDITING, CHILDREN, CONTENT_SECTION, CONTENT_TYPE, DRAFT, DRAFT_VERSION, LANGUAGE, LIVE, PARENT, PENDING, VERSION, VERSIONS |
Fields inherited from class com.arsdigita.versioning.VersionedACSObject |
IS_DELETED, MASTER |
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE |
Constructor Summary | |
ReusableImageAsset()
Default constructor. |
|
ReusableImageAsset(BigDecimal id)
Constructor. |
|
ReusableImageAsset(com.arsdigita.persistence.DataObject obj)
|
|
ReusableImageAsset(com.arsdigita.persistence.OID oid)
Constructor. |
|
ReusableImageAsset(String type)
|
Method Summary | |
static ImageAssetCollection |
getAllReusableImages()
Retrieve all images in the database. |
String |
getBaseDataObjectType()
|
protected byte[] |
getContent()
Retrieves the Blob content. |
BigDecimal |
getHeight()
|
static ImageAssetCollection |
getReusableImagesByKeyword(String keyword)
Find all images whose name matches the specified keyword |
static ImageAssetCollection |
getReusableImagesByKeyword(String keyword,
String context)
Find all images whose name matches the specified keyword |
BigDecimal |
getWidth()
|
void |
loadFromFile(String fileName,
File file,
String defaultMimeType)
Load the image asset from the specified file. |
protected void |
setContent(byte[] content)
Sets the Blob content. |
void |
setHeight(BigDecimal height)
|
void |
setWidth(BigDecimal width)
|
void |
writeToFile(File file)
Write the image asset content to a file. |
Methods inherited from class com.arsdigita.cms.ImageAsset |
getAllImages, getImagesByKeyword, getImagesByKeyword, guessSize |
Methods inherited from class com.arsdigita.cms.BinaryAsset |
getSize, readBytes, writeBytes |
Methods inherited from class com.arsdigita.cms.Asset |
getDescription, getMimeType, setDescription, setMimeType |
Methods inherited from class com.arsdigita.versioning.VersionedACSObject |
applyTag, applyUniqueTag, autoPropagateMaster, getMaster, getRolledBackTo, getTransactions, getTransactions, isMaster, isRolledBack, isSubtype, permanentlyDelete, propagateMaster, recordAttributeChange, rollBackTo, rollBackTo, rollForward, save, setMaster, trackChanges |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, isContainerModified, setID, setID |
Methods inherited from class com.arsdigita.domain.ObservableDomainObject |
addObserver, getObservers |
Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, afterDelete, clear, delete, disconnect, equals, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String versionId
public static final String BASE_DATA_OBJECT_TYPE
Constructor Detail |
public ReusableImageAsset()
public ReusableImageAsset(com.arsdigita.persistence.OID oid) throws com.arsdigita.domain.DataObjectNotFoundException
DataObject
is retrieved
from the persistent storage mechanism with an OID
specified by oid.
oid
- The OID
for the retrieved
DataObject
.public ReusableImageAsset(BigDecimal id) throws com.arsdigita.domain.DataObjectNotFoundException
DataObject
is retrieved
from the persistent storage mechanism with an OID
specified by id and
ReusableImageAsset.BASE_DATA_OBJECT_TYPE
.
id
- The id
for the retrieved
DataObject
.public ReusableImageAsset(com.arsdigita.persistence.DataObject obj)
public ReusableImageAsset(String type)
Method Detail |
public String getBaseDataObjectType()
getBaseDataObjectType
in class ImageAsset
public BigDecimal getWidth()
getWidth
in class ImageAsset
public void setWidth(BigDecimal width)
setWidth
in class ImageAsset
public BigDecimal getHeight()
getHeight
in class ImageAsset
public void setHeight(BigDecimal height)
setHeight
in class ImageAsset
protected byte[] getContent()
getContent
in class ImageAsset
protected void setContent(byte[] content)
setContent
in class ImageAsset
public void loadFromFile(String fileName, File file, String defaultMimeType) throws IOException
loadFromFile
in class ImageAsset
fileName
- The original name of the filedefaultMimeType
- The default mime type for the filefile
- The actual file on the server
IOException
public void writeToFile(File file) throws IOException
writeToFile
in class ImageAsset
file
- The file on the server to write to.
IOException
public static ImageAssetCollection getAllReusableImages()
public static ImageAssetCollection getReusableImagesByKeyword(String keyword, String context)
keyword
- a String keywordcontext
- the context for the retrieved items. Should be
ContentItem.DRAFT
or ContentItem.LIVE
public static ImageAssetCollection getReusableImagesByKeyword(String keyword)
keyword
- a String keyword
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |