home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
VisualRepository.java
< prev
next >
Wrap
Text File
|
1998-10-25
|
4KB
|
101 lines
/*
* Copyright 1998 Symantec Corporation, All Rights Reserved.
*/
package com.symantec.itools.vcafe.openapi;
/**
* The API used to represent and access the Object Library in a <code>VisualProject</code> and
* the Component Library in Visual Cafe.
* @see ComponentLibrary
* @see VisualCafe#getComponentLibrary
* @see VisualProject#getObjectLibrary
*
* @author Symantec Internet Tools Division
* @version 1.0
* @since VCafe 3.0
*/
public interface VisualRepository
{
/**
* Obtain a <code>VisualObject</code> with the given id.
*
* @param objectID unique id of a <code>VisualObject</code>.
* @return <code>VisualObject</code> whose id matches the given id.
*/
public VisualObject getObject(int objectID);
/**
* Obtain the root <code>VisualObject</code> in the repository tree.
* The root <code>VisualObject</code> of a VisualRepository is invisible, but can be used to
* begin traversing the hierarchy of <code>VisualObjects</code>.
*
* @return <code>VisualObject</code> representing the root of the hierarchy.
*/
public VisualObject getRootObject();
/**
* Obtain the list of all top level objects in the repository (children of
* the Root Object).
*
* @return array of top level <code>VisualObjects</code>.
*/
public VisualObject[] getObjects();
/**
* Obtain the list of children <code>VisualObjects</code> of a given <code>VisualObject</code>
* in the repository tree.
*
* @param visualObject the object whose children are to be returned.
* @return array of child <code>VisualObjects</code>.
*/
public VisualObject[] getChildren(VisualObject visualObject);
/**
* Add a <code>VisualObject</code> to the repository.
*
* @param visualObject the object to add.
* @param parent the parent <code>VisualObject</code> for the given object. If <code>parent</code> is
* <code>null</code>, then <code>visualObject</code> will be added as child of the
* Root Object.
* @param after the <code>VisualObject</code> after which it should be added. If after is
* <code>null</code>, then <code>visualObject</code> will be added as the last child.
* @return <code>true</code> if the object was successfully added.
*/
public boolean addObject(VisualObject visualObject, VisualObject parent, VisualObject after);
/**
* Add a <code>VisualObject</code> to the repository
*
* @param visualObject the object to add.
* @param parent the parent <code>VisualObject</code> for the given object. If the parent is
* <code>null</code>, then <code>visualObject</code> will be added as a child
* of the Root Object.
* @param before the <code>VisualObject</code> before which it should be added. If before is
* <code>null</code>, then <code>visualObject</code> will be added as the last child.
* @return <code>true</code> if the object was successfully added.
*/
public boolean addObjectBefore(VisualObject visualObject, VisualObject parent, VisualObject before);
/**
* Insert a <code>VisualObject</code> at a particular location in the repository
*
* @param visualObject the object to add.
* @param parent the parent <code>VisualObject</code> for the given object. If the parent is
* <code>null</code>, then <code>visualObject</code> will be added as a child
* of the Root Object.
* @param index relative location where the <code>VisualObject</code> is to be inserted..
* @return <code>true</code> if the object was successfully added.
*/
public boolean insertObject(VisualObject visualObject, VisualObject parent, int nIndex);
/**
* Remove a given <code>VisualObject</code> from the repository.
*
* @param visualObject the object to remove.
*/
public boolean removeObject(VisualObject visualObject);
}