package com.ibm.emb.meb.test.ejb;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import java.rmi.RemoteException;

import javax.ejb.CreateException;
import javax.ejb.EJBObject;
import javax.ejb.FinderException;
import javax.ejb.RemoveException;
import javax.emb.ListenerVetoException;
import javax.emb.Media;
import javax.emb.MediaConverterSpec;
import javax.emb.MediaException;
import javax.emb.MediaFormat;
import javax.emb.MediaListener;
import javax.emb.ProtocolConstraints;
import javax.naming.NamingException;

import com.ibm.emb.meb.wrapper.MediaEntityWrapper;

/**
 * Remote interface for Enterprise Bean: TestDriver
 */
public interface MediaEntityLocalTestDriver extends EJBObject, MediaEntityWrapper {

    public static int NULLPOINTER = 1;

    public static int CONTENTACCESS = 2;

    public static int CONVERSION = 3;

    public static int MEDIAFORMAT = 4;

    public static int FORMATFEATURE = 5;

    public static int FORMATNOTFOUND = 6;

    public static int FORMATSYNTAX = 7;

    public static int LINKTRANSLATION = 8;

    public static int MALFORMEDLOCATION = 9;

    public static int CONTENTUNMUTABLE = 10;

    public static int LISTENERVETO = 11;

    public static int LOCATIONUNMUTABLE = 12;

    public static int VERSIONCHAININTEGRITY = 13;

    public static int CONTENTTOOLARGE = 14;

    public static int INDEXOUTOFBOUNDS = 15;

    public static int NEGATIVEARRAYSIZE = 16;

    public static int ILLEGALARGUMENT = 17;

    public static int FINDER = 18;

    public static int NOSERVERFOUND = 19;

    public int addListenerExceptions(String pk, MediaListener listener) throws MediaException, NamingException,
            FinderException, RemoteException;

    public int addMetaDataExceptions(String pk, String mdeb) throws MediaException, NamingException, FinderException,
            RemoteException;

    public int convertExceptions(String pk, MediaConverterSpec[] specs) throws MediaException, NamingException,
            FinderException, RemoteException;

    public int exportMediaExceptions(String pk, URL targetLocation) throws MediaException, NamingException,
            FinderException, RemoteException;

    public int getContentExceptions(String pk) throws MediaException, NamingException, FinderException, RemoteException;

    public int getFormatExceptions(String pk) throws MediaException, NamingException, FinderException, RemoteException;

    public int getHeaderExceptions(String pk) throws MediaException, NamingException, FinderException, RemoteException;

    public int getProxyExceptions(String pk) throws MediaException, NamingException, FinderException, RemoteException;

    public int importMediaExceptions(String pk, URL targetLocation, String name) throws MediaException,
            NamingException, FinderException, RemoteException;

    public int readContentExceptions(String pk, long position, byte[] buffer) throws MediaException, NamingException,
            FinderException, RemoteException;

    public int readContentExceptions(String pk, long position, byte[] buffer, int offset, int length)
            throws MediaException, NamingException, FinderException, RemoteException;

    public int removeListenerExceptions(String pk, MediaListener listener) throws MediaException, NamingException,
            FinderException, RemoteException;

    public int removeMetaDataExceptions(String pk, String mdeb) throws MediaException, NamingException,
            FinderException, RemoteException;

    public int setChildrenExceptions(String pk, String[] children) throws MediaException, NamingException,
            FinderException, RemoteException;

    public int setContentExceptions(String pk, byte[] content) throws MediaException, NamingException, FinderException,
            RemoteException;

    public int setLocationExceptions(String pk, URL location) throws MediaException, NamingException, FinderException,
            RemoteException;

    public int setNameExceptions(String pk, String name) throws MediaException, NamingException, FinderException,
            RemoteException;

    public int setPreviousVersionExceptions(String pk, String pvpk) throws MediaException, NamingException,
            FinderException, RemoteException;

    public int getSizeExceptions(String pk) throws MediaException, NamingException, FinderException,
            java.rmi.RemoteException;

    public void bindMediaFormat(String fileExt, MediaFormat format) throws MediaException, java.rmi.RemoteException;

    public int exportHomeMediaExceptions(String[] pks, URL targetDir) throws MediaException, NamingException,
            FinderException, java.rmi.RemoteException;

    public int findByPKExceptions(String pk) throws NamingException, java.rmi.RemoteException;

    public int importHomeMediaExceptions(URL[] locations, String[] names) throws CreateException, MediaException,
            NamingException, FinderException, java.rmi.RemoteException;

    public int publishContentExceptions(Media content, byte transferType, ProtocolConstraints constraints)
            throws MediaException, NamingException, FinderException, java.rmi.RemoteException;

    public int publishMediaExceptions(String[] playlist, byte transferType, ProtocolConstraints constraints)
            throws MediaException, NamingException, FinderException, java.rmi.RemoteException;

    public int publishContentExceptions(String pk, byte transferType, ProtocolConstraints constraints)
            throws MediaException, NamingException, FinderException, java.rmi.RemoteException;

    public URL publishMediaContent(String pk, byte protocol, ProtocolConstraints constraints) throws MediaException,
            NamingException, FinderException, java.rmi.RemoteException;

    public void unbindMediaFormat(String fileExt) throws MediaException, java.rmi.RemoteException;

    public MediaFormat lookUpMediaFormat(String fileExt) throws MediaException, java.rmi.RemoteException;

    public void cleanUp() throws NamingException, java.rmi.RemoteException;

    public boolean readCompareContent(String pk, long position, byte[] buffer, File origFileContent)
            throws IOException, NamingException, FinderException, MediaException, java.rmi.RemoteException;

    public boolean readCompareContent(String pk, long position, byte[] buffer, int offset, int length,
            byte[] origContent, boolean fillBuffer) throws MediaException, NamingException, FinderException,
            java.rmi.RemoteException;

    public int setContentExceptions(String pk, File file) throws FileNotFoundException, NamingException,
            FinderException, MediaException, java.rmi.RemoteException;

    public void removeMDEBByPK(String pk) throws NamingException, FinderException, RemoveException,
            java.rmi.RemoteException;

    public int listenerAboutToChangeMEB(MediaListener listener, String pk, String property) throws FinderException,
            NamingException, MediaException, java.rmi.RemoteException;

    public int listenerMediaEntityChanged(MediaListener listener, String pk, String property) throws FinderException,
            NamingException, MediaException, java.rmi.RemoteException;

    public int listenerAboutToRemoveMEB(MediaListener listener, String pk) throws FinderException, NamingException,
            MediaException, java.rmi.RemoteException;

    public int setDescriptionExceptions(String pk, String description) throws MediaException, NamingException,
            FinderException, java.rmi.RemoteException;

    public int setMimeTypeExceptions(String pk, String mimeType) throws MediaException, NamingException,
            FinderException, java.rmi.RemoteException;

    public int removeMEBExceptions(String pk) throws NamingException, FinderException, RemoveException,
            ListenerVetoException, java.rmi.RemoteException;

    public void removeMEBByPK(String pk) throws NamingException, FinderException, RemoveException,
            java.rmi.RemoteException;

    public int getMimeTypeExceptions(String pk) throws MediaException, NamingException, FinderException,
            java.rmi.RemoteException;
}