°ü¸® ¾È³»¼­


ÀÎÅÍÆäÀ̽º ¼³¸í

´ÙÀ½°ú °°Àº ÀÎÅÍÆäÀ̽º°¡ Á¦°øµË´Ï´Ù.

À̵é ÀÎÅÍÆäÀ̽º´Â ´ÙÀ½ Àý¿¡¼­ ¿¹¿Í ÇÔ²² ¼³¸íµË´Ï´Ù.

CCExtension

CCExtension ÀÎÅÍÆäÀ̽º´Â »ç¿ëÀÚ°¡ »õ Åø¹Ù ¹öư, »õ ¸Þ´º Ç׸ñÀ» Ãß°¡Çϰí ÀÌ¹Ì ÀÖ´Â ¸Þ´º Á¶Ä¡¸¦ ´ëüÇÏ¿© Á¦¾î ¼¾ÅÍ »ç¿ëÀÚ ÀÎÅÍÆäÀ̽º¸¦ È®ÀåÇÒ ¼ö ÀÖ°Ô ÇÕ´Ï´Ù.

¿ÜºÎ ÀÎÅÍÆäÀ̽º´Â ´ÙÀ½°ú °°ÀÌ Á¤Àǵ˴ϴÙ.

   public interface CCExtension
   {
      /**
       * Get an array of CCObject subclass objects which define
       * a list of objects to be inserted or overridden in the
       * Control Center
       * @return CCObject[] CCObject subclass objects array
       */
      public CCObject[] getObjects();
 
      /**
       * Get an array of CCToolbarAction subclass objects which represent
       * a list of buttons to be added to the Control Center
       * main toolbar.
       * @return CCToolbarAction[] CCToolbarAction subclass objects array
       */
      public CCToolbarAction[] getToolbarActions();
   }

CCExtensionÀ» »ç¿ëÇÏ·Á¸é, "com.ibm.db2.tools.cc.navigator" ÆÐŰÁö¸¦ °¡Á®¿À±âÇÏ¿© ÀÌ ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇÏ´Â Java Ŭ·¡½º¸¦ ÀÛ¼ºÇϽʽÿÀ. »õ·Î¿î Ŭ·¡½º´Â getObjects() ¹× getToolbarActions() ¸Þ¼ÒµåÀÇ ±¸ÇöÀ» Á¦°øÇØ¾ß ÇÕ´Ï´Ù.

getObjects() ¸Þ¼Òµå´Â »ç¿ëÀÚ°¡ »õ·Î¿î ¸Þ´º Á¶Ä¡¸¦ Ãß°¡Çϰųª »çÀü Á¤ÀÇµÈ ¸Þ´º Á¶Ä¡ ¼¼Æ®¸¦ Á¦°ÅÇÏ·Á°í ÇÏ´Â ±âÁ¸ ¿ÀºêÁ§Æ®¸¦ Á¤ÀÇÇÏ´Â CCObjectÀÇ ¹è¿­À» ¸®ÅÏÇÕ´Ï´Ù.

getToolbarActions() ¸Þ¼Òµå´Â Á¦¾î ¼¾ÅÍ ±âº» µµ±¸ ¸ðÀ½¿¡ Ãß°¡µÉ CCToolbarActionÀÇ ¹è¿­À» ¸®ÅÏÇÕ´Ï´Ù.

´ÜÀÏ CCExtension ¼­ºêŬ·¡½º ÆÄÀÏ ¶Ç´Â ´ÙÁß CCExtension ¼­ºêŬ·¡½º ÆÄÀÏÀÌ Á¦¾î ¼¾ÅÍ È®ÀåÀ» Á¤ÀÇÇÏ´Â µ¥ »ç¿ëµÉ ¼ö ÀÖ½À´Ï´Ù. Á¦¾î ¼¾ÅͰ¡ ÀÌ È®ÀåÀ» »ç¿ëÇÏ°Ô ÇÏ·Á¸é, ´ÙÀ½°ú °°Àº ¼³Á¤ ÇÁ·Î½Ãµà¾î¸¦ »ç¿ëÇϽʽÿÀ.

  1. ¸ðµç CCExtension ¼­ºêŬ·¡½º ÆÄÀÏÀÌ ÀÖ´Â "db2plug.zip" ÆÄÀÏÀ» ÀÛ¼ºÇϽʽÿÀ. ÀÌ ÆÄÀÏÀº ¾ÐÃàµÇ¾î¼­´Â ¾È µË´Ï´Ù. ¿¹¸¦ µé¾î, CCExtension ÆÄÀÏÀÌ Ç÷¯±×ÀÎ ÆÐŰÁö¿¡ ÀÖ°í À̵éÀÌ Ç÷¯±×ÀÎ µð·ºÅ丮¿¡ À§Ä¡Çϰí ÀÖÀ¸¸é, ´ÙÀ½ ¸í·ÉÀ» »ç¿ëÇϽʽÿÀ.
       zip -r0 db2plug.zip plugin\*.class
    

    ÀÌ ¸í·ÉÀº ¸ðµç Ç÷¯±×ÀÎ ÆÐŰÁö Ŭ·¡½º ÆÄÀÏÀ» db2plug.zip ÆÄÀÏ¿¡ ³Ö°í »ó´ë °æ·Î Á¤º¸¸¦ º¸Á¸ÇÕ´Ï´Ù.

  2. Á¦¾î ¼¾Å͸¦ ¾ÖÇø´À¸·Î ¼öÇà½ÃŰ·Á¸é, db2plug.zip ÆÄÀÏÀ» Á¦¾î ¼¾ÅÍ HTML ÆÄÀÏ¿¡¼­ <codebase> űװ¡ ÁöÁ¤ÇÏ´Â °÷¿¡ ³ÖÀ¸½Ê½Ã¿À. Á¦¾î ¼¾Å͸¦ ÀÀ¿ëÇÁ·Î±×·¥À¸·Î ¼öÇà½ÃŰ·Á¸é, db2plug.zip ÆÄÀÏÀ» CLASSPATH ȯ°æ º¯¼ö°¡ ÁöÁ¤ÇÏ´Â µð·ºÅ丮¿¡ ³ÖÀ¸½Ê½Ã¿À.

´ÙÁß ¾ÆÄ«ÀÌºê ÆÄÀÏÀ» Áö¿øÇÏ´Â ºê¶ó¿ìÀúÀÇ °æ¿ì, Á¦¾î ¼¾ÅÍ HTML ÆäÀÌÁöÀÇ ¾ÆÄ«ÀÌºê ¸ñ·Ï¿¡ "db2plug.zip"À» Ãß°¡¸¸ ÇϽʽÿÀ. ±×·¸Áö ¾ÊÀ¸¸é, ¸ðµç CCExtension, CCObject, CCToolbarAction ¹× CCMenuAction ¼­ºêŬ·¡½º ÆÄÀÏÀÌ ±×µéÀÌ ¼ÓÇÏ´Â ÆÐŰÁö¿¡ µû¶ó ÇØ´çÇÏ´Â »ó´ë µð·ºÅ丮¿¡ ÀÖ¾î¾ß ÇÕ´Ï´Ù.

CCObject

CCObject ÀÎÅÍÆäÀ̽º´Â ÀÌ¹Ì ÀÖ´Â ¿ÀºêÁ§Æ®ÀÇ ¸Þ´º Á¶Ä¡ÀÇ ÀÛµ¿À» º¯°æÇÒ ¼ö ÀÖ°Ô ÇÕ´Ï´Ù.

¿ÜºÎ ÀÎÅÍÆäÀ̽º´Â ´ÙÀ½°ú °°ÀÌ Á¤Àǵ˴ϴÙ.

public interface CCObject
{
   /**
    * The following static constants defines a list of object type
    * available to be added to the Control Center tree.
    */
   public static final int UDB_SYSTEMS_FOLDER                          = 0;
   public static final int UDB_SYSTEM                                  = 1;
   public static final int UDB_INSTANCES_FOLDER                        = 2;
   public static final int UDB_INSTANCE                                = 3;
   public static final int UDB_DATABASES_FOLDER                        = 4;
   public static final int UDB_DATABASE                                = 5;
   public static final int UDB_TABLES_FOLDER                           = 6;
   public static final int UDB_TABLE                                   = 7;
   public static final int UDB_TABLESPACES_FOLDER                      = 8;
   public static final int UDB_TABLESPACE                              = 9;
   public static final int UDB_VIEWS_FOLDER                            = 10;
   public static final int UDB_VIEW                                    = 11;
   public static final int UDB_ALIASES_FOLDER                          = 12;
   public static final int UDB_ALIAS                                   = 13;
   public static final int UDB_TRIGGERS_FOLDER                         = 14;
   public static final int UDB_TRIGGER                                 = 15;
   public static final int UDB_SCHEMAS_FOLDER                          = 16;
   public static final int UDB_SCHEMA                                  = 17;
   public static final int UDB_INDEXES_FOLDER                          = 18;
   public static final int UDB_INDEX                                   = 19;
   public static final int UDB_CONNECTIONS_FOLDER                      = 20;
   public static final int UDB_CONNECTION                              = 21;
   public static final int UDB_REPLICATION_SOURCES_FOLDER              = 22;
   public static final int UDB_REPLICATION_SOURCE                      = 23;
   public static final int UDB_REPLICATION_SUBSCRIPTIONS_FOLDER        = 24;
   public static final int UDB_REPLICATION_SUBSCRIPTION                = 25;
   public static final int UDB_BUFFERPOOLS_FOLDER                      = 26;
   public static final int UDB_BUFFERPOOL                              = 27;
   public static final int UDB_APPLICATION_OBJECTS_FOLDER              = 28;
   public static final int UDB_USER_DEFINED_DISTINCT_DATATYPES_FOLDER  = 29;
   public static final int UDB_USER_DEFINED_DISTINCT_DATATYPE          = 30;
   public static final int UDB_USER_DEFINED_DISTINCT_FUNCTIONS_FOLDER  = 31;
   public static final int UDB_USER_DEFINED_DISTINCT_FUNCTION          = 32;
   public static final int UDB_PACKAGES_FOLDER                         = 33;
   public static final int UDB_PACKAGE                                 = 34;
   public static final int UDB_STORE_PROCEDURES_FOLDER                 = 35;
   public static final int UDB_STORE_PROCEDURE                         = 36;
   public static final int UDB_USER_AND_GROUP_OBJECTS_FOLDER           = 37;
   public static final int UDB_DB_USERS_FOLDER                         = 38;
   public static final int UDB_DB_USER                                 = 39;
   public static final int UDB_DB_GROUPS_FOLDER                        = 40;
   public static final int UDB_DB_GROUP                                = 41;
   public static final int UDB_DRDA_TABLE                              = 42;
 
   public static final int S390_SUBSYSTEMS_FOLDER                      = 43;
   public static final int S390_SUBSYSTEM                              = 44;
   public static final int S390_BUFFERPOOLS_FOLDER                     = 45;
   public static final int S390_BUFFERPOOL                             = 46;
   public static final int S390_VIEWS_FOLDER                           = 47;
   public static final int S390_VIEW                                   = 48;
   public static final int S390_DATABASES_FOLDER                       = 49;
   public static final int S390_DATABASE                               = 50;
   public static final int S390_TABLESPACES_FOLDER                     = 51;
   public static final int S390_TABLESPACE                             = 52;
   public static final int S390_TABLES_FOLDER                          = 53;
   public static final int S390_TABLE                                  = 54;
   public static final int S390_INDEXS_FOLDER                          = 55;
   public static final int S390_INDEX                                  = 56;
   public static final int S390_STORAGE_GROUPS_FOLDER                  = 57;
   public static final int S390_STORAGE_GROUP                          = 58;
   public static final int S390_ALIASES_FOLDER                         = 59;
   public static final int S390_ALIAS                                  = 60;
   public static final int S390_SYNONYMS_FOLDER                        = 61;
   public static final int S390_SYNONYM                                = 62;
   public static final int S390_APPLICATION_OBJECTS_FOLDER             = 63;
   public static final int S390_COLLECTIONS_FOLDER                     = 64;
   public static final int S390_COLLECTION                             = 65;
   public static final int S390_PACKAGES_FOLDER                        = 66;
   public static final int S390_PACKAGE                                = 67;
   public static final int S390_PLANS_FOLDER                           = 68;
   public static final int S390_PLAN                                   = 69;
   public static final int S390_PROCEDURES_FOLDER                      = 70;
   public static final int S390_PROCEDURE                              = 71;
   public static final int S390_DB_USERS_FOLDER                        = 72;
   public static final int S390_DB_USER                                = 73;
   public static final int S390_LOCATIONS_FOLDER                       = 74;
   public static final int S390_LOCATION                               = 75;
   public static final int S390_DISTINCT_TYPES_FOLDER                  = 76;
   public static final int S390_DISTINCT_TYPE                          = 77;
   public static final int S390_USER_DEFINED_FUNCTIONS_FOLDER          = 78;
   public static final int S390_USER_DEFINED_FUNCTION                  = 79;
   public static final int S390_TRIGGERS_FOLDER                        = 80;
   public static final int S390_TRIGGER                                = 81;
   public static final int S390_SCHEMAS_FOLDER                         = 82;
   public static final int S390_SCHEMA                                 = 83;
   public static final int S390_CATALOG_TABLES_FOLDER                  = 84;
   public static final int S390_CATALOG_TABLE                          = 85;
 
   public static final int DCS_GATEWAY_CONNECTIONS_FOLDER              = 86;
   public static final int DCS_GATEWAY_CONNECTION                      = 87;
 
   /**
    * Total number of object types
    */
   public static final int NUM_OBJECT_TYPES                            = 88;
 
   /**
    * Get the name of these object
    * The function returns the name of this object. This name
    * can be of three types:
    * (1) Fully qualified name
    *     Syntax: xxxxx-yyyyy-zzzzz
    *             where xxxxx-yyyyy is the fully quality name of the
    *             parent object and zzzzz is the name of the new object.
    *     Note: Parent and child object name is separated by '-' character.
    *     If a schema name is required to identify object, the fully
    *     qualified name is represented by xxxxx-yyyyy-wwwww.zzzzz
    *     where wwwww is the schema name.
    *     Only the behavior of the object that matches this fully
    *     qualified name will be affected.
    * (2) Parent fully qualified name
    *     Syntax: xxxxx-yyyyy
    *             where xxxxx-yyyyy is the fully qualified name of the
    *             parent object.
    *     When the object type is folder (ie. DATABASES_FOLDER), the
    *     getName() should only return the fully qualified name of the
    *     folder's parent.
    *     Only the behavior of the object that match this name
    *     and the specific type return by the getType() function will be
    *     affected.
    * (3) null
    *     Syntax: null
    *     If null is return, the CCActions returns by the getActions()
    *     call will be applied to all objects of type returns by the
    *     getType() call.
    * @return String object name
    */
   public String getName();
 
   /**
    * Get the type of this object
    * @return int return one of the static type constants defined
    * in this interface
    */
   public int getType();
 
   /**
    * Get the CCMenu Action array which defines the list of menu actions
    * to be created for the selected object
    * return CCMenuAction[] CCMenuAction array
    */
   public CCMenuAction[] getMenuActions();
 
   /**
    * Check if this object is editable.
    * If not, the Alter related menu items will be removed from
    * the object's popup menu return boolean If false, the Alter
    * menu item will be removed from the object's popup menu
    */
   public boolean isEditable();
 
   /**
    * Check if this object is configurable.
    * If not, the configuration related menu items will be
    * removed from the object's popup menu return boolean If
    * false, the Configuration related menu item will be removed
    * from the object's popup menu
    */
   public boolean isConfigurable();
}

ÁÖ:ÀÌ °æ¿ì, CCObject¿¡ ÀÖ´Â ¸¶Áö¸· µÎ ¸Þ¼Òµå(isEditable() ¹× isConfigurable())´Â Ç×»ó true¸¦ ¸®ÅÏÇØ¾ß ÇÕ´Ï´Ù.

CCMenuAction

CCMenuAction ÀÎÅÍÆäÀ̽º´Â Á¦¾î ¼¾ÅÍ ¿ÀºêÁ§Æ®¿¡ ÀÇÇØ »ç¿ëµÇ´Â »õ·Î¿î Á¶Ä¡¸¦ Á¤ÀÇÇÒ ¼ö ÀÖ°Ô ÇÕ´Ï´Ù.

¿ÜºÎ ÀÎÅÍÆäÀ̽º´Â ´ÙÀ½°ú °°ÀÌ Á¤Àǵ˴ϴÙ.

public interface CCMenuAction
{
   /**
    * Get the name of this action
    * @return String Name text on the menu item
    */
   public String getMenuText();
 
   /**
    * Invoked when an action occurs. Use the getActionCommand()
    * method of the ActionEvent to get the fully qualified name of
    * the invoked Control Center object.
    * @param e Action event
    */
   public void actionPerformed(ActionEvent e);
}

CCToolBarAction

CCToolbarAction ÀÎÅÍÆäÀ̽º´Â Á¦¾î ¼¾ÅÍ µµ±¸ ¸ðÀ½¿¡ »õ·Î¿î Á¶Ä¡¸¦ Á¤ÀÇÇÒ ¼ö ÀÖ°Ô ÇÕ´Ï´Ù.

¿ÜºÎ ÀÎÅÍÆäÀ̽º´Â ´ÙÀ½°ú °°ÀÌ Á¤Àǵ˴ϴÙ.

public interface CCToolbarAction
{
   /**
    * Get the name of this action
    * @return String Name text on the menu item, or toolbar
    * button hover help
    */
   public String getHoverHelpText();
 
   /**
    * Get the icon for the toolbar button
    * Any toolbar CCAction should implement this function and return
    * a valid ImageIcon object. Otherwise, the button will have no icon.
    * @return ImageIcon Icon to be displayed
    */
   public ImageIcon getIcon();
 
   /**
    * Invoked when an action occurs.
    * @param e Action event
    */
   public void actionPerformed(ActionEvent e);
}


[ ÆäÀÌÁöÀÇ ¸Ç À§ | ÀÌÀü ÆäÀÌÁö | ´ÙÀ½ ÆäÀÌÁö | ¸ñÂ÷ | »öÀÎ ]