home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / VisualRepository.java < prev    next >
Text File  |  1998-10-25  |  4KB  |  101 lines

  1. /*
  2.  * Copyright 1998 Symantec Corporation, All Rights Reserved.
  3.  */
  4.  
  5. package com.symantec.itools.vcafe.openapi;
  6.  
  7.  
  8. /**
  9.  * The API used to represent and access the Object Library in a <code>VisualProject</code> and
  10.  * the Component Library in Visual Cafe.
  11.  * @see ComponentLibrary
  12.  * @see VisualCafe#getComponentLibrary
  13.  * @see VisualProject#getObjectLibrary
  14.  *
  15.  * @author Symantec Internet Tools Division
  16.  * @version 1.0
  17.  * @since VCafe 3.0
  18.  */
  19. public interface VisualRepository
  20. {
  21.  
  22.     /**
  23.      * Obtain a <code>VisualObject</code> with the given id.
  24.      *
  25.      * @param objectID    unique id of a <code>VisualObject</code>.
  26.      * @return            <code>VisualObject</code> whose id matches the given id.
  27.      */
  28.     public VisualObject getObject(int objectID);
  29.  
  30.     /**
  31.      * Obtain the root <code>VisualObject</code> in the repository tree.
  32.      * The root <code>VisualObject</code> of a VisualRepository is invisible, but can be used to
  33.      * begin traversing the hierarchy of <code>VisualObjects</code>.
  34.      *
  35.      * @return            <code>VisualObject</code> representing the root of the hierarchy.
  36.      */
  37.     public VisualObject getRootObject();
  38.  
  39.     /**
  40.      * Obtain the list of all top level objects in the repository (children of
  41.      * the Root Object).
  42.      *
  43.      * @return            array of top level <code>VisualObjects</code>.
  44.      */
  45.     public VisualObject[] getObjects();
  46.  
  47.     /**
  48.      * Obtain the list of children <code>VisualObjects</code> of a given <code>VisualObject</code>
  49.      * in the repository tree.
  50.      *
  51.      * @param visualObject    the object whose children are to be returned.
  52.      * @return                array of child <code>VisualObjects</code>.
  53.      */
  54.     public VisualObject[] getChildren(VisualObject visualObject);
  55.  
  56.     /**
  57.      * Add a <code>VisualObject</code> to the repository.
  58.      *
  59.      * @param visualObject    the object to add.
  60.      * @param parent        the parent <code>VisualObject</code> for the given object. If <code>parent</code> is
  61.      *                        <code>null</code>, then <code>visualObject</code> will be added as child of the
  62.      *                        Root Object.
  63.      * @param after            the <code>VisualObject</code> after which it should be added. If after is
  64.      *                        <code>null</code>, then <code>visualObject</code> will be added as the last child.
  65.      * @return                <code>true</code> if the object was successfully added.
  66.      */
  67.     public boolean addObject(VisualObject visualObject, VisualObject parent, VisualObject after);
  68.  
  69.     /**
  70.      * Add a <code>VisualObject</code> to the repository
  71.      *
  72.      * @param visualObject    the object to add.
  73.      * @param parent        the parent <code>VisualObject</code> for the given object. If the parent is
  74.      *                        <code>null</code>, then <code>visualObject</code> will be added as a child
  75.      *                        of the Root Object.
  76.      * @param before        the <code>VisualObject</code> before which it should be added. If before is
  77.      *                        <code>null</code>, then <code>visualObject</code> will be added as the last child.
  78.      * @return                <code>true</code> if the object was successfully added.
  79.      */
  80.     public boolean addObjectBefore(VisualObject visualObject, VisualObject parent, VisualObject before);
  81.  
  82.     /**
  83.      * Insert a <code>VisualObject</code> at a particular location in the repository
  84.      *
  85.      * @param visualObject    the object to add.
  86.      * @param parent        the parent <code>VisualObject</code> for the given object. If the parent is
  87.      *                        <code>null</code>, then <code>visualObject</code> will be added as a child
  88.      *                        of the Root Object.
  89.      * @param index            relative location where the <code>VisualObject</code> is to be inserted..
  90.      * @return                <code>true</code> if the object was successfully added.
  91.      */
  92.     public boolean insertObject(VisualObject visualObject, VisualObject parent, int nIndex);
  93.  
  94.     /**
  95.      * Remove a given <code>VisualObject</code> from the repository.
  96.      *
  97.      * @param visualObject        the object to remove.
  98.      */
  99.     public boolean removeObject(VisualObject visualObject);
  100. }
  101.