package com.mockobjects.vaj;

import com.ibm.ivj.util.base.*;
import com.ibm.ivj.util.builders.*;
import com.ibm.ivj.util.base.Package;
import com.mockobjects.*;

import java.util.*;

public class MockType extends MockObject implements Type {
    private String myTypeName;
    private Package myPkg;
    private ArrayList myEditions = new ArrayList();
    private boolean myHasSourceCode;


    public MockType(String name) {
        super();
        myTypeName = name;
    }

    /**
     * clearToolRepositoryData method comment.
     */
    public void clearToolRepositoryData(String arg1) throws IvjException {}

    /**
     * clearToolWorkspaceData method comment.
     */
    public void clearToolWorkspaceData(String arg1) throws IvjException {}

    /**
     * createNewEdition method comment.
     */
    public void createNewEdition() throws IvjException {}

    /**
     * createVersion method comment.
     */
    public void createVersion(String arg1) throws IvjException {}

    /**
     * createVersion method comment.
     */
    public void createVersion(String arg1, boolean arg2) throws IvjException {}

    /**
     * delete method comment.
     */
    public void delete() throws IvjException {}

    public TypeEdition[] getAllEditions() throws IvjException {
        TypeEdition[] result = new TypeEdition[myEditions.size()];
        myEditions.toArray(result);
        return result;
    }

    /**
     * getAllSubtypes method comment.
     */
    public com.ibm.ivj.util.base.Type[] getAllSubtypes() {
        return null;
    }

    /**
     * getDeveloperName method comment.
     */
    public String getDeveloperName() throws IvjException {
        return null;
    }

    /**
     * getEdition method comment.
     */
    public TypeEdition getEdition() throws IvjException {
        return null;
    }

    /**
     * getName method comment.
     */
    public String getName() {
        return myTypeName;
    }

    /**
     * getOwnerName method comment.
     */
    public String getOwnerName() throws IvjException {
        return null;
    }

    /**
     * getPackage method comment.
     */
    public com.ibm.ivj.util.base.Package getPackage() throws IvjException {
        return myPkg;
    }

    /**
     * getProject method comment.
     */
    public Project getProject() throws IvjException {
        return myPkg.getProject();
    }

    /**
     * getQualifiedName method comment.
     */
    public String getQualifiedName() {
        return myPkg.getName()+"."+myTypeName;
    }

    /**
     * getToolRepositoryData method comment.
     */
    public ToolData getToolRepositoryData(String arg1) throws java.io.IOException, java.io.StreamCorruptedException, IvjException, ClassNotFoundException, java.io.OptionalDataException {
        return null;
    }

    /**
     * getToolWorkspaceData method comment.
     */
    public ToolData getToolWorkspaceData(String arg1) throws java.io.IOException, java.io.StreamCorruptedException, IvjException, ClassNotFoundException, java.io.OptionalDataException {
        return null;
    }

    /**
     * getVersionName method comment.
     */
    public String getVersionName() throws IvjException {
        return null;
    }

    /**
     * getVersionStamp method comment.
     */
    public java.util.Date getVersionStamp() throws IvjException {
        return null;
    }

    public boolean hasError() {
        notImplemented();
        return false;
    }

    public boolean hasSourceCode() {
        return myHasSourceCode;
    }

    /**
     * isApplet method comment.
     */
    public boolean isApplet() throws IvjException {
        return false;
    }

    /**
     * isApplication method comment.
     */
    public boolean isApplication() throws IvjException {
        return false;
    }

    /**
     * isClass method comment.
     */
    public boolean isClass() throws IvjException {
        return true;
    }

    /**
     * isEdition method comment.
     */
    public boolean isEdition() throws IvjException {
        return true;
    }

    /**
     * isInDefaultPackage method comment.
     */
    public boolean isInDefaultPackage() {
        return false;
    }

    /**
     * isInterface method comment.
     */
    public boolean isInterface() throws IvjException {
        return false;
    }

    /**
     * isPackage method comment.
     */
    public boolean isPackage() {
        return false;
    }

    /**
     * isProject method comment.
     */
    public boolean isProject() {
        return false;
    }

    /**
     * isReleased method comment.
     */
    public boolean isReleased() throws IvjException {
        return false;
    }

    /**
     * isType method comment.
     */
    public boolean isType() {
        return false;
    }

    /**
     * isVersion method comment.
     */
    public boolean isVersion() throws IvjException {
        return false;
    }

    /**
     * openBrowser method comment.
     */
    public void openBrowser() throws IvjException {}

    /**
     * release method comment.
     */
    public void release() throws IvjException {}

    public void setHasSourceCode(boolean hasSourceCode) {
        myHasSourceCode = hasSourceCode;
    }


    public void setPackage(Package pkg) {
        myPkg = pkg;
    }

    /**
     * setToolRepositoryData method comment.
     */
    public void setToolRepositoryData(ToolData arg1) throws java.io.IOException, IvjException {}

    /**
     * setToolWorkspaceData method comment.
     */
    public void setToolWorkspaceData(ToolData arg1) throws java.io.IOException, IvjException {}

    public void setupAddTypeEdition(TypeEdition edition) {
        myEditions.add(edition);
    }

    public MockTypeEdition setupNewTypeEdition(String versionName) {
        MockTypeEdition anEdition = new MockTypeEdition(versionName);
        setupAddTypeEdition(anEdition);

        return anEdition;
    }

    public MockTypeEdition setupNewTypeEdition(Date edition) {
        MockTypeEdition anEdition = new MockTypeEdition(null, edition);
        setupAddTypeEdition(anEdition);

        return anEdition;
    }

    /**
     * testToolRepositoryData method comment.
     */
    public boolean testToolRepositoryData(String arg1) throws IvjException {
        return false;
    }

    /**
     * testToolWorkspaceData method comment.
     */
    public boolean testToolWorkspaceData(String arg1) throws IvjException {
        return false;
    }

    /**
     * Returns a string representation of the test case
     */
    public String toString() {
        return "MockType: " + getQualifiedName();
    }

    /**
     * verify method comment.
     */
    public void verify() {}
}
