com.ibm.etools.systems.pushtoclient.core.extensions

Class ConfigurationElement

  • java.lang.Object
    • com.ibm.etools.systems.pushtoclient.core.extensions.ConfigurationElement
  • All Implemented Interfaces:
    IConfigurationElement, java.lang.Comparable<IConfigurationElement>


    public class ConfigurationElement
    extends java.lang.Object
    implements IConfigurationElement
    Represents a configuration or a category of configuration for import or export. Most providers will use this rather than directly implement the IConfigurationElement.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ConfigurationElement(java.lang.String name, java.lang.String description)
      Constructor for a configuration element.
      ConfigurationElement(java.lang.String name, java.lang.String description, ImageDescriptor icon)
      Constructor for a configuration element
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(IConfigurationElement child)
      Add a child configuration element to this configuration element.
      int compareTo(IConfigurationElement o) 
      java.lang.String getBuffer()
      Returns the buffer (if there is one) associated with this configuration element.
      IConfigurationElement[] getChildren()
      Returns the children of this element.
      IConfigurationExtension getConfigurationExtension()
      Gets the associated configuration extension
      java.lang.String getDescription()
      Returns the description for this configuration element
      java.io.File getFile()
      Returns the file (if there is one) associated with this configuration element.
      java.io.File getFileToReplace()
      Gets the workspace file that should be replaced as part of an import.
      ImageDescriptor getImage()
      Returns the image descriptor associated with this configuration element
      java.lang.String getName()
      Returns the name for this configuration element
      IConfigurationElement getParent()
      Gets the parent configuration element of this element.
      java.lang.String getProperty(java.lang.String key)
      Gets a property that is associated with this configuration element
      boolean hasChildren()
      Returns whether this element has children or not.
      boolean isConflicting()
      Indicates whether this new configuration conflicts with the original.
      boolean isDifferent()
      Indicates whether this new configuration is different from the original.
      boolean isSetToExport()
      Determine whether this configuration element should be exported.
      void setBuffer(java.lang.String buffer)
      Sets the buffer (if there is one) associated with this configuration element.
      void setConfigurationExtension(IConfigurationExtension extension)
      Sets the associated configuration extension
      void setConflicting(boolean flag)
      Indicates whether the new configuration conflicts with the original.
      void setDescription(java.lang.String description)
      Returns the description for this configuration element
      void setDifferent(boolean flag)
      Set whether the new configuration is different from the original.
      void setFile(java.io.File file)
      Sets the file (if there is one) associated with this configuration element.
      void setFileToReplace(java.io.File file)
      Sets the workspace file that should be replaced as part of an import.
      void setImage(ImageDescriptor icon)
      Sets the image descriptor for this configuration element
      void setParent(IConfigurationElement parent)
      Sets the parent configuration element of this element.
      void setProperty(java.lang.String key, java.lang.String value)
      Sets a property associated with this configuration element
      void setToExport(boolean flag)
      Sets whether this configuration element should be exported.
      java.lang.String toString()
      For debugging purposes
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ConfigurationElement

        public ConfigurationElement(java.lang.String name,
                                    java.lang.String description,
                                    ImageDescriptor icon)
        Constructor for a configuration element
        Parameters:
        name - the name of the configuration
        description - the description of the configuration
        icon - the image descriptor for the configuration
      • ConfigurationElement

        public ConfigurationElement(java.lang.String name,
                                    java.lang.String description)
        Constructor for a configuration element.
        Parameters:
        name - the name of the configuration
        description - the description of the configuration
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name for this configuration element
        Specified by:
        getName in interface IConfigurationElement
        Returns:
        the name
      • getDescription

        public java.lang.String getDescription()
        Returns the description for this configuration element
        Specified by:
        getDescription in interface IConfigurationElement
        Returns:
        the description
      • getImage

        public ImageDescriptor getImage()
        Returns the image descriptor associated with this configuration element
        Specified by:
        getImage in interface IConfigurationElement
        Returns:
        the image descriptor
      • setDescription

        public void setDescription(java.lang.String description)
        Returns the description for this configuration element
      • setImage

        public void setImage(ImageDescriptor icon)
        Sets the image descriptor for this configuration element
        Parameters:
        icon - the image descriptor
      • hasChildren

        public boolean hasChildren()
        Returns whether this element has children or not.
        Specified by:
        hasChildren in interface IConfigurationElement
        Returns:
        true if this element has children.
      • setToExport

        public void setToExport(boolean flag)
        Sets whether this configuration element should be exported.
        Specified by:
        setToExport in interface IConfigurationElement
        Parameters:
        flag - whether or not this configuration element should be exported.
      • isSetToExport

        public boolean isSetToExport()
        Determine whether this configuration element should be exported.
        Specified by:
        isSetToExport in interface IConfigurationElement
        Returns:
        true if this configuration element should be exported.
      • setFile

        public void setFile(java.io.File file)
        Sets the file (if there is one) associated with this configuration element.
        Specified by:
        setFile in interface IConfigurationElement
        Parameters:
        file - the associated file
      • getFile

        public java.io.File getFile()
        Returns the file (if there is one) associated with this configuration element.
        Specified by:
        getFile in interface IConfigurationElement
        Returns:
        the file.
      • setBuffer

        public void setBuffer(java.lang.String buffer)
        Sets the buffer (if there is one) associated with this configuration element.
        Specified by:
        setBuffer in interface IConfigurationElement
        Parameters:
        buffer - the associated buffer
      • getBuffer

        public java.lang.String getBuffer()
        Returns the buffer (if there is one) associated with this configuration element.
        Specified by:
        getBuffer in interface IConfigurationElement
        Returns:
        the associated buffer.
      • setDifferent

        public void setDifferent(boolean flag)
        Set whether the new configuration is different from the original.
        Specified by:
        setDifferent in interface IConfigurationElement
        Parameters:
        flag - true if the new configuration is different from the original,
      • isDifferent

        public boolean isDifferent()
        Indicates whether this new configuration is different from the original.
        Specified by:
        isDifferent in interface IConfigurationElement
        Returns:
        true if the new configuration is different from the original.
      • setConflicting

        public void setConflicting(boolean flag)
        Indicates whether the new configuration conflicts with the original.
        Specified by:
        setConflicting in interface IConfigurationElement
        Parameters:
        flag - true if the the new configuration is different from the original.
      • isConflicting

        public boolean isConflicting()
        Indicates whether this new configuration conflicts with the original.
        Specified by:
        isConflicting in interface IConfigurationElement
        Returns:
        true if the original and new configuration concflict.
      • getFileToReplace

        public java.io.File getFileToReplace()
        Gets the workspace file that should be replaced as part of an import.
        Specified by:
        getFileToReplace in interface IConfigurationElement
        Returns:
        the file to replace.
      • setFileToReplace

        public void setFileToReplace(java.io.File file)
        Sets the workspace file that should be replaced as part of an import.
        Specified by:
        setFileToReplace in interface IConfigurationElement
        Parameters:
        file - the file to replace
      • toString

        public java.lang.String toString()
        For debugging purposes
        Overrides:
        toString in class java.lang.Object
      • setProperty

        public void setProperty(java.lang.String key,
                                java.lang.String value)
        Sets a property associated with this configuration element
        Specified by:
        setProperty in interface IConfigurationElement
        Parameters:
        key - the key for the property
        value - the value for the property
      • getProperty

        public java.lang.String getProperty(java.lang.String key)
        Gets a property that is associated with this configuration element
        Specified by:
        getProperty in interface IConfigurationElement
        Parameters:
        key - the key for the property
        Returns:
        the value or null if it does not exist