org.jboss.media.entity
Class MediaEntityManagerBean

java.lang.Object
  extended byorg.jboss.media.entity.MediaEntityManagerBean
All Implemented Interfaces:
EnterpriseBean (src) , java.io.Serializable, SessionBean (src)

public abstract class MediaEntityManagerBean
extends java.lang.Object
implements SessionBean (src)

Facade around the MediaEntity EJB.

See Also:
Serialized Form

Constructor Summary
MediaEntityManagerBean()
           
 
Method Summary
 java.lang.String createMediaEntity()
          Creates a new MediaEntity.
 MediaEntityDTO (src) getMediaEntity(java.lang.String identity)
           
 java.lang.Object getMediaEntityProperty(java.lang.String identity, java.lang.String property)
          Gets a MediaEntity property given its primary key and a property name.
 void setMediaEntityContent(java.lang.String identity, java.io.File contentFile)
           
 void setMediaEntityProperty(java.lang.String identity, java.lang.String property, java.lang.Object value)
          Sets a property for a MediaEntity given its primary key, a property name and a value.
 java.lang.String updateMediaEntity(java.lang.String identity, MediaEntityDTO (src)  mediaEntityDTO)
          Updates a MediaEntity given its primary key and a DTO.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.ejb.SessionBean (src)
ejbActivate, ejbPassivate, ejbRemove, setSessionContext
 

Constructor Detail

MediaEntityManagerBean

public MediaEntityManagerBean()
Method Detail

createMediaEntity

public java.lang.String createMediaEntity()
                                   throws MediaException (src) ,
                                          CreateException (src) ,
                                          javax.naming.NamingException
Creates a new MediaEntity.

Returns:
the primary key of the MediaEntity created.
Throws:
MediaException (src)
CreateException (src)
javax.naming.NamingException

getMediaEntity

public MediaEntityDTO (src)  getMediaEntity(java.lang.String identity)
                              throws MediaException (src) ,
                                     FinderException (src) ,
                                     javax.naming.NamingException
Throws:
MediaException (src)
FinderException (src)
javax.naming.NamingException

updateMediaEntity

public java.lang.String updateMediaEntity(java.lang.String identity,
                                          MediaEntityDTO (src)  mediaEntityDTO)
                                   throws MediaException (src) ,
                                          FinderException (src) ,
                                          javax.naming.NamingException
Updates a MediaEntity given its primary key and a DTO.

If a property is not set in the DTO, it will be set to null in the MediaEntity.

Parameters:
identity - primary key.
mediaEntityDTO - Data Transfer Object with the properties to update.
Returns:
the primary key of the MediaEntity updated.
Throws:
MediaException (src)
FinderException (src)
javax.naming.NamingException

getMediaEntityProperty

public java.lang.Object getMediaEntityProperty(java.lang.String identity,
                                               java.lang.String property)
                                        throws MediaException (src) ,
                                               FinderException (src) ,
                                               javax.naming.NamingException
Gets a MediaEntity property given its primary key and a property name.

Posible property names and their types are:

"content": java.lang.String
"location": java.net.URL
"description": java.lang.String
"name": java.lang.String
"mimeType": java.lang.String

Parameters:
identity - primary key.
property - property name.
Returns:
the property value.
Throws:
MediaException (src)
FinderException (src)
javax.naming.NamingException

setMediaEntityProperty

public void setMediaEntityProperty(java.lang.String identity,
                                   java.lang.String property,
                                   java.lang.Object value)
                            throws MediaException (src) ,
                                   FinderException (src) ,
                                   javax.naming.NamingException
Sets a property for a MediaEntity given its primary key, a property name and a value.

Posible property names and their types are:

"content": java.lang.String
"location": java.net.URL
"description": java.lang.String
"name": java.lang.String
"mimeType": java.lang.String

Parameters:
identity - primary key.
property - property name.
value - property value.
Throws:
MediaException (src)
FinderException (src)
javax.naming.NamingException

setMediaEntityContent

public void setMediaEntityContent(java.lang.String identity,
                                  java.io.File contentFile)
                           throws MediaException (src) ,
                                  FinderException (src) ,
                                  javax.naming.NamingException,
                                  java.io.FileNotFoundException
Throws:
MediaException (src)
FinderException (src)
javax.naming.NamingException
java.io.FileNotFoundException