/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.media.entity;

/**
 * Local interface for MediaEntityManager.
 */
public interface MediaEntityManagerLocal
   extends javax.ejb.EJBLocalObject
{
   /**
    * Creates a new MediaEntity.
    * @return the primary key of the MediaEntity created.
    */
   public java.lang.String createMediaEntity(  ) throws javax.emb.MediaException, javax.ejb.CreateException, javax.naming.NamingException;

   /**
    * Updates a MediaEntity given its primary key and a DTO. <p>If a property is not set in the DTO, it will be set to <code>null</code> in the MediaEntity.
    * @param identity primary key.
    * @param mediaEntityDTO Data Transfer Object with the properties to update.
    * @return the primary key of the MediaEntity updated.
    */
   public java.lang.String updateMediaEntity( java.lang.String identity,org.jboss.media.entity.MediaEntityDTO mediaEntityDTO ) throws javax.emb.MediaException, javax.ejb.FinderException, javax.naming.NamingException;

   /**
    * Gets a MediaEntity property given its primary key and a property name. <p>Posible property names and their types are: <p>"content": <code>java.lang.String</code><br> "location": <code>java.net.URL</code><br> "description": <code>java.lang.String</code><br> "name": <code>java.lang.String</code><br> "mimeType": <code>java.lang.String</code>
    * @param identity primary key.
    * @param property property name.
    * @param value property value.
    * @param identity primary key.
    * @param property property name.
    * @return the property value.
    */
   public java.lang.Object getMediaEntityProperty( java.lang.String identity,java.lang.String property ) throws javax.emb.MediaException, javax.ejb.FinderException, javax.naming.NamingException;

   /**
    * Sets a property for a MediaEntity given its primary key, a property name and a value. <p>Posible property names and their types are: <p>"content": <code>java.lang.String</code><br> "location": <code>java.net.URL</code><br> "description": <code>java.lang.String</code><br> "name": <code>java.lang.String</code><br> "mimeType": <code>java.lang.String</code>
    * @param identity primary key.
    * @param property property name.
    * @param value property value.
    */
   public void setMediaEntityProperty( java.lang.String identity,java.lang.String property,java.lang.Object value ) throws javax.emb.MediaException, javax.ejb.FinderException, javax.naming.NamingException;

   public void setMediaEntityContent( java.lang.String identity,java.io.File contentFile ) throws javax.emb.MediaException, javax.ejb.FinderException, javax.naming.NamingException, java.io.FileNotFoundException;

}
